Bug 41831 - ERM/Dialog_spec.ts leaves test data in DB
Summary: ERM/Dialog_spec.ts leaves test data in DB
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Jonathan Druart
QA Contact: Nick Clemens (kidclamp)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-02-12 08:53 UTC by Jonathan Druart
Modified: 2026-02-12 14:59 UTC (History)
1 user (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
26.05.00
Circulation function:


Attachments
Bug 41831: Mock POST /packages in Dialog_spec.ts (1.90 KB, patch)
2026-02-12 08:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 41831: Mock POST /packages in Dialog_spec.ts (1.95 KB, patch)
2026-02-12 14:18 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 41831: Mock POST /packages in Dialog_spec.ts (2.00 KB, patch)
2026-02-12 14:37 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2026-02-12 08:53:15 UTC
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: &apos;There are no packages created yet&apos; within the element: &lt;fieldset#resources_relationship.rows&gt; 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.
Comment 1 Jonathan Druart 2026-02-12 08:56:24 UTC
Created attachment 192999 [details] [review]
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: &apos;There are no packages created yet&apos; within the element: &lt;fieldset#resources_relationship.rows&gt; 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
Comment 2 Lucas Gass (lukeg) 2026-02-12 14:18:52 UTC
Created attachment 193010 [details] [review]
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: &apos;There are no packages created yet&apos; within the element: &lt;fieldset#resources_relationship.rows&gt; 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>
Comment 3 Nick Clemens (kidclamp) 2026-02-12 14:37:02 UTC
Created attachment 193012 [details] [review]
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: &apos;There are no packages created yet&apos; within the element: &lt;fieldset#resources_relationship.rows&gt; 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>
Comment 4 Lucas Gass (lukeg) 2026-02-12 14:59:41 UTC
Pushed to main for 26.05.00.

Nice work all!