Skip to content

Commit

Permalink
Fix intermittent failure in UI Time test (apache#43147)
Browse files Browse the repository at this point in the history
  • Loading branch information
omkar-foss authored Oct 18, 2024
1 parent 7767642 commit 3f52c83
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions airflow/ui/src/components/Time.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ describe("Test Time and TimezoneProvider", () => {
},
);

const samoaTime = screen.getByText(dayjs(now).tz(tz).format(defaultFormat));
const nowTime = dayjs(now);
const samoaTime = screen.getByText(nowTime.tz(tz).format(defaultFormat));

expect(samoaTime).toBeDefined();
expect(samoaTime.title).toEqual(
dayjs().tz("UTC").format(defaultFormatWithTZ),
nowTime.tz("UTC").format(defaultFormatWithTZ),
);
});
});

0 comments on commit 3f52c83

Please sign in to comment.