Bug 35201

Summary: Cypress tests for the Preservation module are failing
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: fridolin.somers, tomascohen
Version: unspecifiedKeywords: rel_23_11_candidate
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00
Bug Depends on: 30708, 35199    
Bug Blocks:    
Attachments: Bug 35201: (bug 30708 follow-up) Fix Preservation tests
Bug 35201: (bug 30708 follow-up) Fix Preservation/Settings.ts
Bug 35201: (bug 30708 follow-up) Fix Preservation tests
Bug 35201: (bug 30708 follow-up) Fix Preservation/Settings.ts

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 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 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 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 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