From 526d38506353477da04b007d5ff50dd4c70ec126 Mon Sep 17 00:00:00 2001 From: Junqiu Lei Date: Wed, 13 Sep 2023 19:10:01 -0700 Subject: [PATCH] Use index pattern id to find page in import_vector_map_tab.spec.js Signed-off-by: Junqiu Lei --- .../import_vector_map_tab.spec.js | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/cypress/integration/plugins/custom-import-map-dashboards/import_vector_map_tab.spec.js b/cypress/integration/plugins/custom-import-map-dashboards/import_vector_map_tab.spec.js index 900955272..9fb5bb5be 100644 --- a/cypress/integration/plugins/custom-import-map-dashboards/import_vector_map_tab.spec.js +++ b/cypress/integration/plugins/custom-import-map-dashboards/import_vector_map_tab.spec.js @@ -14,18 +14,14 @@ describe('Verify the presence of import custom map tab in region map plugin', () cy.deleteAllIndices(); miscUtils.addSampleData(); - cy.visit(`${BASE_PATH}/app/visualize#/`); - - // Click on "Create Visualization" tab - cy.contains('Create visualization').click({ force: true }); - - // Click on "Region Map" icon - cy.contains('Region Map').click({ force: true }); - - // Select index source - opensearch_dashboards_sample_data_flights - cy.contains('opensearch_dashboards_sample_data_flights').click({ - force: true, - }); + // Load region map visualization with sample data opensearch_dashboards_sample_data_flights + cy.visit( + `${BASE_PATH}/app/visualize#/create?type=region_map&indexPattern=d3d7af60-4c81-11e8-b3d7-01146121b73d`, + { + retryOnStatusCodeFailure: true, + timeout: 60000, + } + ); }); it('checks import custom map tab is present', () => {