Skip to content

Commit

Permalink
Fixing an issue in snpashot e2e test
Browse files Browse the repository at this point in the history
Signed-off-by: Kshitij Tandon <[email protected]>
  • Loading branch information
tandonks committed Jan 30, 2025
1 parent f3a8ffa commit 92927ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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 });

Expand Down
2 changes: 1 addition & 1 deletion cypress/utils/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
});

Expand Down

0 comments on commit 92927ad

Please sign in to comment.