This is an automated email from the ASF dual-hosted git repository.
bbovenzi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 3f52c83058 Fix intermittent failure in UI Time test (#43147)
3f52c83058 is described below
commit 3f52c830584d9f077b00572d9ff5f54e101c7441
Author: Omkar P <[email protected]>
AuthorDate: Fri Oct 18 18:08:32 2024 +0530
Fix intermittent failure in UI Time test (#43147)
---
airflow/ui/src/components/Time.test.tsx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/airflow/ui/src/components/Time.test.tsx
b/airflow/ui/src/components/Time.test.tsx
index 9e59d96dd4..2b6b26d6a2 100644
--- a/airflow/ui/src/components/Time.test.tsx
+++ b/airflow/ui/src/components/Time.test.tsx
@@ -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),
);
});
});