Skip to content

fix(test): flaky persona / task filter spec failure#27880

Merged
chirag-madlani merged 4 commits intomainfrom
fix-flaky-pw-tests
May 4, 2026
Merged

fix(test): flaky persona / task filter spec failure#27880
chirag-madlani merged 4 commits intomainfrom
fix-flaky-pw-tests

Conversation

@chirag-madlani
Copy link
Copy Markdown
Collaborator

Describe your changes:

PersonaFlow.spec.ts

  • We had default Persona failing causing org level default persona set which cause issue with team persona flow as deafult org get's priority

CustomizeWidget.spec.ts

  • Task filter tries to filter before the task gets loaded

I worked on ... because ...

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

Copilot AI review requested due to automatic review settings May 4, 2026 06:01
@chirag-madlani chirag-madlani requested a review from a team as a code owner May 4, 2026 06:01
@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels May 4, 2026
@chirag-madlani chirag-madlani added the To release Will cherry-pick this PR into the release branch label May 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Improves Playwright E2E test stability around persona defaulting and widget filter timing to reduce flaky spec failures in the UI test suite.

Changes:

  • Added an afterAll teardown to delete the user and personas created for the “default persona” flow.
  • Added a pre-check in the “Activity Feed Widget” test to ensure task cards are present before running widget filter assertions.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaFlow.spec.ts Adds teardown cleanup for entities created during the default persona flow to avoid cross-test interference.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/CustomizeWidgets.spec.ts Adds a guard before applying Activity Feed widget filters to avoid filtering before content loads.

Comment on lines +315 to +319
await Promise.all([
user.delete(apiContext),
persona1.delete(apiContext),
persona2.delete(apiContext),
]);
await test.step('Test widget filters', async () => {
await waitForAllLoadersToDisappear(page);
await waitForAllLoadersToDisappear(page, 'entity-list-skeleton');
expect(await page.getByTestId('task-feed-card').count()).toBeGreaterThan(0);
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 62%
62.45% (62922/100755) 42.77% (33911/79285) 45.77% (10035/21924)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

🟡 Playwright Results — all passed (14 flaky)

✅ 3985 passed · ❌ 0 failed · 🟡 14 flaky · ⏭️ 86 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 298 0 1 4
🟡 Shard 2 747 0 7 8
🟡 Shard 3 744 0 3 7
🟡 Shard 4 774 0 1 18
✅ Shard 5 687 0 0 41
🟡 Shard 6 735 0 2 8
🟡 14 flaky test(s) (passed on retry)
  • Features/DataAssetRulesDisabled.spec.ts › Verify the SearchIndex Service entity item action after rules disabled (shard 1, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event is created when description is updated (shard 2, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event shows the actor who made the change (shard 2, 1 retry)
  • Features/DataQuality/TestCaseImportExportE2eFlow.spec.ts › Admin: Complete export-import-validate flow (shard 2, 1 retry)
  • Features/DataQuality/TestCaseImportExportE2eFlow.spec.ts › EditAll User: Complete export-import-validate flow (shard 2, 1 retry)
  • Features/DataQuality/TestCaseResultPermissions.spec.ts › User with TEST_CASE.EDIT_ALL can see edit action on test case (shard 2, 1 retry)
  • Features/DataQuality/TestCaseResultPermissions.spec.ts › User with only VIEW cannot PATCH results (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should display correct status badge color and icon (shard 2, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Features/SearchExport.spec.ts › Browse mode visible export downloads CSV with current page row count (shard 3, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 3, 1 retry)
  • Pages/Domains.spec.ts › Subdomain rename does not affect parent domain and updates nested children (shard 4, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

Copilot AI review requested due to automatic review settings May 4, 2026 10:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented May 4, 2026

Code Review ✅ Approved 1 resolved / 1 findings

Stabilizes Persona and task filter specs by adding missing await assertions on task feed cards. No issues found.

✅ 1 resolved
Edge Case: Missing await on expect assertion for task feed cards

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/CustomizeWidgets.spec.ts:206
At line 206, expect(await page.getByTestId('task-feed-card').count()).toBeGreaterThan(0) uses a raw expect without await. This performs a one-shot check: if no task cards are rendered yet (e.g., async data still arriving after loaders disappear), the assertion will fail immediately rather than retrying. Using Playwright's web-first assertion with await expect(page.getByTestId('task-feed-card').first()).toBeVisible() would auto-retry for up to the configured timeout, making it more resilient to timing variations — which is the whole purpose of this fix.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 4, 2026

@chirag-madlani chirag-madlani enabled auto-merge (squash) May 4, 2026 15:22
@chirag-madlani chirag-madlani merged commit d14cb87 into main May 4, 2026
47 checks passed
@chirag-madlani chirag-madlani deleted the fix-flaky-pw-tests branch May 4, 2026 15:42
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Failed to cherry-pick changes to the 1.13 branch.
Please cherry-pick the changes manually.
You can find more details here.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

Failed to cherry-pick changes to the 1.12.7 branch.
Please cherry-pick the changes manually.
You can find more details here.

Rohit0301 pushed a commit to mohitjeswani01/OpenMetadata that referenced this pull request May 4, 2026
)

* fix(test): flaky persona / task filter spec failure

* fix wait for task card

* fix checkstyle

* fix for task filter widget
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs To release Will cherry-pick this PR into the release branch UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants