Skip to content

Commit

Permalink
Skip datasources tests for managed service run (#1297)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Liang <jiallian@amazon.com>
  • Loading branch information
RyanL1997 authored May 9, 2024
1 parent 8f3aed4 commit 43b4fa6
Showing 1 changed file with 50 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,52 +25,54 @@ const visitDatasourcesCreationPage = () => {
cy.visit(BASE_PATH + DATASOURCES_PATH.DATASOURCES_CREATION_BASE);
};

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');
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');
});
});

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');
});
});
}

0 comments on commit 43b4fa6

Please sign in to comment.