Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

test(Schedule): the time-direction contract runs in the Schedule's zone on a pinned daylight-saving week (#9236)

Cindy Zhang332dab752b40
diff --git a/packages/lab/src/Schedule/__tests__/ScheduleTimeDirection.a11y.chromium.spec.ts b/packages/lab/src/Schedule/__tests__/ScheduleTimeDirection.a11y.chromium.spec.ts
index 2c0e14f7e2..308a7bcd7e 100644
--- a/packages/lab/src/Schedule/__tests__/ScheduleTimeDirection.a11y.chromium.spec.ts
+++ b/packages/lab/src/Schedule/__tests__/ScheduleTimeDirection.a11y.chromium.spec.ts
@@ -33,6 +33,18 @@ const STORIES = [
const RTL_LOCALE = 'lab-schedule--right-to-left-locale';
let evidence: Evidence;
+
+// The stories build their events from the browser's clock, at fixed hours of
+// the browser's own day and week, and the Schedule shows them in
+// America/Los_Angeles in a 7–19 grid. Run the browser in that zone, so every
+// event lands at its hour in the week the Schedule shows, and pin the clock to
+// the week US daylight saving time ends, so this contract also covers that
+// week, whatever day it runs.
+test.use({timezoneId: 'America/Los_Angeles'});
+const PINNED_NOW = new Date('2026-11-01T10:00:00-08:00');
+test.beforeEach(async ({page}) => {
+ await page.clock.install({time: PINNED_NOW});
+});
test.beforeAll(async () => {
evidence = await startEvidence();
});