Bugzilla – Attachment 193012 Details for
Bug 41831
ERM/Dialog_spec.ts leaves test data in DB
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41831: Mock POST /packages in Dialog_spec.ts
Bug-41831-Mock-POST-packages-in-Dialogspects.patch (text/plain), 2.00 KB, created by
Nick Clemens (kidclamp)
on 2026-02-12 14:37:02 UTC
(
hide
)
Description:
Bug 41831: Mock POST /packages in Dialog_spec.ts
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2026-02-12 14:37:02 UTC
Size:
2.00 KB
patch
obsolete
>From 349435dedee36ac5e46d034830366876c3eff54b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 12 Feb 2026 09:53:29 +0100 >Subject: [PATCH] Bug 41831: Mock POST /packages in Dialog_spec.ts > >ERM/Titles_spec.ts fails if run after ERM/Dialog_spec.ts because Dialog's "...created!" test create a package and does not delete it. > >02:48:52 koha-1 | <failure message="Timed out retrying after 10000ms: Expected to find content: 'There are no packages created yet' within the element: <fieldset#resources_relationship.rows> but never did." type="AssertionError"><![CDATA[AssertionError: Timed out retrying after 10000ms: Expected to find content: 'There are no packages created yet' within the element: <fieldset#resources_relationship.rows> but never did. > >Test plan: >0. Do not apply the patch >1. yarn cypress run --spec t/cypress/integration/ERM/Dialog_spec.ts,t/cypress/integration/ERM/Titles_spec.ts >=> FAIL >2. Notice that one entry has been created in the DB table erm_eholdings_packages >3. Delete the DB entry: > sudo koha-mysql kohadev -e 'DELETE FROM erm_eholdings_packages' >4. Apply this patch >5. Repeat 1 >=> SUCCESS >6. Notice that no new entry has been created in erm_eholdings_packages > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > t/cypress/integration/ERM/Dialog_spec.ts | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/t/cypress/integration/ERM/Dialog_spec.ts b/t/cypress/integration/ERM/Dialog_spec.ts >index ef3dc906d09..417228a1147 100644 >--- a/t/cypress/integration/ERM/Dialog_spec.ts >+++ b/t/cypress/integration/ERM/Dialog_spec.ts >@@ -90,6 +90,10 @@ describe("Dialog operations", () => { > { force: true } > ); > >+ cy.intercept("POST", "/api/v1/erm/eholdings/local/packages", { >+ statusCode: 201, >+ body: erm_package, >+ }); > cy.intercept( > "GET", > "/api/v1/erm/eholdings/local/packages/*", >-- >2.39.5
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 41831
:
192999
|
193010
| 193012