chen0427ok commented on code in PR #59374:
URL: https://github.com/apache/airflow/pull/59374#discussion_r2730438149


##########
airflow-core/src/airflow/ui/tests/e2e/pages/DagsPage.ts:
##########
@@ -331,8 +606,36 @@ export class DagsPage extends BasePage {
    * Wait for DAG list to be rendered
    */
   private async waitForDagList(): Promise<void> {
-    await 
expect(this.page.locator('[data-testid="dag-id"]').first()).toBeVisible({
-      timeout: 10_000,
-    });
+    // Wait for either card-list, table-list, or empty state to be visible
+    const cardList = this.page.locator('[data-testid="card-list"]');
+    const tableList = this.page.locator('[data-testid="table-list"]');
+    const noDagFound = this.page.locator("text=No Dag found");

Review Comment:
   "Thanks for the feedback!
   
   I've resolved the merge conflicts and updated the tests to be more robust:
   
   Flexible Text Matching: I updated the locator to use a Regex (text=/no dags? 
found/i). This handles both singular ("Dag") and plural ("Dags") forms, as well 
as case sensitivity, preventing future flakiness if the UI text changes.
   
   Trigger Button Fix: I switched from .nth(1) to .last() for the confirmation 
button. This ensures the test correctly targets the modal button even when the 
main page trigger button is icon-only (has no text).
   
   I verified locally that all tests in dags-list.spec.ts are passing now. 
Ready for another look!"



-- 
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