-
Notifications
You must be signed in to change notification settings - Fork 16.4k
test(e2e): verify DAG code is displayed in Code tab #59744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
test(e2e): verify DAG code is displayed in Code tab #59744
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
|
Thanks for the PR @Coding-Alchemist-Abhijay, I will review it soon. |
thanks @vatsrahul1001 ! Looking forward to solve more issues! |
|
Thanks for PR🙌 |
Hi @choo121600 , I hope you’re doing well. I ran into some issues while trying to run the tests locally on my Windows machine, so I switched to GitHub Codespaces. Unfortunately, I encountered similar difficulties there as well, which is why I wasn’t able to successfully run the tests locally for this PR. As I’m still new to open-source contributions, I’m in the process of learning the project’s setup and testing workflow. I kindly request a bit of time to debug the environment issues, fix them, and re-run the tests locally before updating the PR. Thank you for your patience and understanding. |
|
If you’re a Windows user, you can follow the instructions in this section to get set up😉 |
airflow-core/src/airflow/ui/tests/e2e/specs/dag-code-tab.spec.ts
Outdated
Show resolved
Hide resolved
airflow-core/src/airflow/ui/tests/e2e/specs/dag-code-tab.spec.ts
Outdated
Show resolved
Hide resolved
airflow-core/src/airflow/ui/tests/e2e/specs/dag-code-tab.spec.ts
Outdated
Show resolved
Hide resolved
airflow-core/src/airflow/ui/tests/e2e/specs/dag-code-tab.spec.ts
Outdated
Show resolved
Hide resolved
|
@Coding-Alchemist-Abhijay did you get a chance to fix the review comment? |
…mist-Abhijay/airflow into ui-e2e-dag-code-tab
Hi @vatsrahul1001 , I tried my best to cleanly address and fix all the review comments you mentioned (removing explicit login due to auth sharing, avoiding non-existent selectors, following the page object pattern, and adding a proper assertion for DAG code visibility. I spent some time trying to run the UI E2E tests locally so I could properly validate and debug the failure around From reviewing the behavior and the UI implementation, the failure does not seem to be with the Code tab itself, but rather with the selector. getByRole("tab", { name: "Code" }) relies on ARIA roles and accessible names, which may not be immediately available or consistent during initial render/hydration. Because of that, the selector can fail even when the Code tab is visibly present and functional in the UI. Being able to run Airflow locally would have allowed me to confirm the exact timing/ARIA behavior and adjust the selector accordingly, but I wasn’t able to get a working local setup despite several attempts. I’m still learning the Airflow + Breeze workflow on Windows, and I apologize for the delay this caused. If you have suggestions on how best to handle or stabilize the getByRole("tab", { name: "Code" }) selector in this context, I’d really appreciate the guidance and will be happy to update the test accordingly. Thanks for your patience and for the review. |
@Coding-Alchemist-Abhijay Thanks for fixes. I have added review comments that should help with your concerns Also I see some tests are missing
|
airflow-core/src/airflow/ui/tests/e2e/specs/dag-code-tab.spec.ts
Outdated
Show resolved
Hide resolved
airflow-core/src/airflow/ui/tests/e2e/specs/dag-code-tab.spec.ts
Outdated
Show resolved
Hide resolved
|
@Coding-Alchemist-Abhijay can you take a look at failing tests |
Yeah i am constantly looking at the error logs from time to time and trying to fix it ! |
…mist-Abhijay/airflow into ui-e2e-dag-code-tab
|
For the comments, you may mark the ones that have already been addressed as resolved. |
Ok i will take care from next Time .. |
|
@Coding-Alchemist-Abhijay tests are failing can you have a look? |
…mist-Abhijay/airflow into ui-e2e-dag-code-tab
@Coding-Alchemist-Abhijay how are we progressing on this? |
Hi @vatsrahul1001 , Apologies for the delay — I was tied up with a hackathon over the past few days. I’m back now and actively working on this again. I’m consistently reviewing the CI failures and pushing fixes to address them. Thanks for your patience, and I appreciate your continued guidance on this PR. |
Thanks @Coding-Alchemist-Abhijay I will review soon |
What this PR does
This PR adds an end-to-end (E2E) Playwright test to verify that the DAG source
code is correctly displayed in the Code tab on the DAG detail page.
The test logs in, navigates to a DAG detail view, opens the Code tab, and asserts
that the DAG code container is visible and rendered. This helps prevent UI
regressions related to DAG code rendering in the Airflow UI.
Related issue
Closes #59546