https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174
Matt Blenkinsop <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183372|0 |1 is obsolete| | --- Comment #16 from Matt Blenkinsop <[email protected]> --- Created attachment 184103 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184103&action=edit 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 <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
