Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/react-aria-components/test/Calendar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,10 @@ describe('Calendar', () => {
expect(grids).toHaveLength(2);

let formatter = new Intl.DateTimeFormat('en-US', {month: 'long', year: 'numeric'});
expect(grids[0]).toHaveAttribute('aria-label', 'Appointment date, ' + formatter.format(new Date()));
expect(grids[1]).toHaveAttribute('aria-label', 'Appointment date, ' + formatter.format(today(getLocalTimeZone()).add({months: 1}).toDate(getLocalTimeZone())));
let firstMonth = new CalendarDate(2026, 4, 1);
let tz = getLocalTimeZone();
expect(grids[0]).toHaveAttribute('aria-label', 'Appointment date, ' + formatter.format(firstMonth.toDate(tz)));
expect(grids[1]).toHaveAttribute('aria-label', 'Appointment date, ' + formatter.format(firstMonth.add({months: 1}).toDate(tz)));

let headings = container.querySelectorAll('.react-aria-CalendarHeading');
expect(headings).toHaveLength(2);
Expand Down
6 changes: 4 additions & 2 deletions packages/react-aria-components/test/RangeCalendar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,10 @@ describe('RangeCalendar', () => {
expect(grids).toHaveLength(2);

let formatter = new Intl.DateTimeFormat('en-US', {month: 'long', year: 'numeric'});
expect(grids[0]).toHaveAttribute('aria-label', 'Trip dates, ' + formatter.format(new Date()));
expect(grids[1]).toHaveAttribute('aria-label', 'Trip dates, ' + formatter.format(today(getLocalTimeZone()).add({months: 1}).toDate(getLocalTimeZone())));
let firstMonth = new CalendarDate(2026, 4, 1);
let tz = getLocalTimeZone();
expect(grids[0]).toHaveAttribute('aria-label', 'Trip dates, ' + formatter.format(firstMonth.toDate(tz)));
expect(grids[1]).toHaveAttribute('aria-label', 'Trip dates, ' + formatter.format(firstMonth.add({months: 1}).toDate(tz)));

let headings = container.querySelectorAll('.react-aria-CalendarHeading');
expect(headings).toHaveLength(2);
Expand Down
Loading