Skip to content

fix(test): account for system default persona fallback in Users persona removal e2e - #30732

Merged
ShaileshParmar11 merged 2 commits into
mainfrom
fix-default-persona-users-spec
Aug 1, 2026
Merged

ShaileshParmar11 merged 2 commits into
mainfrom
fix-default-persona-users-spec

Conversation

@harsh-vador

@harsh-vador harsh-vador commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Describe your changes

The Should handle default persona change and removal correctly test in Users.spec.ts fails 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-tag and a checked radio. The final assertions checked for no default-persona-tag anywhere 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:

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

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:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • 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.
  • For UI changes: I attached a screen recording and/or screenshots above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them 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.

  • Locates each user-owned persona by its generated display name.
  • Verifies neither user-owned persona retains the default tag or checked radio after removal.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Users.spec.ts Updates final Playwright assertions to ignore a system-default fallback and validate only the test user's personas.

Reviews (2): Last reviewed commit: "Merge branch 'main' into fix-default-per..." | Re-trigger Greptile

@harsh-vador harsh-vador self-assigned this Jul 31, 2026
@harsh-vador harsh-vador added the safe to test Add this label to run secure Github workflows on PRs label Jul 31, 2026
@harsh-vador
harsh-vador requested a review from a team as a code owner July 31, 2026 05:48
@harsh-vador harsh-vador added the skip-pr-checks Bypass PR metadata validation check label Jul 31, 2026
@github-actions github-actions Bot added the UI UI specific issues label Jul 31, 2026
@github-actions

github-actions Bot commented Jul 31, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 5b50282dec7f3d914102d878031ea057c231e614 in Playwright run 30687952227, attempt 1.

✅ 75 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 3 skipped · 🧰 0 lifecycle flaky

Performance

Blocking 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:

  • Application boot ratio was 1.71 per UI scenario (137 boots / 80 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 75 0 0 3 0 0

📦 Download artifacts

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

@ShaileshParmar11
ShaileshParmar11 added this pull request to the merge queue Aug 1, 2026
Merged via the queue into main with commit 6e48a17 Aug 1, 2026
67 checks passed
@ShaileshParmar11
ShaileshParmar11 deleted the fix-default-persona-users-spec branch August 1, 2026 09:25
@gitar-bot

gitar-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Updates 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.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source

ShaileshParmar11 added a commit that referenced this pull request Aug 2, 2026
…na removal e2e (#30732)

Co-authored-by: Shailesh Parmar <[email protected]>
(cherry picked from commit 6e48a17)
k-anshul pushed a commit to k-anshul/OpenMetadata that referenced this pull request Aug 12, 2026
harsh-vador added a commit that referenced this pull request Aug 18, 2026
…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]>

This branch was previously deployed

1 inactive deployment
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 skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants