Skip to content

Test(UI): Add E2E tests for Asset Details#59939

Merged
vatsrahul1001 merged 7 commits intoapache:mainfrom
junaiddshaukat:test/ui-asset-details
Jan 28, 2026
Merged

Test(UI): Add E2E tests for Asset Details#59939
vatsrahul1001 merged 7 commits intoapache:mainfrom
junaiddshaukat:test/ui-asset-details

Conversation

@junaiddshaukat
Copy link
Contributor

This adds Page Object and specs for verifying the Asset Details page, covering producing tasks and consuming DAGs validation.

This PR adds Playwright UI E2E coverage for the Asset Details page.
Adds a page object (AssetsPage) for navigating Assets and asserting details/dependencies.
Adds an E2E spec verifying an asset’s details include producing tasks and scheduled DAGs.
closes: #59930


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Dec 30, 2025
@boring-cyborg
Copy link

boring-cyborg bot commented Dec 30, 2025

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)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: [email protected]
    Slack: https://s.apache.org/airflow-slack

@junaiddshaukat
Copy link
Contributor Author

@vatsrahul1001 Please have a look on this PR, I have tested it well with breeze testing and prek. If need any changes, let me know!

@vatsrahul1001
Copy link
Contributor

junaiddshaukat

@vatsrahul1001 Please have a look on this PR, I have tested it well with breeze testing and prek. If need any changes, let me know!

@junaiddshaukat Thanks for the PR. I will review it soon.

@vatsrahul1001
Copy link
Contributor

@junaiddshaukat Thanks for the PR! A few things to address:

  1. Coordinate with PR Test: Add E2E tests for Assets Page #59990 - Both PRs create different files for assets. Work together to use single AssetsPage.ts

  2. Add beforeAll for data setup - Tests assume asset exists with producing tasks. Add setup to trigger asset_produces_1 DAG and unpause consumer

  3. Fix fragile selectors:

    • label.locator("..") relies on DOM structure
    • .chakra-popover__body is framework-specific
  4. Test naming - Use "verify" prefix without "should"

  5. Remove unused code - assetsTable locator is never used

  6. Refactor duplicate code - verifyProducingTasks and verifyScheduledDags are nearly identical

Let me know if you have questions!

@junaiddshaukat
Copy link
Contributor Author

@vatsrahul1001, Thanks for review. I am working on it will update soon

@vatsrahul1001
Copy link
Contributor

@junaiddshaukat #59990 has been merged. Let's rebase and reuse that

@junaiddshaukat
Copy link
Contributor Author

@junaiddshaukat #59990 has been merged. Let's rebase and reuse that

Sure, I will rebase and resue that and fix this PR. Will update you on it soon. thanks

This adds Page Object and specs for verifying the Asset Details page,
covering producing tasks and consuming DAGs validation.

Signed-off-by: junaiddshaukat <[email protected]>
- Rename AssetsPage to AssetDetailPage for clarity (coordinates with apache#59990)
- Add beforeAll to trigger asset_produces_1 DAG before tests
- Fix fragile selectors (use parent container + ARIA roles)
- Refactor duplicate code into verifyStatSection helper
- Remove unused assetsTable locator
- Rename test to remove 'should' prefix
- Change describe name to 'Asset Details Page'
@junaiddshaukat
Copy link
Contributor Author

Hi @vatsrahul1001, thanks for the detailed review! I've addressed all your feedback:

Changes Made:

  1. Coordinated with PR Test: Add E2E tests for Assets Page #59990 - Renamed AssetsPage.tsAssetDetailPage.ts to clearly distinguish from the merged AssetListPage.ts. Also renamed the test describe to "Asset Details Page".

  2. Added beforeAll for data setup - Added setup that triggers asset_produces_1 DAG and polls for completion before tests run, ensuring asset data exists in CI.

  3. Fixed fragile selectors:

    • Replaced label.locator("..") with label.locator("xpath=./parent::*") + .first()
    • Replaced .chakra-popover__body with getByRole("dialog").getByRole("link")
  4. Test naming - Changed to "verify asset details and dependencies" (removed "should")

  5. Removed unused code - Removed the assetsTable locator

  6. Refactored duplicate code - Created verifyStatSection() helper method used by both verifyProducingTasks() and verifyScheduledDags()

Tests pass locally on Chromium and WebKit. Ready for re-review! Please have a look and if need any furthur changes let me know!

@vatsrahul1001
Copy link
Contributor

Hi @vatsrahul1001, thanks for the detailed review! I've addressed all your feedback:

Changes Made:

  1. Coordinated with PR Test: Add E2E tests for Assets Page #59990 - Renamed AssetsPage.tsAssetDetailPage.ts to clearly distinguish from the merged AssetListPage.ts. Also renamed the test describe to "Asset Details Page".

  2. Added beforeAll for data setup - Added setup that triggers asset_produces_1 DAG and polls for completion before tests run, ensuring asset data exists in CI.

  3. Fixed fragile selectors:

    • Replaced label.locator("..") with label.locator("xpath=./parent::*") + .first()
    • Replaced .chakra-popover__body with getByRole("dialog").getByRole("link")
  4. Test naming - Changed to "verify asset details and dependencies" (removed "should")

  5. Removed unused code - Removed the assetsTable locator

  6. Refactored duplicate code - Created verifyStatSection() helper method used by both verifyProducingTasks() and verifyScheduledDags()

Tests pass locally on Chromium and WebKit. Ready for re-review! Please have a look and if need any furthur changes let me know!

@junaiddshaukat Thanks I will review soon

@vatsrahul1001
Copy link
Contributor

Hi @vatsrahul1001, thanks for the detailed review! I've addressed all your feedback:

Changes Made:

  1. Coordinated with PR Test: Add E2E tests for Assets Page #59990 - Renamed AssetsPage.tsAssetDetailPage.ts to clearly distinguish from the merged AssetListPage.ts. Also renamed the test describe to "Asset Details Page".

  2. Added beforeAll for data setup - Added setup that triggers asset_produces_1 DAG and polls for completion before tests run, ensuring asset data exists in CI.

  3. Fixed fragile selectors:

    • Replaced label.locator("..") with label.locator("xpath=./parent::*") + .first()
    • Replaced .chakra-popover__body with getByRole("dialog").getByRole("link")
  4. Test naming - Changed to "verify asset details and dependencies" (removed "should")

  5. Removed unused code - Removed the assetsTable locator

  6. Refactored duplicate code - Created verifyStatSection() helper method used by both verifyProducingTasks() and verifyScheduledDags()

Tests pass locally on Chromium and WebKit. Ready for re-review! Please have a look and if need any furthur changes let me know!

@junaiddshaukat Thanks I will review soon

Thanks @junaiddshaukat great work here. I see we have created a new spec page for asset, however we already have existing asset spec page I suggest you to add your test in same spec file and reuse the code

junaiddshaukat and others added 2 commits January 26, 2026 21:10
- Add asset.name to testConfig in playwright.config.ts
- Merge asset detail test into existing asset.spec.ts (reuse beforeAll)
- Use testConfig.asset.name instead of hardcoded values
- Remove duplicate assets.spec.ts file
@junaiddshaukat
Copy link
Contributor Author

Hi @vatsrahul1001, thanks for the feedback! I've made the requested changes:

  1. Merged test into existing asset.spec.ts - Added the asset detail test to the existing spec file instead of a separate file

  2. Reusing existing beforeAll - The test now uses the existing beforeAll setup that triggers asset_produces_1

  3. Using config for asset name - Added testConfig.asset.name in playwright.config.ts and updated both the search test and detail test to use it

  4. Removed assets.spec.ts - Deleted the duplicate spec file

The AssetDetailPage.ts page object is still used for the detail page verification methods.

Ready for re-review!

@vatsrahul1001
Copy link
Contributor

Great work @junaiddshaukat, good to be merged

@vatsrahul1001 vatsrahul1001 merged commit 323bc16 into apache:main Jan 28, 2026
77 checks passed
shreyas-dev pushed a commit to shreyas-dev/airflow that referenced this pull request Jan 29, 2026
Add E2E tests for Asset Details

Signed-off-by: junaiddshaukat <[email protected]>
Co-authored-by: Rahul Vats <[email protected]>
shashbha14 pushed a commit to shashbha14/airflow that referenced this pull request Feb 2, 2026
Add E2E tests for Asset Details

Signed-off-by: junaiddshaukat <[email protected]>
Co-authored-by: Rahul Vats <[email protected]>
jason810496 pushed a commit to abhijeets25012-tech/airflow that referenced this pull request Feb 3, 2026
Add E2E tests for Asset Details

Signed-off-by: junaiddshaukat <[email protected]>
Co-authored-by: Rahul Vats <[email protected]>
jhgoebbert pushed a commit to jhgoebbert/airflow_Owen-CH-Leung that referenced this pull request Feb 8, 2026
Add E2E tests for Asset Details

Signed-off-by: junaiddshaukat <[email protected]>
Co-authored-by: Rahul Vats <[email protected]>
choo121600 pushed a commit to choo121600/airflow that referenced this pull request Feb 22, 2026
Add E2E tests for Asset Details

Signed-off-by: junaiddshaukat <[email protected]>
Co-authored-by: Rahul Vats <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI E2E Test || ASSET-002: Verify Asset Details Display

2 participants