Skip to content

Commit 09f9f3e

Browse files
authored
Add more timeout and wait to maps-dashboards (#1073)
Signed-off-by: Junqiu Lei <[email protected]>
1 parent 9bd0504 commit 09f9f3e

File tree

4 files changed

+25
-6
lines changed

4 files changed

+25
-6
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77

88
import { BASE_PATH } from '../../../utils/constants';
99
import { MiscUtils } from '@opensearch-dashboards-test/opensearch-dashboards-test-library';
10+
import { CURRENT_TENANT } from '../../../utils/commands';
1011

1112
const miscUtils = new MiscUtils(cy);
1213
describe('Verify the presence of import custom map tab in region map plugin', () => {
1314
before(() => {
15+
CURRENT_TENANT.newTenant = 'global';
1416
cy.deleteAllIndices();
1517
miscUtils.addSampleData();
1618

@@ -25,7 +27,7 @@ describe('Verify the presence of import custom map tab in region map plugin', ()
2527
});
2628

2729
it('checks import custom map tab is present', () => {
28-
cy.wait(5000);
30+
cy.wait(10000);
2931
// Click on "Import Vector Map" tab, which is part of customImportMap plugin
3032
cy.contains('Import Vector Map', { timeout: 120000 })
3133
.should('be.visible')

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@
44
*/
55

66
import { BASE_PATH } from '../../../utils/constants';
7+
import { CURRENT_TENANT } from '../../../utils/commands';
78

89
describe('Default OpenSearch base map layer', () => {
910
before(() => {
11+
CURRENT_TENANT.newTenant = 'global';
1012
cy.visit(`${BASE_PATH}/app/home#/tutorial_directory/sampleData`, {
1113
retryOnStatusCodeFailure: true,
1214
timeout: 60000,
1315
});
16+
cy.wait(5000);
1417
cy.get('div[data-test-subj="sampleDataSetCardflights"]', {
1518
timeout: 60000,
1619
})
@@ -20,8 +23,9 @@ describe('Default OpenSearch base map layer', () => {
2023
});
2124

2225
it('check if default OpenSearch map layer can be open', () => {
23-
cy.visit(`${BASE_PATH}/app/maps-dashboards`);
24-
cy.contains('Create map', { timeout: 120000 }).click();
26+
cy.wait(10000);
27+
cy.visit(`${BASE_PATH}/app/maps-dashboards/create`);
28+
cy.wait(10000);
2529
cy.get('[data-test-subj="layerControlPanel"]').should(
2630
'contain',
2731
'Default map'
@@ -46,6 +50,7 @@ describe('Default OpenSearch base map layer', () => {
4650

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

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@
44
*/
55

66
import { BASE_PATH } from '../../../utils/constants';
7+
import { CURRENT_TENANT } from '../../../utils/commands';
78

89
describe('Add flights dataset saved object', () => {
910
before(() => {
11+
CURRENT_TENANT.newTenant = 'global';
1012
cy.visit(`${BASE_PATH}/app/home#/tutorial_directory/sampleData`, {
1113
retryOnStatusCodeFailure: true,
1214
timeout: 60000,
1315
});
16+
cy.wait(5000);
1417
cy.get('div[data-test-subj="sampleDataSetCardflights"]', {
1518
timeout: 60000,
1619
})
@@ -21,6 +24,7 @@ describe('Add flights dataset saved object', () => {
2124

2225
after(() => {
2326
cy.visit(`${BASE_PATH}/app/home#/tutorial_directory`);
27+
cy.wait(5000);
2428
cy.get('button[data-test-subj="removeSampleDataSetflights"]', {
2529
timeout: 120000,
2630
})
@@ -29,7 +33,9 @@ describe('Add flights dataset saved object', () => {
2933
});
3034

3135
it('check if maps saved object of flights dataset can be found and open', () => {
36+
cy.wait(10000);
3237
cy.visit(`${BASE_PATH}/app/maps-dashboards`);
38+
cy.wait(10000);
3339
cy.contains('[Flights] Flights Status on Maps Destination Location', {
3440
timeout: 120000,
3541
}).click();

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@
44
*/
55

66
import { BASE_PATH } from '../../../utils/constants';
7+
import { CURRENT_TENANT } from '../../../utils/commands';
78

89
describe('Documents layer', () => {
910
before(() => {
11+
CURRENT_TENANT.newTenant = 'global';
1012
cy.visit(`${BASE_PATH}/app/home#/tutorial_directory/sampleData`, {
1113
retryOnStatusCodeFailure: true,
1214
timeout: 60000,
1315
});
16+
cy.wait(5000);
1417
cy.get('div[data-test-subj="sampleDataSetCardflights"]', {
1518
timeout: 60000,
1619
})
@@ -22,9 +25,9 @@ describe('Documents layer', () => {
2225
const uniqueName = 'saved-map-' + Date.now().toString();
2326

2427
it('Add new documents layer with configuration', () => {
25-
cy.visit(`${BASE_PATH}/app/maps-dashboards`);
26-
cy.wait(5000);
27-
cy.contains('Create map', { timeout: 120000 }).click();
28+
cy.wait(10000);
29+
cy.visit(`${BASE_PATH}/app/maps-dashboards/create`);
30+
cy.wait(10000);
2831
cy.get("button[data-test-subj='addLayerButton']", {
2932
timeout: 120000,
3033
}).click();
@@ -70,7 +73,9 @@ describe('Documents layer', () => {
7073
});
7174

7275
it('Open saved map with documents layer', () => {
76+
cy.wait(30000);
7377
cy.visit(`${BASE_PATH}/app/maps-dashboards`);
78+
cy.wait(10000);
7479
cy.get('[data-test-subj="mapListingPage"]', { timeout: 120000 }).should(
7580
'contain',
7681
uniqueName
@@ -84,6 +89,7 @@ describe('Documents layer', () => {
8489

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

0 commit comments

Comments
 (0)