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

Pedro Amorim (ammopt) <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Passed QA                   |Failed QA

--- Comment #357 from Pedro Amorim (ammopt) <[email protected]> ---
Hi all, two blockers and a follow-up note.

Setup: apply the patches, then: yarn install && yarn js:build && restart_all

Blocker 1) The booking tests only pass when the machine runs in UTC
A) In KTD: TZ=America/New_York yarn cypress run --component
B) Notice several booking specs fail (BookingCalendar_spec.ts,
BookingPeriodStep_spec.ts, lib/booking/dates-timezone_spec.ts, ...)
C) Run TZ=UTC yarn cypress run --component and notice they all pass
Most failures come from fixtures like new Date("2026-03-10"), which is UTC
midnight (the previous day west of UTC), or assertions hardcoding UTC-midnight
ISO strings. dates-timezone_spec.ts instead catches the DST bug noted below.

Blocker 2) The booking modal can get stuck with all detail selects disabled
If a patron is picked before the bookable items have loaded, the 'Pickup
location', 'Item type' and 'Item' selects stay disabled until the modal is
reopened. The e2e specs pick the patron immediately, so they hit it
intermittently:
A) In KTD: TZ=UTC yarn cypress run --spec
t/cypress/integration/Circulation/bookingsModalTimezone_spec.ts (TZ=UTC keeps
blocker 1 out of the results)
B) Repeat A) a few times
C) Notice a test fails most runs with "expected '<div.v-select ...
vs--disabled>' not to have class 'vs--disabled'", and not always the same test
Cause: changePatron (stores/bookings/workflow.js) aborts the in-flight bookable
items request from initializeSession and never fetches them again. Fetching
them in changePatron when they're still empty fixes it.

Not a blocker, worth a follow-up: a booking starting on a DST change day is
saved a day early when the browser's timezone differs from the library's.
A) Edit item type 'BK', check 'Bookable', click 'Save changes':
http://localhost:8081/cgi-bin/koha/admin/itemtypes.pl?op=add_form&itemtype=BK
B) In Chrome DevTools > Sensors, set 'Timezone ID' to 'America/New_York' (keep
DevTools open)
C) Open http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=1,
click 'Place booking', select patron 'koha', 'Pickup location' 'Centerville',
'Item type' 'Books'
D) Book 7 November 2027 to 10 November 2027, click 'Place booking'
E) Notice the 'Bookings' tab shows it starting on 6 November 2027
toStartOfDayISO/toEndOfDayISO (lib/booking/dates.js) use dayjs.tz(date,
libraryTz).startOf('day'), which depends on the browser's timezone.

-- 
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