Add UI E2E test for DAGs list display#59374
Conversation
|
Need rebase + conflict solving. |
|
@chen0427ok I think we are missing some of testable items in the issue What to test
|
Thanks a lot for the detailed list of testable items! I’ll start working on covering each of them in the E2E tests and will update the PR once they’re ready. |
d26e0b3 to
7a4a28c
Compare
Thank you for the feedback! I've addressed both items: 1. Rebased and Resolved ConflictsSuccessfully rebased onto `upstream/main` and resolved all conflicts: 2. Added All Missing Test Items from Issue #59307Implemented all 4 missing test functionalities: Card/Table View Toggle (`Dags View Toggle`)DAG Search (`Dags Search`)Status Filtering (`Dags Status Filtering`)Sorting (`Dags Sorting`)Code Quality |
f5202e2 to
35bf95b
Compare
choo121600
left a comment
There was a problem hiding this comment.
There seem to be many unnecessary timeouts. I’m not an expert either, so could you explain why they were added?
|
Also, there are a lot of comments for each step, and personally, they feel unnecessary as well. |
|
@chen0427ok Looks like e2e UI test breaking after last change https://github.com/apache/airflow/actions/runs/20329152656/job/58403639820?pr=59374 |
I've updated the test approach to avoid depending on Instead, I'm now using href-based selectors (
The test now passes locally and should work in CI as well. Let me know if you have any questions! |
|
@chen0427ok, static checks are failing. Also, I tried running the test locally from my local and noticed for some of test login is failing with 429(Too many request) As all test running in parallel and doing login we are facing this issue. Did you not noticed this why running entire test suite |
Hi @vatsrahul1001, Apologies for the delayed response - I was caught up with other tasks and didn't see your message immediately. Static ChecksGood news! The static checks are now passing. The latest CI run shows all checks completed successfully:
The previous failures were related to the 429 Rate Limit Issue - My ApologiesYou're absolutely right, and I apologize for not raising this issue proactively. I did encounter the 429 "Too Many Requests" error when running the entire test suite locally, but it was intermittent (flaky) - sometimes tests would pass, sometimes they'd fail with 429. Because of this inconsistency, I didn't realize it was a systematic issue and failed to report it. I should have been more thorough. Thank you for creating PR #59692 to address this! I can see you've implemented Shared Authentication State using Playwright's storage state, which is exactly the approach I was thinking would be ideal:
This will solve the problem systematically for all E2E tests, not just mine. Next StepsOnce PR #59692 is merged, should I:
Please let me know if there's anything else I need to adjust in this PR. Again, apologies for not catching and reporting the 429 issue earlier! Best regards |
@chen0427ok PR #59692 is merged now you should rebase and resolve conflicts |
556ffe4 to
aa17893
Compare
fe58285 to
3ad4aa9
Compare
|
@chen0427ok I noticed a few tests were failing last time. Did you get time to check those? |
Hi @vatsrahul1001, |
d64189f to
9a671bb
Compare
Increases the timeout for the dags-list.spec.ts e2e test to prevent flakiness.
|
@chen0427ok tests are still failing |
I'm currently fixing, it seems like the selector or test-id has been updated. I'll fix it asap! |
… assertion with polling to handle UI rendering timing differences between local and CI environments.
|
@choo121600 can you review one more time on this? |
- Use case-insensitive regex (/no dag/i) for empty state detection to handle singular/plural/casing variations - Add fallback <table> locator in waitForDagList when data-testid attributes are missing - Change confirmButton from .nth(1) to .last() to handle icon-only trigger buttons - Replace waitForTimeout(500) with expect.poll in Dags Sorting test
|
It looks like CI is still failing. You can do this with: |
|
After checking, it seems that this CI failure is not related to your PR 🥲 |
|
Looks good, thanks! |
choo121600
left a comment
There was a problem hiding this comment.
All CI checks have passed, and the tests look good.
Thanks for your hard work!
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
|
@chen0427ok Congrats on your first merged PR. |
Thank you so much for the support and the thorough reviews! I learned a lot from this PR and I'm excited to keep contributing. |
* Fix race conditions in pagination for slower browsers - Add API interception before pagination clicks - Increase timeout from 10s to 30s for Firefox compatibility - Add test.setTimeout(120_000) to pagination and search tests - Improve waitForDagList timeout to 30s Add comprehensive E2E tests for DAGs list page: - Dags List Display: verify list visibility, dag links, dag existence - Dags View Toggle: switch between card and table views - Dags Search: search and clear with race condition handling - Dags Status Filtering: filter by success/failed/running/queued - Dags Sorting: sort by name in card view * fix(tests): Increase timeout for dags-list spec Increases the timeout for the dags-list.spec.ts e2e test to prevent flakiness. * fix(tests): Update E2E test selectors to match current UI * fix(tests): Use expect.poll for flaky Dags Search test Replace direct assertion with polling to handle UI rendering timing differences between local and CI environments. * fix(tests): Handle empty state in waitForDagList to prevent timeout * fix(tests): Harden E2E locators and replace fixed delays with polling - Use case-insensitive regex (/no dag/i) for empty state detection to handle singular/plural/casing variations - Add fallback <table> locator in waitForDagList when data-testid attributes are missing - Change confirmButton from .nth(1) to .last() to handle icon-only trigger buttons - Replace waitForTimeout(500) with expect.poll in Dags Sorting test --------- Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com> Co-authored-by: Yeonguk Choo <choo121600@gmail.com>
* Fix race conditions in pagination for slower browsers - Add API interception before pagination clicks - Increase timeout from 10s to 30s for Firefox compatibility - Add test.setTimeout(120_000) to pagination and search tests - Improve waitForDagList timeout to 30s Add comprehensive E2E tests for DAGs list page: - Dags List Display: verify list visibility, dag links, dag existence - Dags View Toggle: switch between card and table views - Dags Search: search and clear with race condition handling - Dags Status Filtering: filter by success/failed/running/queued - Dags Sorting: sort by name in card view * fix(tests): Increase timeout for dags-list spec Increases the timeout for the dags-list.spec.ts e2e test to prevent flakiness. * fix(tests): Update E2E test selectors to match current UI * fix(tests): Use expect.poll for flaky Dags Search test Replace direct assertion with polling to handle UI rendering timing differences between local and CI environments. * fix(tests): Handle empty state in waitForDagList to prevent timeout * fix(tests): Harden E2E locators and replace fixed delays with polling - Use case-insensitive regex (/no dag/i) for empty state detection to handle singular/plural/casing variations - Add fallback <table> locator in waitForDagList when data-testid attributes are missing - Change confirmButton from .nth(1) to .last() to handle icon-only trigger buttons - Replace waitForTimeout(500) with expect.poll in Dags Sorting test --------- Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com> Co-authored-by: Yeonguk Choo <choo121600@gmail.com>
* Fix race conditions in pagination for slower browsers - Add API interception before pagination clicks - Increase timeout from 10s to 30s for Firefox compatibility - Add test.setTimeout(120_000) to pagination and search tests - Improve waitForDagList timeout to 30s Add comprehensive E2E tests for DAGs list page: - Dags List Display: verify list visibility, dag links, dag existence - Dags View Toggle: switch between card and table views - Dags Search: search and clear with race condition handling - Dags Status Filtering: filter by success/failed/running/queued - Dags Sorting: sort by name in card view * fix(tests): Increase timeout for dags-list spec Increases the timeout for the dags-list.spec.ts e2e test to prevent flakiness. * fix(tests): Update E2E test selectors to match current UI * fix(tests): Use expect.poll for flaky Dags Search test Replace direct assertion with polling to handle UI rendering timing differences between local and CI environments. * fix(tests): Handle empty state in waitForDagList to prevent timeout * fix(tests): Harden E2E locators and replace fixed delays with polling - Use case-insensitive regex (/no dag/i) for empty state detection to handle singular/plural/casing variations - Add fallback <table> locator in waitForDagList when data-testid attributes are missing - Change confirmButton from .nth(1) to .last() to handle icon-only trigger buttons - Replace waitForTimeout(500) with expect.poll in Dags Sorting test --------- Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com> Co-authored-by: Yeonguk Choo <choo121600@gmail.com>
* Fix race conditions in pagination for slower browsers - Add API interception before pagination clicks - Increase timeout from 10s to 30s for Firefox compatibility - Add test.setTimeout(120_000) to pagination and search tests - Improve waitForDagList timeout to 30s Add comprehensive E2E tests for DAGs list page: - Dags List Display: verify list visibility, dag links, dag existence - Dags View Toggle: switch between card and table views - Dags Search: search and clear with race condition handling - Dags Status Filtering: filter by success/failed/running/queued - Dags Sorting: sort by name in card view * fix(tests): Increase timeout for dags-list spec Increases the timeout for the dags-list.spec.ts e2e test to prevent flakiness. * fix(tests): Update E2E test selectors to match current UI * fix(tests): Use expect.poll for flaky Dags Search test Replace direct assertion with polling to handle UI rendering timing differences between local and CI environments. * fix(tests): Handle empty state in waitForDagList to prevent timeout * fix(tests): Harden E2E locators and replace fixed delays with polling - Use case-insensitive regex (/no dag/i) for empty state detection to handle singular/plural/casing variations - Add fallback <table> locator in waitForDagList when data-testid attributes are missing - Change confirmButton from .nth(1) to .last() to handle icon-only trigger buttons - Replace waitForTimeout(500) with expect.poll in Dags Sorting test --------- Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com> Co-authored-by: Yeonguk Choo <choo121600@gmail.com>
* Fix race conditions in pagination for slower browsers - Add API interception before pagination clicks - Increase timeout from 10s to 30s for Firefox compatibility - Add test.setTimeout(120_000) to pagination and search tests - Improve waitForDagList timeout to 30s Add comprehensive E2E tests for DAGs list page: - Dags List Display: verify list visibility, dag links, dag existence - Dags View Toggle: switch between card and table views - Dags Search: search and clear with race condition handling - Dags Status Filtering: filter by success/failed/running/queued - Dags Sorting: sort by name in card view * fix(tests): Increase timeout for dags-list spec Increases the timeout for the dags-list.spec.ts e2e test to prevent flakiness. * fix(tests): Update E2E test selectors to match current UI * fix(tests): Use expect.poll for flaky Dags Search test Replace direct assertion with polling to handle UI rendering timing differences between local and CI environments. * fix(tests): Handle empty state in waitForDagList to prevent timeout * fix(tests): Harden E2E locators and replace fixed delays with polling - Use case-insensitive regex (/no dag/i) for empty state detection to handle singular/plural/casing variations - Add fallback <table> locator in waitForDagList when data-testid attributes are missing - Change confirmButton from .nth(1) to .last() to handle icon-only trigger buttons - Replace waitForTimeout(500) with expect.poll in Dags Sorting test --------- Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com> Co-authored-by: Yeonguk Choo <choo121600@gmail.com>


Description
Implements UI E2E test case DAGS-001 to verify DAGs list displays correctly, as requested in issue #59307.
Changes
dags-list.spec.tswith 3 comprehensive test casesdata-testidselectors as recommended in the E2E Testing READMETest Cases
/dags/{dag_id}example_bash_operator) is presentTest Results
Local Testing Results:
Firefox Issue Details
All Firefox tests fail with the same error:
Root Cause: Firefox browser receives a
404 Not Foundnginx error page when navigating to/auth/login, while Chromium and WebKit successfully load the login page. This appears to be an environment/configuration issue rather than a test code problem, as evidenced by:Screenshots: Test results and Firefox error screenshots are available in

test-results/directory.Follows Contribution Guidelines
data-testidselectors where availableRelated Issue
Closes #59307
Checklist