Skip to content

Commit

Permalink
fix(TimezoneSelector): Failing unit tests due to timezone change (apa…
Browse files Browse the repository at this point in the history
  • Loading branch information
geido authored and nyohasstium committed Jan 2, 2025
1 parent 720be5e commit aaafee8
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,9 @@ test('render timezones in correct order for standard time', async () => {
await waitForElementToBeRemoved(() => screen.queryByLabelText('Loading'));
openSelectMenu();
const options = await getSelectOptions();
expect(options[0]).toHaveTextContent('GMT -04:00 (Eastern Daylight Time)');
expect(options[0]).toHaveTextContent('GMT -05:00 (Eastern Standard Time)');
expect(options[1]).toHaveTextContent('GMT -11:00 (Pacific/Pago_Pago)');
expect(options[2]).toHaveTextContent('GMT -10:00 (Hawaii Standard Time)');
expect(options[3]).toHaveTextContent('GMT -09:30 (Pacific/Marquesas)');
});

test('can select a timezone values and returns canonical timezone name', async () => {
Expand All @@ -119,8 +118,8 @@ test('can select a timezone values and returns canonical timezone name', async (

const searchInput = screen.getByRole('combobox');
// search for mountain time
await userEvent.type(searchInput, 'mou', { delay: 10 });
const findTitle = 'GMT -06:00 (Mountain Daylight Time)';
await userEvent.type(searchInput, 'mou');
const findTitle = 'GMT -07:00 (Mountain Standard Time)';
const selectOption = await screen.findByTitle(findTitle);
userEvent.click(selectOption);
expect(onTimezoneChange).toHaveBeenCalledTimes(1);
Expand Down

0 comments on commit aaafee8

Please sign in to comment.