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 |
); |