From e046bf99024a94343ba91197a4b4f7b1fa0a82d6 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 09:55:03 +0800 Subject: [PATCH] remove the datasources tests (#1468) (#1480) Signed-off-by: Ryan Liang (cherry picked from commit cb6de7451da1dc8fc04e7cd95d636697868395a1) Co-authored-by: Jialiang Liang --- .../7_datasources_dashboard.spec.js | 78 ------------------- 1 file changed, 78 deletions(-) delete mode 100644 cypress/integration/plugins/observability-dashboards/7_datasources_dashboard.spec.js diff --git a/cypress/integration/plugins/observability-dashboards/7_datasources_dashboard.spec.js b/cypress/integration/plugins/observability-dashboards/7_datasources_dashboard.spec.js deleted file mode 100644 index 16ccffb10..000000000 --- a/cypress/integration/plugins/observability-dashboards/7_datasources_dashboard.spec.js +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - */ - -/// - -import { BASE_PATH } from '../../../utils/base_constants'; - -import { - DATASOURCES_API_PREFIX, - DATASOURCES_PATH, -} from '../../../utils/plugins/observability-dashboards/constants'; - -const manageDataSourcesTag = 'button[data-test-subj="manage"]'; -const newDataSourcesTag = 'button[data-test-subj="new"]'; -const createS3Button = '[data-test-subj="datasource_card_s3glue"]'; -const createPrometheusButton = '[data-test-subj="datasource_card_prometheus"]'; - -const visitDatasourcesHomePage = () => { - cy.visit(BASE_PATH + DATASOURCES_API_PREFIX); -}; - -const visitDatasourcesCreationPage = () => { - cy.visit(BASE_PATH + DATASOURCES_PATH.DATASOURCES_CREATION_BASE); -}; - -if (!Cypress.env('MANAGED_SERVICE_ENDPOINT')) { - describe('Integration tests for datasources plugin', () => { - it('Navigates to datasources plugin and expects the correct header', () => { - visitDatasourcesHomePage(); - cy.get('[data-test-subj="dataconnections-header"]', { - timeout: 120000, - }).should('exist'); - }); - - it('Tests navigation between tabs', () => { - visitDatasourcesHomePage(); - - cy.get(manageDataSourcesTag) - .should('have.class', 'euiTab-isSelected') - .and('have.attr', 'aria-selected', 'true'); - cy.get(manageDataSourcesTag).click(); - cy.url().should('include', '/manage'); - - cy.get(newDataSourcesTag).click(); - cy.get(newDataSourcesTag) - .should('have.class', 'euiTab-isSelected') - .and('have.attr', 'aria-selected', 'true'); - cy.url().should('include', '/new'); - - cy.get(createS3Button).should('be.visible'); - cy.get(createPrometheusButton).should('be.visible'); - }); - - it('Tests navigation of S3 datasources creation page with hash', () => { - visitDatasourcesCreationPage(); - - cy.get(createS3Button).should('be.visible').click(); - cy.url().should('include', 'configure/AmazonS3AWSGlue'); - - cy.get('h1.euiTitle.euiTitle--medium') - .should('be.visible') - .and('contain', 'Configure Amazon S3 data source'); - }); - - it('Tests navigation of Prometheus datasources creation page with hash', () => { - visitDatasourcesCreationPage(); - - cy.get(createPrometheusButton).should('be.visible').click(); - cy.url().should('include', 'configure/Prometheus'); - - cy.get('h4.euiTitle.euiTitle--medium') - .should('be.visible') - .and('contain', 'Configure Prometheus data source'); - }); - }); -}