Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0826473

Browse files
committedFeb 6, 2024
Increase timeout and wait to maps tests
Signed-off-by: Junqiu Lei <junqiu@amazon.com>
1 parent 9edba58 commit 0826473

File tree

4 files changed

+28
-14
lines changed

4 files changed

+28
-14
lines changed
 

‎cypress/integration/plugins/custom-import-map-dashboards/1_import_vector_map_tab.spec.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ describe('Verify the presence of import custom map tab in region map plugin', ()
2525
});
2626

2727
it('checks import custom map tab is present', () => {
28+
cy.wait(5000);
2829
// Click on "Import Vector Map" tab, which is part of customImportMap plugin
29-
cy.contains('Import Vector Map').click({ force: true });
30+
cy.contains('Import Vector Map', { timeout: 120000 })
31+
.should('be.visible')
32+
.click({ force: true });
3033
});
3134

3235
after(() => {

‎cypress/integration/plugins/custom-import-map-dashboards/2_opensearchMapLayer.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('Default OpenSearch base map layer', () => {
2121

2222
it('check if default OpenSearch map layer can be open', () => {
2323
cy.visit(`${BASE_PATH}/app/maps-dashboards`);
24-
cy.contains('Create map').click();
24+
cy.contains('Create map', { timeout: 120000 }).click();
2525
cy.get('[data-test-subj="layerControlPanel"]').should(
2626
'contain',
2727
'Default map'

‎cypress/integration/plugins/custom-import-map-dashboards/3_add_saved_object.spec.js

+8-5
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,22 @@ describe('Add flights dataset saved object', () => {
2121

2222
after(() => {
2323
cy.visit(`${BASE_PATH}/app/home#/tutorial_directory`);
24-
cy.get('button[data-test-subj="removeSampleDataSetflights"]')
24+
cy.get('button[data-test-subj="removeSampleDataSetflights"]', {
25+
timeout: 120000,
26+
})
2527
.should('be.visible')
2628
.click();
2729
});
2830

2931
it('check if maps saved object of flights dataset can be found and open', () => {
3032
cy.visit(`${BASE_PATH}/app/maps-dashboards`);
31-
cy.contains(
32-
'[Flights] Flights Status on Maps Destination Location'
33-
).click();
33+
cy.contains('[Flights] Flights Status on Maps Destination Location', {
34+
timeout: 120000,
35+
}).click();
3436
cy.get('[data-test-subj="layerControlPanel"]').should(
3537
'contain',
36-
'Flights On Time'
38+
'Flights On Time',
39+
{ timeout: 120000 }
3740
);
3841
});
3942
});

‎cypress/integration/plugins/custom-import-map-dashboards/4_documentsLayer.spec.js

+15-7
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,19 @@ describe('Documents layer', () => {
2323

2424
it('Add new documents layer with configuration', () => {
2525
cy.visit(`${BASE_PATH}/app/maps-dashboards`);
26-
cy.contains('Create map').click();
27-
cy.get("button[data-test-subj='addLayerButton']").click();
28-
cy.contains('Documents').click();
29-
cy.contains('Select data source', { timeout: 60000 }).click({
26+
cy.wait(5000);
27+
cy.contains('Create map', { timeout: 120000 }).click();
28+
cy.get("button[data-test-subj='addLayerButton']", {
29+
timeout: 120000,
30+
}).click();
31+
cy.contains('Documents', { timeout: 120000 }).click();
32+
cy.contains('Select data source', { timeout: 120000 }).click({
3033
force: true,
3134
});
32-
cy.wait(5000).contains('opensearch_dashboards_sample_data_flights').click();
33-
cy.contains('Select data field', { timeout: 60000 }).click({
35+
cy.contains('opensearch_dashboards_sample_data_flights', {
36+
timeout: 120000,
37+
}).click();
38+
cy.contains('Select data field', { timeout: 120000 }).click({
3439
force: true,
3540
});
3641
cy.wait(5000).contains('DestLocation').click();
@@ -66,7 +71,10 @@ describe('Documents layer', () => {
6671

6772
it('Open saved map with documents layer', () => {
6873
cy.visit(`${BASE_PATH}/app/maps-dashboards`);
69-
cy.get('[data-test-subj="mapListingPage"]').should('contain', uniqueName);
74+
cy.get('[data-test-subj="mapListingPage"]', { timeout: 120000 }).should(
75+
'contain',
76+
uniqueName
77+
);
7078
cy.contains(uniqueName).click();
7179
cy.get('[data-test-subj="layerControlPanel"]').should(
7280
'contain',

0 commit comments

Comments
 (0)
Please sign in to comment.