Repository navigation
test(ui): suppress landing welcome banner at source, remove dismiss helpers - #31853
Conversation
The Playwright removeLandingBanner helper waited up to 5000ms for the welcome-screen close button. For storageState sessions the banner never renders (auth.setup records the user in the `loggedInUsers` localStorage key that gates it), so that call always ran out the full timeout — 5s of dead wait per invocation across many specs. Only specs that log in a freshly created user on a new context actually show the banner, and it paints shortly after currentUser resolves, so a bounded wait is still needed. Reduce the timeout from 5000ms to 2000ms, which comfortably covers the fresh-login case while cutting the wasted wait everywhere else. No test asserts on the banner. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
❌ 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 |
Follow-up to the timeout reduction: eliminate the welcome-banner dismiss dance entirely instead of waiting on it. The landing page renders the welcome banner only when the logged-in user's `name` is absent from the `loggedInUsers` localStorage key (MyDataPage.component.tsx). storageState sessions already have it seeded (auth.setup logs each user in, which records them), which is why the old removeLandingBanner waitFor always ran out its full timeout — it waited on an element that never appears. Only specs that log in a freshly created UserClass on a new context actually rendered the banner. Seed `loggedInUsers` in UserClass.login() via addInitScript, before the first navigation (mirroring disableEtagConditionalReads). The seeded name equals the app's currentUser.name — responseData.name for a created user, the email local-part for a pure login such as admin — so the banner never renders for any session. With the banner suppressed at the source, the reactive dismissals are dead code and are removed: - delete removeLandingBanner (common.ts) and all ~27 call sites - delete closeWelcomeScreenIfVisible and its inline blocks (searchRBAC.ts) - delete the inline dismiss block in entity.ts Tour.spec.ts keeps its own conditional guards: that suite drives the welcome/tour flow directly and the guards are harmless no-ops now. No test asserts on the welcome banner. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
✅ Playwright Results — workflow succeededValidated commit ✅ 729 passed · ❌ 0 failed · 🟡 3 flaky · ⏭️ 0 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) 26m 24s ⏱️ Max setup 5m 29s · max shard execution 17m 0s · max shard-job elapsed before upload 20m 37s · reporting 7s 🌐 221.78 requests/attempt · 2.80 app boots/UI scenario · 15.78% common-shard skew Optimization targets still in progress:
🟡 3 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 |
The welcome-banner suppression seeds `loggedInUsers` in UserClass.login,
which hid the banner for every session. But the "Tour should work from
welcome screen" test enters the tour by clicking the banner's own CTA
("Take a product tour to get started!", rendered only in
WelcomeScreen.component.tsx), so suppressing the banner broke it.
Add a `suppressWelcomeScreen` login option (default true, so every other
spec keeps the suppression) and forward it through AdminClass. Tour.spec
logs in with `suppressWelcomeScreen: false` so the banner renders; its
other tests keep their existing "dismiss if visible" guards.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…31904) changeTermHierarchyFromModal waited on [data-testid="change-parent-hierarchy-modal"] itself. ChangeParentHierarchy passes that testid to Ant's <Modal>, which spreads it onto .ant-modal-root — a position: fixed, zero-size container whose children carry the layout. Playwright requires a non-empty bounding box, so that element is never visible, open or closed, and the assertion could only ever fail: 19 x locator resolved to <div class="ant-modal-root" data-testid="change-parent-hierarchy-modal">...</div> - unexpected value "hidden" while the trace screenshot shows the dialog plainly open. The code this replaced asserted [role="dialog"], which does have a box. Keep the scoping — the bare 'Select Parent' label also matches the control of a hierarchy modal an earlier step left in the DOM — but hang it off the dialog inside the root. Deterministic failure across 5 call sites: GlossaryHierarchy x3, Glossary x2. Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…aling once waitForLandingPageWidget revealed the widget once and then handed off to expect(widget).toBeVisible(). A deferred slot only mounts its widget when it is scrolled into view, and toBeVisible cannot scroll — so whenever the layout attached after that single reveal, revealLandingPageWidget found nothing to scroll, the widget never mounted, and the assertion spent its full 15s on an element that was never going to appear. Seen in AUT run 32513179631: DomainDataProductsWidgets 'Assign Widgets' saved the layout, got the success toast, navigated to /my-data, and the trace then shows only two zero-count queries and no scroll step before the timeout. The persona docStore document fetched by that same page load contained both KnowledgePanel.Domains and KnowledgePanel.DataProducts with a 200, so the layout was saved and served correctly — only the reveal raced. Poll isLandingPageWidgetVisible, which re-reveals on every iteration and is already used this way elsewhere in this file. A widget that is genuinely absent still fails, at the poll timeout rather than instantly. Co-Authored-By: Claude Opus 5 <[email protected]>
Code Review ✅ ApprovedSuppresses the landing welcome banner at the source by seeding loggedInUsers during Playwright login and removes obsolete dismiss helpers. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Description
The Playwright
removeLandingBannerhelper waited up to 5000ms for the welcome-screen close button on many specs. That wait was almost always wasted: forstorageStatesessions the welcome banner never renders —auth.setup.tslogs each user in, which lands on/my-dataand records the user in theloggedInUserslocalStorage key that gates the banner (MyDataPage.component.tsx), and that state is captured into every.auth/*.json. So thewaitForran out its full timeout waiting on an element that never appears.Only specs that log in a freshly created
UserClasson a new context (e.g.DomainDataProductsWidgets,CustomizeLandingPage,CustomizeWidgets,CuratedAssets) actually render the banner.Fix: suppress at the source
Seed
loggedInUsersinUserClass.login()viaaddInitScript, before the first navigation (mirroring the existingdisableEtagConditionalReadsopt-out). The seeded value equals the app'scurrentUser.name:responseData.namefor a created user (verified: both derive from the same server-side Username),admin).With the banner suppressed for every session, the reactive dismissals are dead code and are removed:
removeLandingBanner(common.ts) + all ~27 call sitescloseWelcomeScreenIfVisible+ its inline blocks (searchRBAC.ts)entity.tsTour.spec.tskeeps its own conditional guards — that suite drives the welcome/tour flow directly and the guards are harmless no-ops now. No test asserts on the welcome banner.Type of change
Tests
Playwright-only; no product code changed. Static checks on all changed files: 0 ESLint errors, 0 new
tscerrors (two pre-existingTS6133inentity.tsare unrelated, just line-shifted), prettier clean.Behavioral validation must come from the Playwright CI run. Watch the fresh-login specs specifically — they exercise the new source suppression:
DomainDataProductsWidgets,CustomizeLandingPage,CustomizeWidgets,CuratedAssets, plus the search-RBAC and activity-feed suites.🤖 Generated with Claude Code
Greptile Summary
The PR suppresses the landing welcome banner by seeding each Playwright login’s
loggedInUsersstate before navigation, then removes now-redundant banner dismissal helpers. It also contains targeted synchronization and selector improvements for several flaky UI test paths.Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[UserClass.login] --> B{Suppress welcome screen?} B -- Yes --> C[Install pre-navigation init script] C --> D[Seed loggedInUsers with user name] B -- No: Tour coverage --> E[Leave welcome state unchanged] D --> F[Navigate to sign-in] E --> F F --> G[Authenticate and open application] D --> H[Landing page skips welcome banner] E --> I[Welcome and tour flow remains available]Reviews (9): Last reviewed commit: "Merge main into remove-welcome-widget-ti..." | Re-trigger Greptile