Skip to content

Commit

Permalink
Add Cypress test for Default Saved Map (#552)
Browse files Browse the repository at this point in the history
* Add Cypress test for Default Saved Map

Signed-off-by: Naveen Tatikonda <navtat@amazon.com>

* Address Review Comments

Signed-off-by: Naveen Tatikonda <navtat@amazon.com>

---------

Signed-off-by: Naveen Tatikonda <navtat@amazon.com>
(cherry picked from commit 61766e7)
  • Loading branch information
naveentatikonda authored and github-actions[bot] committed Apr 19, 2023
1 parent 11aef1f commit 028a47d
Showing 1 changed file with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

import { BASE_PATH } from '../../../utils/constants';

describe('Add flights dataset saved object', () => {
before(() => {
cy.visit(`${BASE_PATH}/app/maps-dashboards`, {
retryOnStatusCodeFailure: true,
timeout: 60000,
});
cy.get('div[data-test-subj="indexPatternEmptyState"]', { timeout: 60000 })
.contains(/Add sample data/)
.click();
cy.get('div[data-test-subj="sampleDataSetCardflights"]', { timeout: 60000 })
.contains(/Add data/)
.click();
});

after(() => {
cy.visit(`${BASE_PATH}/app/home#/tutorial_directory`);
cy.get('button[data-test-subj="removeSampleDataSetflights"]')
.should('be.visible')
.click();
});

it('check if maps saved object of flights dataset can be found and open', () => {
cy.visit(`${BASE_PATH}/app/maps-dashboards`);
cy.contains(
'[Flights] Flights Status on Maps Destination Location'
).click();
cy.get('[data-test-subj="layerControlPanel"]').should(
'contain',
'Flights On Time'
);
});
});

0 comments on commit 028a47d

Please sign in to comment.