Repository navigation
fix(test): persona spec for AUTs - #30203
Conversation
❌ 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 |
Code Review ✅ ApprovedUpdates persona specification tests by adding retry logic and page reloads to handle eventual consistency, ensuring robust navigation and verification during AUT execution. 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 |
| await page.reload(); | ||
| await waitForAllLoadersToDisappear(page); | ||
| } |
There was a problem hiding this comment.
Reload Wait Misses Profile Data
When a reload finishes before the profile request renders its result, waitForAllLoadersToDisappear can return as soon as no loader is present. The loop then uses immediate isVisible() probes and may consume all three attempts before either persona state appears, causing the final empty-state assertion to fail even though deletion completed correctly.
Context Used: CLAUDE.md (source)
🟡 Playwright Results — all passed (1 flaky)✅ 14 passed · ❌ 0 failed · 🟡 1 flaky · ⏭️ 0 skipped
🟡 1 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 |
…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:
Fixes #
I worked on ... because ...
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.Summary by Gitar
PersonaDeletionUserProfile.spec.tsto handle eventual consistency when checking for deleted persona visibility.PersonaDeletionUserProfile.spec.tsto ensure data synchronization.redirectToHomePagecall inPersonaFlow.spec.tsto correctly navigate after default persona verification.This will update automatically on new commits.
Greptile Summary
This PR adjusts the Playwright persona flows to handle refreshed application state. The main changes are:
Confidence Score: 5/5
This looks safe to merge after a small test-stability cleanup.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaDeletionUserProfile.spec.ts
Important Files Changed
Reviews (1): Last reviewed commit: "fix(test): persona spec for AUTs" | Re-trigger Greptile
Context used (3)