Koha-clms/t/cypress/integration
Jonathan Druart 892df0f0c0
Bug 40174: Allow proper E2E testing with Cypress
This is the first step toward implementing true end-to-end testing with
Cypress.

Until now, we have been mocking responses using cy.intercept(), but this
approach can lead to confusion. In some cases, we have even had to mock
global JavaScript variables, which makes the code unnecessarily complex
and unconventional (e.g. win.categories_map).

All the bug reports listed under this tree have helped lay the
groundwork for this patch. With it, we are able to build mock objects
(via plugin mockData) and insert them directly into the database
(insertData). Once the tests are complete, we’ll restore the database to
its previous state by removing any data generated during the tests.

The tests in KohaTable/Holdings_spec.ts have been updated to leverage
this new setup.

Additionally, a caching mechanism has been added to prevent _id
attributes from being generated with the same values (a rare issue we
occasionally encountered).

While this is still not a perfect solution, it introduces a solid
foundation for future improvements.

Test plan:
All Cypress tests must pass

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2025-07-21 14:01:17 -06:00
..
Acquisitions Bug 38899: Fix cypress tests 2025-06-11 14:02:47 -06:00
Admin Revert "Bug 37917: Add some wait time to RecordSources_spec.ts for the intercepted request responses" 2024-10-11 11:13:48 +02:00
Auth Bug 40170: Replace cypress-mysql with mysql2 - Cypress tests 2025-07-08 15:42:03 -06:00
ERM Bug 40043: Try to prevent Agreements_spec.ts to fail randomly 2025-07-18 11:09:40 -06:00
Islands Bug 40170: Replace cypress-mysql with mysql2 - Cypress tests 2025-07-08 15:42:03 -06:00
KohaTable Bug 40174: Allow proper E2E testing with Cypress 2025-07-21 14:01:17 -06:00
Preservation Bug 37930: Extend new AV logic to the Preservation module 2025-04-25 08:46:57 +02:00
Tools Bug 40046: Use xml and auto-select it 2025-07-07 10:20:26 -06:00
t Bug 40174: Allow proper E2E testing with Cypress 2025-07-21 14:01:17 -06:00
AdditionalFields_spec.ts Bug 37577: (QA follow-up) Tidy 2024-11-08 16:09:19 +01:00
InfiniteScrollSelect_spec.ts
…
Toolbar_spec.ts Bug 38899: Add a cypress test 2025-06-11 14:02:44 -06:00
flatpickr_spec.ts Revert "Bug 37493: [DONT PUSH] Test only - Force test fail" 2024-09-02 17:21:50 +02:00