diff --git a/t/cypress/integration/Preservation/Trains.ts b/t/cypress/integration/Preservation/Trains.ts index 117614b189..46d5e936d3 100644 --- a/t/cypress/integration/Preservation/Trains.ts +++ b/t/cypress/integration/Preservation/Trains.ts @@ -532,7 +532,7 @@ describe("Trains", () => { cy.get("#barcode").type("bc_1"); cy.intercept("GET", "/api/v1/preservation/waiting-list/items*", []); cy.contains("Submit").click(); - cy.get("div[class='alert alert-warning modal']").contains( + cy.get("div[class='modal']").contains( "Cannot find item with this barcode. It must be in the waiting list." ); cy.get("#close_modal").click(); @@ -632,7 +632,7 @@ describe("Trains", () => { cy.get("#waiting-list").contains("Add to waiting list").click(); cy.get("#barcode_list").type("bc_1\nbc_2"); - cy.contains("Submit").click(); + cy.contains("Save").click(); cy.wait("@get-items"); cy.get("main div[class='alert alert-info']").contains( "2 new items added." @@ -640,9 +640,9 @@ describe("Trains", () => { cy.get("#waiting-list").contains("Add to waiting list").click(); cy.get("#barcode_list").type("bc_1\nbc_2\nbc_3"); - cy.contains("Submit").click(); + cy.contains("Save").click(); cy.wait("@get-items"); - cy.get("main div[class='alert alert-warning modal']").contains( + cy.get("main div[class='modal']").contains( "2 new items added. 1 items not found." ); cy.get("#close_modal").click(); @@ -668,7 +668,7 @@ describe("Trains", () => { }); } ); - cy.contains("Submit").click(); // Select train + cy.get("#add_to_train .approve").click(); train.items = get_train_items().filter( train_item => train_item.item_id == 1 || train_item.item_id == 2 ); diff --git a/t/cypress/integration/Preservation/WaitingList.ts b/t/cypress/integration/Preservation/WaitingList.ts index 0c1eac99bb..804e6fcc0f 100644 --- a/t/cypress/integration/Preservation/WaitingList.ts +++ b/t/cypress/integration/Preservation/WaitingList.ts @@ -76,7 +76,7 @@ describe("WaitingList", () => { }); cy.get("#waiting-list").contains("Add to waiting list").click(); cy.get("#barcode_list").type("bc_1\nbc_2\nbc_3"); - cy.contains("Submit").click(); + cy.get("#add_to_waiting_list .approve").click(); cy.get("main div[class='alert alert-warning']").contains( "Something went wrong: Error: Internal Server Error" ); @@ -95,9 +95,9 @@ describe("WaitingList", () => { ]); cy.get("#waiting-list").contains("Add to waiting list").click(); cy.get("#barcode_list").type("bc_1\nbc_2\nbc_3"); - cy.contains("Submit").click(); + cy.get("#add_to_waiting_list .approve").click(); cy.wait("@get-items"); - cy.get("main div[class='alert alert-warning modal']").contains( + cy.get("main div[class='modal']").contains( "2 new items added. 1 items not found." ); });