diff --git a/cypress/e2e/plugins/index-management-dashboards-plugin/snapshots_spec.js b/cypress/e2e/plugins/index-management-dashboards-plugin/snapshots_spec.js index b8cb8048b..38c77a620 100644 --- a/cypress/e2e/plugins/index-management-dashboards-plugin/snapshots_spec.js +++ b/cypress/e2e/plugins/index-management-dashboards-plugin/snapshots_spec.js @@ -92,6 +92,7 @@ describe("Snapshots", () => { describe("Snapshot can be restored", () => { it("Successfully restores indexes from snapshot", () => { + cy.visit(`${BASE_PATH}/app/${IM_PLUGIN_NAME}#/snapshots`); // Wait for snapshot to be created successfully with a 12sec timeout cy.get(`[data-test-subj="refreshButton"]`, { timeout: 12000 }) .should("be.visible") @@ -124,6 +125,7 @@ describe("Snapshots", () => { describe("Snapshot can be deleted", () => { it("deletes snapshot successfully", () => { + cy.visit(`${BASE_PATH}/app/${IM_PLUGIN_NAME}#/snapshots`); // Select test snapshot cy.get(`[data-test-subj="checkboxSelectRow-test_repo:test_snapshot"]`).check({ force: true }); diff --git a/cypress/utils/commands.js b/cypress/utils/commands.js index 4dd68a224..020849d46 100644 --- a/cypress/utils/commands.js +++ b/cypress/utils/commands.js @@ -98,7 +98,7 @@ Cypress.Commands.add("login", () => { Cypress.Commands.add("deleteAllIndices", () => { cy.log("Deleting all indexes"); - cy.request("DELETE", `${Cypress.env("openSearchUrl")}/index*,sample*,opensearch_dashboards*`); + cy.request("DELETE", `${Cypress.env("openSearchUrl")}/test_index_*,index*,sample*,opensearch_dashboards*`); cy.request("DELETE", `${Cypress.env("openSearchUrl")}/.opendistro-ism*?expand_wildcards=all`); });