Skip to content

Commit

Permalink
fix: failed timezone selector UT (#17370)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongjie committed Nov 8, 2021
1 parent b58f94a commit 33a8e87
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,13 @@ describe('TimezoneSelector', () => {
});
expect(select).toBeInTheDocument();
userEvent.click(select);
const selection = await screen.findByTitle('GMT -06:00 (America/Belize)');

const isDaylight = moment('now').isDST();
let findTitle = 'GMT -07:00 (Mountain Standard Time)';
if (isDaylight) {
findTitle = 'GMT -06:00 (Mountain Daylight Time)';
}
const selection = await screen.findByTitle(findTitle);
expect(selection).toBeInTheDocument();
userEvent.click(selection);
expect(selection).toBeVisible();
Expand Down

0 comments on commit 33a8e87

Please sign in to comment.