Summary: | afterEach not called in KohaTable cypress tests | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Test Suite | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | Pushed to oldstable --- | QA Contact: | Pedro Amorim <pedro.amorim> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, pedro.amorim |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: |
25.11.00,25.05.02,24.11.08
|
Circulation function: | |
Bug Depends on: | 40127 | ||
Bug Blocks: | 40170 | ||
Attachments: |
Bug 40168: Restore afterEach in KohaTable Cypress tests
Bug 40168: Remove cleanup() call from afterEach Bug 40168: Restore afterEach in KohaTable Cypress tests Bug 40168: Remove cleanup() call from afterEach Bug 40168: Restore afterEach in KohaTable Cypress tests Bug 40168: Remove cleanup() call from afterEach |
Description
Jonathan Druart
2025-06-18 20:03:57 UTC
Created attachment 183348 [details] [review] Bug 40168: Restore afterEach in KohaTable Cypress tests We defined an anonymous function inside an arrow function, and Cypress does not call it. Test plan: Set AlwaysShowHoldingsTableFilters to "Do not" Run t/cypress/integration/KohaTable/Holdings_spec.ts: yarn cypress run --spec t/cypress/integration/KohaTable/Holdings_spec.ts When done, have a look at the value of AlwaysShowHoldingsTableFilters => without this patch it has been modified (not restored) and is set to "Do" => With this patch applied the original value is restored at the end of the tests (actually the end of each test) Created attachment 183349 [details] [review] Bug 40168: Remove cleanup() call from afterEach Created attachment 183357 [details] [review] Bug 40168: Restore afterEach in KohaTable Cypress tests We defined an anonymous function inside an arrow function, and Cypress does not call it. Test plan: Set AlwaysShowHoldingsTableFilters to "Do not" Run t/cypress/integration/KohaTable/Holdings_spec.ts: yarn cypress run --spec t/cypress/integration/KohaTable/Holdings_spec.ts When done, have a look at the value of AlwaysShowHoldingsTableFilters => without this patch it has been modified (not restored) and is set to "Do" => With this patch applied the original value is restored at the end of the tests (actually the end of each test) Signed-off-by: David Nind <david@davidnind.com> Created attachment 183358 [details] [review] Bug 40168: Remove cleanup() call from afterEach Signed-off-by: David Nind <david@davidnind.com> Created attachment 183865 [details] [review] Bug 40168: Restore afterEach in KohaTable Cypress tests We defined an anonymous function inside an arrow function, and Cypress does not call it. Test plan: Set AlwaysShowHoldingsTableFilters to "Do not" Run t/cypress/integration/KohaTable/Holdings_spec.ts: yarn cypress run --spec t/cypress/integration/KohaTable/Holdings_spec.ts When done, have a look at the value of AlwaysShowHoldingsTableFilters => without this patch it has been modified (not restored) and is set to "Do" => With this patch applied the original value is restored at the end of the tests (actually the end of each test) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> Created attachment 183866 [details] [review] Bug 40168: Remove cleanup() call from afterEach Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> Nice work everyone! Pushed to main for 25.11 Nice work everyone! Pushed to 25.05.x I'm looking at this for 24.11.x but dependencies are deep In reply to Fridolin Somers from comment #9) > I'm looking at this for 24.11.x but dependencies are deep It simply removes - () =>( Pushed to 24.11.x for 24.11.08 |