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

--- Comment #366 from Paul Derscheid <[email protected]> ---
Created attachment 210737
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210737&action=edit
Bug 41129: (QA follow-up) Make booking e2e specs timezone-independent

The Basic and DatePicker specs failed when the browser ran outside UTC.

- Build booking fixtures as library-day boundaries, like the Timezone spec
- Read the library timezone from $timezone() in beforeEach
- Parse those boundaries in the library timezone instead of using startOf/endOf
- Compare stored booking dates as local dates
- Resolve flatpickr day cells from local dates, not UTC-parsed strings

Test plan:
1. Run the booking e2e specs under a timezone west of UTC, one east of
   UTC, and UTC:
   TZ=America/New_York yarn cypress run --spec
"t/cypress/integration/Circulation/bookingsModal*_spec.ts"
   TZ=Pacific/Auckland yarn cypress run --spec
"t/cypress/integration/Circulation/bookingsModal*_spec.ts"
   TZ=UTC yarn cypress run --spec
"t/cypress/integration/Circulation/bookingsModal*_spec.ts"
2. All 31 tests pass in each run

Assisted-by: Opus 5.5 (Anthropic)
Signed-off-by: Paul Derscheid <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to