Skip to content

[2.0] test(ui): port Playwright deflakes from main for nightly flakes - #38434

Merged
ShaileshParmar11 merged 1 commit into
2.0from
ShaileshParmar11/2.0-port-playwright-deflakes
Nov 23, 2026
Merged

ShaileshParmar11 merged 1 commit into
2.0from
ShaileshParmar11/2.0-port-playwright-deflakes

Conversation

@ShaileshParmar11

@ShaileshParmar11 ShaileshParmar11 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes the flaky Playwright tests in the 2.0 nightly #199 runs (PostgreSQL 44968681989, MySQL 44968688028). Each test failed once and passed on retry.

Three of the four already have fixes on main that never reached 2.0. This PR ports those fixes and scopes one unscoped locator.

Test (2.0) Failure in the nightly Cause Fix
LargeGlossaryPerformance.spec.ts:374 drag and drop (MySQL) Confirmation modal never opened The glossary page keeps reflowing after its loaders clear. dragTo with force: true pressed on the row's old position, so no dragstart fired. waitForStableBox on both rows before dragTo. Ported from main 7860a3fbeb8 (#32631).
MetricBulkImportExportEdit.spec.ts:998 async export (MySQL) 60s timeout A finished job auto-opens the tray and unmounts .csv-jobs-tray-launcher, so the unbounded click hung. Accept launcher or popover, then clickUntilVisible(launcher, popover). Ported from main #34914 (31835ec3935), with the .or() wait from the same file on main.
PersonaAIContext.spec.ts:1492 View in Explore link (MySQL) <html> intercepts pointer events, then the option was detached The core Select can detach its option mid-click. selectOptionWithRetry through the expanded trigger. Ported from main #37423 (320f44b9d9b) for this test. It also covers the five identical picks in configures every entity type…, as main #34119 (451b97228da) did.
TableConstraint.spec.ts:59 composite tooltip (PostgreSQL) Strict mode violation: getByRole('tooltip') resolved to 2 elements A leftover "Request Tags" tooltip was still open. Scope the locator: getByRole('tooltip', { name: /Composite unique constraint/ }). Main has the same unscoped line, so there is nothing to port.

New helpers on 2.0:

  • waitForStableBox, in playwright/utils/dragDrop.ts
  • clickUntilVisible, in playwright/utils/waitHelpers.ts

Both are copied from main unchanged. selectOptionWithRetry already existed on 2.0.

Not in this PR:

Type of change:

  • Bug fix

High-level design:

N/A — test-only changes copied from fixes already on main.

Tests:

Use cases covered

  • Glossary term drag-and-drop reorder in a large glossary
  • Metric listing async export opens the jobs tray
  • Persona AI Context rule entity-type selection, and the View in Explore link
  • Table constraint composite-unique tooltip shows on focus and hides on blur

Unit tests

  • Not applicable. Test-only change.

Backend integration tests

  • Not applicable (no backend changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Updated: MetricBulkImportExportEdit.spec.ts, PersonaAIContext.spec.ts, TableConstraint.spec.ts, utils/dragDrop.ts, utils/glossary.ts, utils/waitHelpers.ts
  • Ran locally against a production build of this branch's 2.0 UI (yarn build, served with vite preview and proxied to a local server), with --project=chromium --retries=0. Selected tests:
    • drag and drop for term reordering
    • Admin starts exactly one async export job
    • configures every entity type…
    • View in Explore link href…
    • Table Constraint
  • Results:
    • Single run with setup and teardown: 8 passed.
    • --repeat-each=3: 15 passed, 0 failed.
  • Caveats:
    • The backend was a local main server (4ecb6d5), not a 2.0 build.
    • The Vite dev server is not usable for these pages on 2.0: it loads prosemirror-tables twice ("Duplicate use of selection JSON ID cell"), so the runs used the production build.
  • ESLint reports 0 errors on the changed files; the warnings are in lines this PR doesn't touch. Prettier is clean. generate_playwright_impact_map.py --check reports the map is up to date. tsc:playwright adds no new errors in changed lines.

Manual testing performed

  1. yarn build on this branch, with ${basePath} replaced by / in a copy of dist, served via vite preview with VITE_DEV_SERVER_TARGET=http://localhost:8585.
  2. Ran the five tests above once with dependencies, then three times each without.

UI screen recording / screenshots:

Not applicable — test-only change.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation> — test fix, no issue (skip-pr-checks).
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above — test fix, no issue.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: not applicable.
  • For UI changes: not applicable.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Self-reviewed against REVIEW.md at 792e57fe7b0. No 🔴 or 🟡 findings.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

This PR ports Playwright flake fixes to the 2.0 branch.

  • Glossary term drags wait for both rows to settle.
  • The metrics export check opens the tray in either state.
  • Persona AI Context checks retry entity-type selections.
  • The table constraint check targets the composite tooltip by name.

No actionable issues were found. Tests were not run during this review.

Reviews (1) · Last reviewed commit: "test(ui): port Playwright deflakes from ..." · Reviewed by Greptile

Fixes the four flaky tests in the 2.0 nightly #199 Playwright runs:

- LargeGlossaryPerformance drag and drop: wait for both rows to stop moving
  before dragTo (waitForStableBox, from main 7860a3f / #32631).
- MetricBulkImportExportEdit async export: accept an auto-opened tray and
  retry the launcher click (clickUntilVisible, from main 31835ec / #34914).
- PersonaAIContext entity-type picks: retry through the expanded trigger
  (selectOptionWithRetry, from main 451b972 / #34119 and 320f44b / #37423).
- TableConstraint composite tooltip: scope the tooltip locator by name so a
  leftover tooltip cannot make the role match ambiguous.
@ShaileshParmar11
ShaileshParmar11 requested a review from a team as a code owner November 23, 2026 06:36
@ShaileshParmar11 ShaileshParmar11 added the skip-pr-checks Bypass PR metadata validation check label Nov 23, 2026
@ShaileshParmar11
ShaileshParmar11 requested review from shah-harshit and removed request for a team November 23, 2026 06:36
@ShaileshParmar11
ShaileshParmar11 merged commit ca1a0cd into 2.0 Nov 23, 2026
62 of 63 checks passed
@ShaileshParmar11
ShaileshParmar11 deleted the ShaileshParmar11/2.0-port-playwright-deflakes branch November 23, 2026 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants