Skip to content

Commit

Permalink
Fix lint error
Browse files Browse the repository at this point in the history
Signed-off-by: Lin Wang <wonglam@amazon.com>
  • Loading branch information
wanglam committed Sep 10, 2024
1 parent 4608bce commit 21e8470
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,16 @@ const miscUtils = new MiscUtils(cy);
const workspaceName = 'test_workspace_az3RBx6cE';

const inputWorkspaceName = (workspaceName) => {
const nameInput = cy.getElementByTestId(
'workspaceForm-workspaceDetails-nameInputText'
);
nameInput.clear();
nameInput.type(workspaceName);
const nameInputTestId = 'workspaceForm-workspaceDetails-nameInputText';
cy.getElementByTestId(nameInputTestId).clear();
cy.getElementByTestId(nameInputTestId).type(workspaceName);
};

const inputWorkspaceColor = (color = '#000000') => {
const colorPicker = cy.getElementByTestId(
'euiColorPickerAnchor workspaceForm-workspaceDetails-colorPicker'
);
colorPicker.clear({ force: true });
colorPicker.type(color);
const colorPickerTestId =
'euiColorPickerAnchor workspaceForm-workspaceDetails-colorPicker';
cy.getElementByTestId(colorPickerTestId).clear({ force: true });
cy.getElementByTestId(colorPickerTestId).type(color);
};

if (Cypress.env('WORKSPACE_ENABLED')) {
Expand Down
4 changes: 2 additions & 2 deletions cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// ***********************************************************

// Import commands.js using ES2015 syntax:
import '../utils/commands';
import * as commands from '../utils/commands';
import '../utils/dashboards/commands';
import '../utils/dashboards/datasource-management-dashboards-plugin/commands';
import '../utils/plugins/index-management-dashboards-plugin/commands';
Expand All @@ -33,13 +33,13 @@ import '../utils/plugins/notifications-dashboards/commands';
import '../utils/plugins/dashboards-assistant/commands';
import '../utils/dashboards/console/commands';
import '../utils/dashboards/workspace-plugin/commands';
import { currentBackendEndpoint } from '../utils/commands';

import 'cypress-real-events';

// Alternatively you can use CommonJS syntax:
// require('./commands')

const { currentBackendEndpoint } = commands;
const resizeObserverLoopErrRe = /^[^(ResizeObserver loop limit exceeded)]/;
Cypress.on('uncaught:exception', (err) => {
/* returning false here prevents Cypress from failing the test */
Expand Down

0 comments on commit 21e8470

Please sign in to comment.