Skip to content

Commit

Permalink
Add more timeout and wait to maps-dashboards
Browse files Browse the repository at this point in the history
Signed-off-by: Junqiu Lei <[email protected]>
  • Loading branch information
junqiu-lei committed Feb 6, 2024
1 parent 4add696 commit 9dca82b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('Verify the presence of import custom map tab in region map plugin', ()
});

it('checks import custom map tab is present', () => {
cy.wait(5000);
cy.wait(10000);
// Click on "Import Vector Map" tab, which is part of customImportMap plugin
cy.contains('Import Vector Map', { timeout: 120000 })
.should('be.visible')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('Default OpenSearch base map layer', () => {
retryOnStatusCodeFailure: true,
timeout: 60000,
});
cy.wait(5000);
cy.get('div[data-test-subj="sampleDataSetCardflights"]', {
timeout: 60000,
})
Expand All @@ -20,8 +21,9 @@ describe('Default OpenSearch base map layer', () => {
});

it('check if default OpenSearch map layer can be open', () => {
cy.visit(`${BASE_PATH}/app/maps-dashboards`);
cy.contains('Create map', { timeout: 120000 }).click();
cy.wait(10000);
cy.visit(`${BASE_PATH}/app/maps-dashboards/create`);
cy.wait(5000);
cy.get('[data-test-subj="layerControlPanel"]').should(
'contain',
'Default map'
Expand All @@ -46,6 +48,7 @@ describe('Default OpenSearch base map layer', () => {

after(() => {
cy.visit(`${BASE_PATH}/app/home#/tutorial_directory`);
cy.wait(5000);
cy.get('button[data-test-subj="removeSampleDataSetflights"]')
.should('be.visible')
.click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('Add flights dataset saved object', () => {
retryOnStatusCodeFailure: true,
timeout: 60000,
});
cy.wait(5000);
cy.get('div[data-test-subj="sampleDataSetCardflights"]', {
timeout: 60000,
})
Expand All @@ -21,6 +22,7 @@ describe('Add flights dataset saved object', () => {

after(() => {
cy.visit(`${BASE_PATH}/app/home#/tutorial_directory`);
cy.wait(5000);
cy.get('button[data-test-subj="removeSampleDataSetflights"]', {
timeout: 120000,
})
Expand All @@ -30,6 +32,7 @@ describe('Add flights dataset saved object', () => {

it('check if maps saved object of flights dataset can be found and open', () => {
cy.visit(`${BASE_PATH}/app/maps-dashboards`);
cy.wait(30000);
cy.contains('[Flights] Flights Status on Maps Destination Location', {
timeout: 120000,
}).click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('Documents layer', () => {
retryOnStatusCodeFailure: true,
timeout: 60000,
});
cy.wait(5000);
cy.get('div[data-test-subj="sampleDataSetCardflights"]', {
timeout: 60000,
})
Expand All @@ -22,9 +23,9 @@ describe('Documents layer', () => {
const uniqueName = 'saved-map-' + Date.now().toString();

it('Add new documents layer with configuration', () => {
cy.visit(`${BASE_PATH}/app/maps-dashboards`);
cy.wait(10000);
cy.visit(`${BASE_PATH}/app/maps-dashboards/create`);
cy.wait(5000);
cy.contains('Create map', { timeout: 120000 }).click();
cy.get("button[data-test-subj='addLayerButton']", {
timeout: 120000,
}).click();
Expand Down Expand Up @@ -71,6 +72,7 @@ describe('Documents layer', () => {

it('Open saved map with documents layer', () => {
cy.visit(`${BASE_PATH}/app/maps-dashboards`);
cy.wait(10000);
cy.get('[data-test-subj="mapListingPage"]', { timeout: 120000 }).should(
'contain',
uniqueName
Expand All @@ -84,6 +86,7 @@ describe('Documents layer', () => {

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

0 comments on commit 9dca82b

Please sign in to comment.