Bhuvan-08 commented on code in PR #63474:
URL: https://github.com/apache/airflow/pull/63474#discussion_r2971325876


##########
airflow-core/src/airflow/ui/tests/e2e/specs/providers.spec.ts:
##########
@@ -47,24 +47,23 @@ test.describe("Providers Page", () => {
     await providers.waitForLoad();
     // Assert Providers page loaded
     await expect(providers.heading).toBeVisible();
-    expect(await providers.getRowCount()).toBeGreaterThan(0);
+    await expect(providers.rows.first()).toBeVisible();
   });
 
   test("Verify the providers list displays", async () => {
     await expect(providers.table).toBeVisible();
   });
 
   test("Verify package name, version, and description are not blank", async () 
=> {
-    const count = await providers.getRowCount();
-
-    expect(count).toBeGreaterThan(0);
+    await expect(providers.rows.first()).toBeVisible();
 
     for (let i = 0; i < 2; i++) {
-      const { description, packageName, version } = await 
providers.getRowDetails(i);
+      const row = providers.rows.nth(i);
+      const cells = row.locator("td");
 
-      expect(packageName).not.toEqual("");
-      expect(version).not.toEqual("");
-      expect(description).not.toEqual("");
+      await expect(cells.nth(0).locator("a")).not.toBeEmpty();
+      await expect(cells.nth(1)).not.toBeEmpty();
+      await expect(cells.nth(2)).not.toBeEmpty();

Review Comment:
   I removed the static variable extraction because calling textContent() 
instantly grabs the DOM state. If the frontend is slow to render the provider 
data, it pulls an empty string and fails the test instantly. By using await 
expect(locator).not.toBeEmpty(), we leverage Playwright's auto-retrying 
web-first assertions to poll the live DOM element, which should heavily reduce 
CI flakiness.



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