Lines 629-641
describe("Trains", () => {
Link Here
|
629 |
{ item_id: 1 }, |
629 |
{ item_id: 1 }, |
630 |
{ item_id: 2 }, |
630 |
{ item_id: 2 }, |
631 |
]); |
631 |
]); |
|
|
632 |
|
632 |
cy.get("#waiting-list").contains("Add to waiting list").click(); |
633 |
cy.get("#waiting-list").contains("Add to waiting list").click(); |
633 |
cy.get("#barcode_list").type("bc_1\nbc_2\nbc_3"); |
634 |
cy.get("#barcode_list").type("bc_1\nbc_2"); |
634 |
cy.contains("Submit").click(); |
635 |
cy.contains("Submit").click(); |
635 |
cy.wait("@get-items"); |
636 |
cy.wait("@get-items"); |
636 |
cy.get("main div[class='dialog message']").contains( |
637 |
cy.get("main div[class='dialog message']").contains( |
637 |
"2 new items added." |
638 |
"2 new items added." |
638 |
); |
639 |
); |
|
|
640 |
|
641 |
cy.get("#waiting-list").contains("Add to waiting list").click(); |
642 |
cy.get("#barcode_list").type("bc_1\nbc_2\nbc_3"); |
643 |
cy.contains("Submit").click(); |
644 |
cy.wait("@get-items"); |
645 |
cy.get("main div[class='dialog alert modal']").contains( |
646 |
"2 new items added. 1 items not found." |
647 |
); |
639 |
cy.contains("Add last 2 items to a train").click(); |
648 |
cy.contains("Add last 2 items to a train").click(); |
640 |
cy.get("#train_id .vs__search").type(train.name + "{enter}"); |
649 |
cy.get("#train_id .vs__search").type(train.name + "{enter}"); |
641 |
cy.intercept("GET", "/api/v1/items*", { |
650 |
cy.intercept("GET", "/api/v1/items*", { |