]> git.koha-community.org Git - koha.git/commit
Bug 32131: Cypress tests are failing if ERMModule is off
authorPedro Amorim <pedro.amorim@ptfs-europe.com>
Sat, 12 Nov 2022 20:32:21 +0000 (19:32 -0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Thu, 17 Nov 2022 16:39:45 +0000 (13:39 -0300)
commit5d794c99cc513da187b1c6af04239907c0898558
treea77500e465de7003be88ab397d433de1c50bb0ce
parent32aceb32d43003432f802ecee1991ef27cd7b88f
Bug 32131: Cypress tests are failing if ERMModule is off

This patch solves this by enabling the system preference before each test,
right after login. It also sets the system preference back to its original
initial value after the tests finish running.

To test:
1) Disable ERMModule system preference
2) Run cypess tests: yarn cypress open / yarn cypress run
3) Verify that tests run successfully
(Optional): While tests are running, visit the system preferences panel and verify that the system preference is now "Enable".
4) Wait for the tests to finish and confirm that the system preference is set back to its original "Disable" value.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
t/cypress/integration/Agreements_spec.ts
t/cypress/integration/Licenses_spec.ts
t/cypress/integration/Packages_spec.ts
t/cypress/integration/Titles_spec.ts
t/cypress/support/commands.js