Bugzilla – Attachment 161635 Details for
Bug 35940
Cypress tests for the Preservation module are failing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35940: (bug 35477 follow-up) Fix cypress tests
Bug-35940-bug-35477-follow-up-Fix-cypress-tests.patch (text/plain), 2.48 KB, created by
Jonathan Druart
on 2024-01-30 13:30:56 UTC
(
hide
)
Description:
Bug 35940: (bug 35477 follow-up) Fix cypress tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-01-30 13:30:56 UTC
Size:
2.48 KB
patch
obsolete
>From fc3e205df4c19b3b0b1033f41517956eb76c0809 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 30 Jan 2024 14:30:31 +0100 >Subject: [PATCH] Bug 35940: (bug 35477 follow-up) Fix cypress tests > >AssertionError: Timed out retrying after 10000ms: Expected to find element: `main div[class='dialog message']`, but never found it. > >We moved from message to alert. >--- > t/cypress/integration/Preservation/Trains.ts | 11 ++++++++++- > t/cypress/integration/Preservation/WaitingList.ts | 4 ++-- > 2 files changed, 12 insertions(+), 3 deletions(-) > >diff --git a/t/cypress/integration/Preservation/Trains.ts b/t/cypress/integration/Preservation/Trains.ts >index 6dda1f78a3d..253864b61f9 100644 >--- a/t/cypress/integration/Preservation/Trains.ts >+++ b/t/cypress/integration/Preservation/Trains.ts >@@ -629,13 +629,22 @@ describe("Trains", () => { > { item_id: 1 }, > { item_id: 2 }, > ]); >+ > cy.get("#waiting-list").contains("Add to waiting list").click(); >- cy.get("#barcode_list").type("bc_1\nbc_2\nbc_3"); >+ cy.get("#barcode_list").type("bc_1\nbc_2"); > cy.contains("Submit").click(); > cy.wait("@get-items"); > cy.get("main div[class='dialog message']").contains( > "2 new items added." > ); >+ >+ 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.wait("@get-items"); >+ cy.get("main div[class='dialog alert modal']").contains( >+ "2 new items added. 1 items not found." >+ ); > cy.contains("Add last 2 items to a train").click(); > cy.get("#train_id .vs__search").type(train.name + "{enter}"); > cy.intercept("GET", "/api/v1/items*", { >diff --git a/t/cypress/integration/Preservation/WaitingList.ts b/t/cypress/integration/Preservation/WaitingList.ts >index 3c12003b372..1b397f7af02 100644 >--- a/t/cypress/integration/Preservation/WaitingList.ts >+++ b/t/cypress/integration/Preservation/WaitingList.ts >@@ -97,8 +97,8 @@ describe("WaitingList", () => { > cy.get("#barcode_list").type("bc_1\nbc_2\nbc_3"); > cy.contains("Submit").click(); > cy.wait("@get-items"); >- cy.get("main div[class='dialog message']").contains( >- "2 new items added." >+ cy.get("main div[class='dialog alert modal']").contains( >+ "2 new items added. 1 items not found." > ); > }); > >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35940
: 161635 |
161699