Bug 35201 - Cypress tests for the Preservation module are failing
Summary: Cypress tests for the Preservation module are failing
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords: rel_23_11_candidate
Depends on: 30708 35199
Blocks:
  Show dependency treegraph
 
Reported: 2023-10-31 14:03 UTC by Jonathan Druart
Modified: 2024-07-04 20:37 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00
Circulation function:


Attachments
Bug 35201: (bug 30708 follow-up) Fix Preservation tests (6.85 KB, patch)
2023-10-31 14:28 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 35201: (bug 30708 follow-up) Fix Preservation/Settings.ts (1.64 KB, patch)
2023-10-31 14:31 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 35201: (bug 30708 follow-up) Fix Preservation tests (6.85 KB, patch)
2023-10-31 15:12 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 35201: (bug 30708 follow-up) Fix Preservation/Settings.ts (1.64 KB, patch)
2023-10-31 15:12 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2023-10-31 14:03:08 UTC

    
Comment 1 Jonathan Druart 2023-10-31 14:28:42 UTC
Created attachment 158123 [details] [review]
Bug 35201: (bug 30708 follow-up) Fix Preservation tests

We didn't mock the config given the last changes
Comment 2 Jonathan Druart 2023-10-31 14:31:04 UTC
Created attachment 158124 [details] [review]
Bug 35201: (bug 30708 follow-up) Fix Preservation/Settings.ts

We were not correctly mocking the config route from the tests
Comment 3 Tomás Cohen Arazi (tcohen) 2023-10-31 15:12:31 UTC
Created attachment 158135 [details] [review]
Bug 35201: (bug 30708 follow-up) Fix Preservation tests

We didn't mock the config given the last changes
Comment 4 Tomás Cohen Arazi (tcohen) 2023-10-31 15:12:34 UTC
Created attachment 158136 [details] [review]
Bug 35201: (bug 30708 follow-up) Fix Preservation/Settings.ts

We were not correctly mocking the config route from the tests
Comment 5 Tomás Cohen Arazi (tcohen) 2023-10-31 15:20:50 UTC
When I first applied this patches after testing bug 35199, I had the last test fail when running `run_cypress`. After a `reset_all` tests pass and I didn't manage to reproduce the failure.

Conclusion:
- Tests pass
- QA script happy

I'm leaving to someone more familiar with Cypress to review it. I never successfully wrote such tests.
Comment 6 Tomás Cohen Arazi (tcohen) 2023-10-31 19:50:18 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 7 Fridolin Somers 2023-11-02 20:48:39 UTC
Depends on Bug 30708 not in 23.05.x