Skip to content

Improve Playwright test patterns in requiredAction.spec.ts#63447

Merged
choo121600 merged 15 commits intoapache:mainfrom
Desel72:fix/improve-playwright-required-actions-patterns
Mar 19, 2026
Merged

Improve Playwright test patterns in requiredAction.spec.ts#63447
choo121600 merged 15 commits intoapache:mainfrom
Desel72:fix/improve-playwright-required-actions-patterns

Conversation

@Desel72
Copy link
Contributor

@Desel72 Desel72 commented Mar 12, 2026

Replace Playwright anti-patterns with best practices in requiredAction spec and RequiredActionsPage page object.

Changes in RequiredActionsPage.ts:

  • Replace locator('[data-testid="..."]') with getByTestId() (3 occurrences)
  • Replace locator("table tbody tr") with role-based getByRole("row")
  • Remove waitForTimeout(10_000) arbitrary delay after HITL response

Changes in requiredAction.spec.ts:

  • Replace locator('th:has-text("...")') with getByRole("columnheader", { exact: true, name: "..." }) (5 occurrences)
  • Replace manual isVisible() boolean assertions with web-first .or() locator pattern

closes: #63432

@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Mar 12, 2026
@choo121600 choo121600 marked this pull request as draft March 13, 2026 03:22
@choo121600
Copy link
Member

@Desel72 This PR has been converted to draft because it does not yet meet our Pull Request quality criteria.

Issues found:

  • Other failing CI checks: Failing: Additional PROD image tests / Chromium UI e2e tests with PROD image / Chromium UI e2e tests, Additional PROD image tests / Firefox UI e2e tests with PROD image / Firefox UI e2e tests, Additional PROD image tests / WebKit UI e2e tests with PROD image / WebKit UI e2e tests. Run prek run --from-ref main locally to reproduce. See static checks docs.

Note: Your branch is 4 commits behind main. Some check failures may be caused by changes in the base branch rather than by your PR. Please rebase your branch and push again to get up-to-date CI results.

What to do next:

  • The comment informs you what you need to do.
  • Fix each issue, then mark the PR as "Ready for review" in the GitHub UI - but only after making sure that all the issues are fixed.
  • Maintainers will then proceed with a normal review.

Converting a PR to draft is not a rejection — it is an invitation to bring the PR up to the project's standards so that maintainer review time is spent productively. If you have questions, feel free to ask on the Airflow Slack.

Copy link
Member

@choo121600 choo121600 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the CI is failing. Could you take a look?

@Desel72 Desel72 force-pushed the fix/improve-playwright-required-actions-patterns branch from 29202f6 to 1d0b37e Compare March 14, 2026 12:44
@Desel72
Copy link
Contributor Author

Desel72 commented Mar 16, 2026

@choo121600 Sorry for the ping. I’ve tried several times, but the CI tests are still failing. Could you please help me figure out what’s wrong?

@choo121600
Copy link
Member

@choo121600 Sorry for the ping. I’ve tried several times, but the CI tests are still failing. Could you please help me figure out what’s wrong?

Hi! It might help to run the test locally first with:

breeze testing ui-e2e-tests --test-pattern "requiredAction.spec.ts" --browser webkit --workers 2

This usually catches most issues. If it still only fails in CI, checking the CI logs might help identify the cause.

@choo121600
Copy link
Member

Feel free to ask in the Airflow Slack channel(sig-ui-e2e-tests) as well — you might get a faster response there.

https://apache-airflow.slack.com/archives/C0A2QT7UUGP

@Desel72 Desel72 force-pushed the fix/improve-playwright-required-actions-patterns branch 2 times, most recently from d51c252 to 51f16eb Compare March 16, 2026 17:04
@Desel72 Desel72 force-pushed the fix/improve-playwright-required-actions-patterns branch from 51f16eb to 3e0ae41 Compare March 16, 2026 17:47
@Desel72
Copy link
Contributor Author

Desel72 commented Mar 16, 2026

@choo121600 I think the below CI test failure is not related my code change. could you check it?

@Desel72
Copy link
Contributor Author

Desel72 commented Mar 17, 2026

Thank you @choo121600 . All CI test passes now. could you merge this?

@choo121600
Copy link
Member

It looks like there are still a few places where the checklist or Playwright best practices are not fully followed.
Could you take another look?

@Desel72 Desel72 force-pushed the fix/improve-playwright-required-actions-patterns branch from 4e35f57 to 0678473 Compare March 18, 2026 02:28
@Desel72
Copy link
Contributor Author

Desel72 commented Mar 18, 2026

@choo121600 I've updated PR and CI test passes now. could you review again? thank you

@Desel72
Copy link
Contributor Author

Desel72 commented Mar 18, 2026

@choo121600 sorry for tagging but when I test locally, it passes all CI test
image
Could you give me another help? I am really sorry.

@choo121600 choo121600 marked this pull request as ready for review March 19, 2026 04:29
@choo121600
Copy link
Member

Don't worry. the CI failure here is not related to your code changes.
It was fixed in PR #63890

@Desel72
Copy link
Contributor Author

Desel72 commented Mar 19, 2026

@choo121600 Thank you for approving. When will this be merged?

@choo121600
Copy link
Member

Let’s wait until the CI turns green :)

@choo121600 choo121600 merged commit 11bc591 into apache:main Mar 19, 2026
81 checks passed
@choo121600
Copy link
Member

choo121600 commented Mar 19, 2026

@Desel72 Merged!
Thanks for contribution 🙌

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.

E2E: Improve Playwright test patterns in requiredAction.spec.ts

2 participants