choo121600 commented on code in PR #64189:
URL: https://github.com/apache/airflow/pull/64189#discussion_r2994448305


##########
airflow-core/src/airflow/ui/tests/e2e/pages/DagCalendarTab.ts:
##########
@@ -115,16 +128,16 @@ export class DagCalendarTab extends BasePage {
 
     const overlay = this.page.getByTestId("calendar-loading-overlay");
 
-    if (await overlay.isVisible().catch(() => false)) {
-      await overlay.waitFor({ state: "hidden", timeout: 120_000 });
+    try {
+      await overlay.waitFor({ state: "hidden", timeout: 10_000 });

Review Comment:
   Would it make sense to switch these to `expect().toBeVisible()` instead of 
`waitFor()`?
   This could make the test more explicit and rely on Playwright’s built-in 
retry + assertion behavior.



##########
airflow-core/src/airflow/ui/tests/e2e/pages/DagCalendarTab.ts:
##########
@@ -115,16 +128,16 @@ export class DagCalendarTab extends BasePage {
 
     const overlay = this.page.getByTestId("calendar-loading-overlay");
 
-    if (await overlay.isVisible().catch(() => false)) {
-      await overlay.waitFor({ state: "hidden", timeout: 120_000 });
+    try {
+      await overlay.waitFor({ state: "hidden", timeout: 10_000 });
+    } catch {
+
     }
 
     await this.page.getByTestId("calendar-grid").waitFor({ state: "visible", 
timeout: 120_000 });
 
-    await this.page.waitForFunction(() => {
-      const cells = document.querySelectorAll('[data-testid="calendar-cell"]');
+    const cells = this.page.getByTestId("calendar-cell");
 
-      return cells.length > 0;
-    });
+    await cells.first().waitFor({ state: "attached", timeout: 120_000 });

Review Comment:
   this too :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to