fix(playwright): resolve flaky E2E tests in lineage and knowledge center - #33307
Conversation
- Fix race condition in KnowledgeCenter utils by waiting for API response after fill - Fix flaky lineage delete-edge test by awaiting modal detach and scene API response - Simplify onboarding dialog check to use isVisible() instead of cookie lookup - Fix flaky ContextCenterArticles test by polling API for editor state and verifying via version history Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
✅ Playwright Results — workflow succeededValidated commit ✅ 1203 passed · ❌ 0 failed · 🟡 3 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 1h 20m 0s ⏱️ Max setup 4m 38s · max shard execution 19m 52s · max shard-job elapsed before upload 23m 24s · reporting 7s 🌐 215.53 requests/attempt · 2.18 app boots/UI scenario · 15.60% common-shard skew Optimization targets still in progress:
🟡 3 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
…rArticles Move response.status() === 200 check out of the waitForResponse filter and assert response.ok() after awaiting, so a non-200 fails fast with a clear error instead of silently timing out. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Code Review ✅ ApprovedFixes flaky Playwright E2E tests in lineage and knowledge center by correcting wait ordering and assertion strategies: OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
I fixed several flaky Playwright E2E tests across the lineage and knowledge center features:
lineage.ts: Fixed flakydeleteEdgehelper by waiting for the confirmation modal to fully detach and the scene API response to complete before proceeding; simplified the onboarding dialog guard from a cookie-lookup to a plainisVisible()check.KnowledgeCenter.ts: Fixed a race condition in the body-update utility by setting up thewaitForResponselistener before callingpage.fill()(previously the response could arrive before the listener was registered).ContextCenterArticles.spec.ts: Rewrote the "other user edit is visible" test to poll the API until the data consumer's editor state is reflected, then verify via the version history panel instead of checking the editor header DOM, making the assertion resilient to UI rendering delays.Type of change:
High-level design:
N/A — small Playwright test fixes with no production code changes.
Tests:
Use cases covered
Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterArticles.spec.tsopenmetadata-ui/src/main/resources/ui/playwright/utils/KnowledgeCenter.tsopenmetadata-ui/src/main/resources/ui/playwright/utils/lineage.tsManual testing performed
UI screen recording / screenshots:
Not applicable — no UI production code changes.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.