Uday-Choudhary opened a new pull request, #63971:
URL: https://github.com/apache/airflow/pull/63971

   Improve Playwright test patterns in 
[specs/task-logs.spec.ts](cci:7://file:///Users/udaykumarchoudhary/Desktop/airflow/airflow-core/src/airflow/ui/tests/e2e/specs/task-logs.spec.ts:0:0-0:0)
 and related page objects to align with Playwright Best Practices. 
   
   This PR focuses on improving test patterns only and does not change test 
coverage or behavior.
   
   **Changes included in this PR:**
   - **State-based waiting**: Removed `waitForLoadState("networkidle")` in 
[verifyStateFiltering](cci:1://file:///Users/udaykumarchoudhary/Desktop/airflow/airflow-core/src/airflow/ui/tests/e2e/pages/TaskInstancesPage.ts:47:2-82:3)
 
([TaskInstancesPage.ts](cci:7://file:///Users/udaykumarchoudhary/Desktop/airflow/airflow-core/src/airflow/ui/tests/e2e/pages/TaskInstancesPage.ts:0:0-0:0)),
 relying instead on native `expect().toBeVisible()` checks for specific UI 
rendering.
   - **Web-first assertions**: Converted manual assertions like `expect(await 
rows.count()).toBeGreaterThan(0)` to the recommended web-first assertion: 
`await expect(rows).not.toHaveCount(0)` in 
[TaskInstancesPage.ts](cci:7://file:///Users/udaykumarchoudhary/Desktop/airflow/airflow-core/src/airflow/ui/tests/e2e/pages/TaskInstancesPage.ts:0:0-0:0).
   - **Flaky check fix**: Fixed the "flaky check" in 
[task-logs.spec.ts](cci:7://file:///Users/udaykumarchoudhary/Desktop/airflow/airflow-core/src/airflow/ui/tests/e2e/specs/task-logs.spec.ts:0:0-0:0)
 by explicitly ensuring that `logItems.first()` has rendered and is visible 
before running regex checks against the content of the `virtualizedList` 
component.
   - **Enable Spec**: Removed 
[task-logs.spec.ts](cci:7://file:///Users/udaykumarchoudhary/Desktop/airflow/airflow-core/src/airflow/ui/tests/e2e/specs/task-logs.spec.ts:0:0-0:0)
 from the `testIgnore` array in 
[playwright.config.ts](cci:7://file:///Users/udaykumarchoudhary/Desktop/airflow/airflow-core/src/airflow/ui/playwright.config.ts:0:0-0:0).
   
   closes: #63964
   related: #63036
   
   


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