Skip to content

fix(playwright): fix incorrect selectors in UserCreationWithPersona.spec.ts#27679

Open
harsh-vador wants to merge 4 commits intomainfrom
fix-user-persona-spec
Open

fix(playwright): fix incorrect selectors in UserCreationWithPersona.spec.ts#27679
harsh-vador wants to merge 4 commits intomainfrom
fix-user-persona-spec

Conversation

@harsh-vador
Copy link
Copy Markdown
Contributor

Describe your changes:

What

Fixes a flaky race in the Playwright permanentDeleteUser flow when switching the delete modal from the default Soft Delete option to Hard Delete.

Why

The delete modal opens with Soft Delete pre-selected, but the form’s initialization (setFieldsValue) can still be in-flight. Clicking Hard Delete too early can get clobbered by the init effect, causing intermittent failures.

Also, the earlier test fix used an incorrect selector for the checked soft-delete radio, so the wait was not reliably gating the transition.

How

  • Wait for the checked soft-delete radio to be present before switching:
    • .ant-radio-wrapper-checked [data-testid="soft-delete"]

Notes

Screenshot 2026-04-24 at 10 53 55 AM

Type of change:

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

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • 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.

@harsh-vador harsh-vador self-assigned this Apr 24, 2026
@harsh-vador harsh-vador added the UI UI specific issues label Apr 24, 2026
@harsh-vador harsh-vador requested a review from a team as a code owner April 24, 2026 05:50
@harsh-vador harsh-vador added safe to test Add this label to run secure Github workflows on PRs To release Will cherry-pick this PR into the release branch labels Apr 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 61%
61.94% (61763/99708) 42.06% (33022/78508) 45.09% (9763/21648)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

🔴 Playwright Results — 1 failure(s), 15 flaky

✅ 3957 passed · ❌ 1 failed · 🟡 15 flaky · ⏭️ 86 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 298 0 1 4
🟡 Shard 2 756 0 3 8
🟡 Shard 3 728 0 4 7
🔴 Shard 4 754 1 4 18
🟡 Shard 5 686 0 1 41
🟡 Shard 6 735 0 2 8

Genuine Failures (failed on all attempts)

Pages/Domains.spec.ts › Verify Domain entity API calls do not include invalid domains field in tag assets (shard 4)
TimeoutError: page.goto: Timeout 60000ms exceeded.
Call log:
�[2m  - navigating to "http://localhost:8585/", waiting until "load"�[22m

🟡 15 flaky test(s) (passed on retry)
  • Pages/UserCreationWithPersona.spec.ts › Create user with persona and verify on profile (shard 1, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event is created when description is updated (shard 2, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event shows the actor who made the change (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should start term as Draft when glossary has reviewers (shard 2, 2 retries)
  • Features/SearchExport.spec.ts › Search mode visible export downloads CSV with tab-specific row count (shard 3, 1 retry)
  • Features/UserProfileOnlineStatus.spec.ts › Should show online status badge on user profile for active users (shard 3, 1 retry)
  • Flow/PersonaDeletionUserProfile.spec.ts › User profile loads correctly before and after persona deletion (shard 3, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 3, 1 retry)
  • Pages/CustomProperties.spec.ts › Should search custom properties for apiCollection in right panel (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Verify domain and subdomain asset count accuracy (shard 4, 2 retries)
  • Pages/DomainUIInteractions.spec.ts › Add expert to domain via UI (shard 4, 2 retries)
  • Pages/DomainUIInteractions.spec.ts › Rename data product via UI (shard 4, 1 retry)
  • Pages/EntityDataConsumer.spec.ts › Tier Add, Update and Remove (shard 5, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (shard 6, 1 retry)

📦 Download artifacts

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

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 26, 2026

Code Review ✅ Approved

Corrects erroneous selectors in UserCreationWithPersona.spec.ts to ensure reliable test execution. No issues were found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

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 To release Will cherry-pick this PR into the release branch UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant