diff --git a/dashboards-reports/.cypress/integration/01-create.spec.ts b/dashboards-reports/.cypress/integration/01-create.spec.ts index 3bba5005..d047aeff 100644 --- a/dashboards-reports/.cypress/integration/01-create.spec.ts +++ b/dashboards-reports/.cypress/integration/01-create.spec.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { visitReportingLandingPage } from "../support/constants"; +import { visitReportingLandingPage } from "../support/utils"; describe('Adding sample data', () => { it('Adds sample data', () => { diff --git a/dashboards-reports/.cypress/integration/03-details.spec.ts b/dashboards-reports/.cypress/integration/03-details.spec.ts index 18e39083..166da435 100644 --- a/dashboards-reports/.cypress/integration/03-details.spec.ts +++ b/dashboards-reports/.cypress/integration/03-details.spec.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { visitReportingLandingPage } from "../support/constants"; +import { visitReportingLandingPage } from "../support/utils"; describe('Cypress', () => { it('Visit report definition details page', () => { diff --git a/dashboards-reports/.cypress/support/constants.js b/dashboards-reports/.cypress/support/constants.js index 75221f30..1001fd49 100644 --- a/dashboards-reports/.cypress/support/constants.js +++ b/dashboards-reports/.cypress/support/constants.js @@ -7,11 +7,3 @@ export const ADMIN_AUTH = { username: 'admin', password: 'admin', }; - -export function visitReportingLandingPage() { - cy.visit(`${Cypress.env('opensearchDashboards')}/app/reports-dashboards#/`); - cy.location('pathname', { timeout: 60000 }).should( - 'include', - '/reports-dashboards' - ); -} \ No newline at end of file diff --git a/dashboards-reports/.cypress/support/utils.js b/dashboards-reports/.cypress/support/utils.js new file mode 100644 index 00000000..a534be13 --- /dev/null +++ b/dashboards-reports/.cypress/support/utils.js @@ -0,0 +1,12 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +export function visitReportingLandingPage() { + cy.visit(`${Cypress.env('opensearchDashboards')}/app/reports-dashboards#/`); + cy.location('pathname', { timeout: 60000 }).should( + 'include', + '/reports-dashboards' + ); + } \ No newline at end of file