https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40174

Martin Renvoize (ashimema) <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #184103|0                           |1
        is obsolete|                            |
 Attachment #184104|0                           |1
        is obsolete|                            |
 Attachment #184105|0                           |1
        is obsolete|                            |
 Attachment #184106|0                           |1
        is obsolete|                            |
 Attachment #184107|0                           |1
        is obsolete|                            |
 Attachment #184108|0                           |1
        is obsolete|                            |
 Attachment #184195|0                           |1
        is obsolete|                            |

--- Comment #23 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 184327
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184327&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]>
Signed-off-by: Martin Renvoize <[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/

Reply via email to