Repository navigation
fix(test): account for system default persona fallback in Users persona removal e2e - #30732
Conversation
✅ Playwright Results — workflow succeededValidated commit ✅ 75 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 3 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) 39m 25s ⏱️ Max setup 1m 28s · max shard execution 8m 31s · max shard-job elapsed before upload 11m 34s · reporting 3s 🌐 154.97 requests/attempt · 1.71 app boots/UI scenario · 0.00% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Code Review ✅ ApprovedUpdates the Users persona removal end-to-end test to scope final assertions to the user's own personas, properly accounting for the system default persona fallback. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source |
…na removal e2e (#30732) Co-authored-by: Shailesh Parmar <[email protected]> (cherry picked from commit 6e48a17)
…na removal e2e (open-metadata#30732) Co-authored-by: Shailesh Parmar <[email protected]>
…llback (#31696) * test(e2e): stop persona specs asserting the system default persona fallback Backports the persona-specific parts of #31063, #30699, #30203 and #30732 to 1.13, where these fixes were never cherry-picked. The user default-persona chip renders user.defaultPersona, and the backend resolves an unset user default to the SYSTEM default persona (UserRepository.getDefaultPersona). Two specs asserted the "no default persona" placeholder, which therefore only appears when nothing else has set a system default — global state neither test owns. - PersonaFlow.spec.ts "Set default persona for team": asserts the team persona is not auto-applied (the actual invariant) instead of the placeholder text, with a visibility check first so the negative assertion cannot pass against a chip that never rendered. - Users.spec.ts persona removal: scopes the default-tag and radio assertions to the user's own personas instead of every persona-label in the dropdown. - PersonaFlow.spec.ts "Default persona setting and removal flow": moves the shared module-level UserClass into the describe, adds an afterAll teardown for the user and both personas, and closes the user browser context in a finally, so this describe no longer leaks a system default persona into sibling specs. - persona.ts: waits for the confirmation modal's "Yes" button (the modal testid is on the 0x0 .ant-modal-root wrapper, so toBeVisible always reports hidden) and scopes the response wait to PATCH /api/v1/personas/{id} so an in-flight GET cannot satisfy it. The server-side persona search step present in main is deliberately not backported: it depends on the /api/v1/personas/search endpoint from #30469, which 1.13 does not have. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * test(e2e): require the persona label to render before asserting on it Both negative assertions run against a filtered locator that is allowed to match nothing, so they pass when the fixture persona is absent from the dropdown entirely — the test would go green without ever checking the persona whose default was removed. Assert the label is visible first, matching the guard already used on the default persona chip in PersonaFlow.spec.ts. --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Describe your changes:
Describe your changes
The
Should handle default persona change and removal correctlytest inUsers.spec.tsfails on AUT/Collate nightly runs.After the user removes their personal default persona, Collate seeds a system-wide default persona ("Onboarding System Default Experience") that appears in the profile dropdown as a fallback — carrying a
default-persona-tagand a checked radio. The final assertions checked for nodefault-persona-taganywhere and zero checked radios across the whole dropdown, so the system fallback broke both.Scoped the final assertions to the user's own personas (
persona1/persona2) instead of the entire dropdown list, matching the pattern already applied in #29451 for the sibling "display default persona tag" test. Passes on OSS (no system persona) and Collate (system fallback ignored).Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.Greptile Summary
Narrows the persona-removal E2E assertions to the two personas created for the user, allowing a system-wide default persona to remain selected as a fallback.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Reviews (2): Last reviewed commit: "Merge branch 'main' into fix-default-per..." | Re-trigger Greptile