View | Details | Raw Unified | Return to bug 37812
Collapse All | Expand All

(-)a/t/cypress/integration/Preservation/Trains.ts (-5 / +5 lines)
Lines 532-538 describe("Trains", () => { Link Here
532
        cy.get("#barcode").type("bc_1");
532
        cy.get("#barcode").type("bc_1");
533
        cy.intercept("GET", "/api/v1/preservation/waiting-list/items*", []);
533
        cy.intercept("GET", "/api/v1/preservation/waiting-list/items*", []);
534
        cy.contains("Submit").click();
534
        cy.contains("Submit").click();
535
        cy.get("div[class='alert alert-warning modal']").contains(
535
        cy.get("div[class='modal']").contains(
536
            "Cannot find item with this barcode. It must be in the waiting list."
536
            "Cannot find item with this barcode. It must be in the waiting list."
537
        );
537
        );
538
        cy.get("#close_modal").click();
538
        cy.get("#close_modal").click();
Lines 632-638 describe("Trains", () => { Link Here
632
632
633
        cy.get("#waiting-list").contains("Add to waiting list").click();
633
        cy.get("#waiting-list").contains("Add to waiting list").click();
634
        cy.get("#barcode_list").type("bc_1\nbc_2");
634
        cy.get("#barcode_list").type("bc_1\nbc_2");
635
        cy.contains("Submit").click();
635
        cy.contains("Save").click();
636
        cy.wait("@get-items");
636
        cy.wait("@get-items");
637
        cy.get("main div[class='alert alert-info']").contains(
637
        cy.get("main div[class='alert alert-info']").contains(
638
            "2 new items added."
638
            "2 new items added."
Lines 640-648 describe("Trains", () => { Link Here
640
640
641
        cy.get("#waiting-list").contains("Add to waiting list").click();
641
        cy.get("#waiting-list").contains("Add to waiting list").click();
642
        cy.get("#barcode_list").type("bc_1\nbc_2\nbc_3");
642
        cy.get("#barcode_list").type("bc_1\nbc_2\nbc_3");
643
        cy.contains("Submit").click();
643
        cy.contains("Save").click();
644
        cy.wait("@get-items");
644
        cy.wait("@get-items");
645
        cy.get("main div[class='alert alert-warning modal']").contains(
645
        cy.get("main div[class='modal']").contains(
646
            "2 new items added. 1 items not found."
646
            "2 new items added. 1 items not found."
647
        );
647
        );
648
        cy.get("#close_modal").click();
648
        cy.get("#close_modal").click();
Lines 668-674 describe("Trains", () => { Link Here
668
                });
668
                });
669
            }
669
            }
670
        );
670
        );
671
        cy.contains("Submit").click(); // Select train
671
        cy.get("#add_to_train .approve").click();
672
        train.items = get_train_items().filter(
672
        train.items = get_train_items().filter(
673
            train_item => train_item.item_id == 1 || train_item.item_id == 2
673
            train_item => train_item.item_id == 1 || train_item.item_id == 2
674
        );
674
        );
(-)a/t/cypress/integration/Preservation/WaitingList.ts (-4 / +3 lines)
Lines 76-82 describe("WaitingList", () => { Link Here
76
        });
76
        });
77
        cy.get("#waiting-list").contains("Add to waiting list").click();
77
        cy.get("#waiting-list").contains("Add to waiting list").click();
78
        cy.get("#barcode_list").type("bc_1\nbc_2\nbc_3");
78
        cy.get("#barcode_list").type("bc_1\nbc_2\nbc_3");
79
        cy.contains("Submit").click();
79
        cy.get("#add_to_waiting_list .approve").click();
80
        cy.get("main div[class='alert alert-warning']").contains(
80
        cy.get("main div[class='alert alert-warning']").contains(
81
            "Something went wrong: Error: Internal Server Error"
81
            "Something went wrong: Error: Internal Server Error"
82
        );
82
        );
Lines 95-103 describe("WaitingList", () => { Link Here
95
        ]);
95
        ]);
96
        cy.get("#waiting-list").contains("Add to waiting list").click();
96
        cy.get("#waiting-list").contains("Add to waiting list").click();
97
        cy.get("#barcode_list").type("bc_1\nbc_2\nbc_3");
97
        cy.get("#barcode_list").type("bc_1\nbc_2\nbc_3");
98
        cy.contains("Submit").click();
98
        cy.get("#add_to_waiting_list .approve").click();
99
        cy.wait("@get-items");
99
        cy.wait("@get-items");
100
        cy.get("main div[class='alert alert-warning modal']").contains(
100
        cy.get("main div[class='modal']").contains(
101
            "2 new items added. 1 items not found."
101
            "2 new items added. 1 items not found."
102
        );
102
        );
103
    });
103
    });
104
- 

Return to bug 37812