Skip to content

Commit 43b4fa6

Browse files
authored
Skip datasources tests for managed service run (#1297)
Signed-off-by: Ryan Liang <[email protected]>
1 parent 8f3aed4 commit 43b4fa6

File tree

1 file changed

+50
-48
lines changed

1 file changed

+50
-48
lines changed

cypress/integration/plugins/observability-dashboards/7_datasources_dashboard.spec.js

Lines changed: 50 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -25,52 +25,54 @@ const visitDatasourcesCreationPage = () => {
2525
cy.visit(BASE_PATH + DATASOURCES_PATH.DATASOURCES_CREATION_BASE);
2626
};
2727

28-
describe('Integration tests for datasources plugin', () => {
29-
it('Navigates to datasources plugin and expects the correct header', () => {
30-
visitDatasourcesHomePage();
31-
cy.get('[data-test-subj="dataconnections-header"]', {
32-
timeout: 120000,
33-
}).should('exist');
28+
if (!Cypress.env('MANAGED_SERVICE_ENDPOINT')) {
29+
describe('Integration tests for datasources plugin', () => {
30+
it('Navigates to datasources plugin and expects the correct header', () => {
31+
visitDatasourcesHomePage();
32+
cy.get('[data-test-subj="dataconnections-header"]', {
33+
timeout: 120000,
34+
}).should('exist');
35+
});
36+
37+
it('Tests navigation between tabs', () => {
38+
visitDatasourcesHomePage();
39+
40+
cy.get(manageDataSourcesTag)
41+
.should('have.class', 'euiTab-isSelected')
42+
.and('have.attr', 'aria-selected', 'true');
43+
cy.get(manageDataSourcesTag).click();
44+
cy.url().should('include', '/manage');
45+
46+
cy.get(newDataSourcesTag).click();
47+
cy.get(newDataSourcesTag)
48+
.should('have.class', 'euiTab-isSelected')
49+
.and('have.attr', 'aria-selected', 'true');
50+
cy.url().should('include', '/new');
51+
52+
cy.get(createS3Button).should('be.visible');
53+
cy.get(createPrometheusButton).should('be.visible');
54+
});
55+
56+
it('Tests navigation of S3 datasources creation page with hash', () => {
57+
visitDatasourcesCreationPage();
58+
59+
cy.get(createS3Button).should('be.visible').click();
60+
cy.url().should('include', 'configure/AmazonS3AWSGlue');
61+
62+
cy.get('h1.euiTitle.euiTitle--medium')
63+
.should('be.visible')
64+
.and('contain', 'Configure Amazon S3 data source');
65+
});
66+
67+
it('Tests navigation of Prometheus datasources creation page with hash', () => {
68+
visitDatasourcesCreationPage();
69+
70+
cy.get(createPrometheusButton).should('be.visible').click();
71+
cy.url().should('include', 'configure/Prometheus');
72+
73+
cy.get('h4.euiTitle.euiTitle--medium')
74+
.should('be.visible')
75+
.and('contain', 'Configure Prometheus data source');
76+
});
3477
});
35-
36-
it('Tests navigation between tabs', () => {
37-
visitDatasourcesHomePage();
38-
39-
cy.get(manageDataSourcesTag)
40-
.should('have.class', 'euiTab-isSelected')
41-
.and('have.attr', 'aria-selected', 'true');
42-
cy.get(manageDataSourcesTag).click();
43-
cy.url().should('include', '/manage');
44-
45-
cy.get(newDataSourcesTag).click();
46-
cy.get(newDataSourcesTag)
47-
.should('have.class', 'euiTab-isSelected')
48-
.and('have.attr', 'aria-selected', 'true');
49-
cy.url().should('include', '/new');
50-
51-
cy.get(createS3Button).should('be.visible');
52-
cy.get(createPrometheusButton).should('be.visible');
53-
});
54-
55-
it('Tests navigation of S3 datasources creation page with hash', () => {
56-
visitDatasourcesCreationPage();
57-
58-
cy.get(createS3Button).should('be.visible').click();
59-
cy.url().should('include', 'configure/AmazonS3AWSGlue');
60-
61-
cy.get('h1.euiTitle.euiTitle--medium')
62-
.should('be.visible')
63-
.and('contain', 'Configure Amazon S3 data source');
64-
});
65-
66-
it('Tests navigation of Prometheus datasources creation page with hash', () => {
67-
visitDatasourcesCreationPage();
68-
69-
cy.get(createPrometheusButton).should('be.visible').click();
70-
cy.url().should('include', 'configure/Prometheus');
71-
72-
cy.get('h4.euiTitle.euiTitle--medium')
73-
.should('be.visible')
74-
.and('contain', 'Configure Prometheus data source');
75-
});
76-
});
78+
}

0 commit comments

Comments
 (0)