Skip to content

test(ui): suppress landing welcome banner at source, remove dismiss helpers - #31853

Merged
karanh37 merged 10 commits into
mainfrom
remove-welcome-widget-timing
Aug 22, 2026
Merged

karanh37 merged 10 commits into
mainfrom
remove-welcome-widget-timing

Conversation

@karanh37

@karanh37 karanh37 commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

Description

The Playwright removeLandingBanner helper waited up to 5000ms for the welcome-screen close button on many specs. That wait was almost always wasted: for storageState sessions the welcome banner never renders — auth.setup.ts logs each user in, which lands on /my-data and records the user in the loggedInUsers localStorage key that gates the banner (MyDataPage.component.tsx), and that state is captured into every .auth/*.json. So the waitFor ran out its full timeout waiting on an element that never appears.

Only specs that log in a freshly created UserClass on a new context (e.g. DomainDataProductsWidgets, CustomizeLandingPage, CustomizeWidgets, CuratedAssets) actually render the banner.

Fix: suppress at the source

Seed loggedInUsers in UserClass.login() via addInitScript, before the first navigation (mirroring the existing disableEtagConditionalReads opt-out). The seeded value equals the app's currentUser.name:

  • responseData.name for a created user (verified: both derive from the same server-side User name),
  • the email local-part for a pure login such as admin (server-assigned username; admin = admin).

With the banner suppressed for every session, the reactive dismissals are dead code and are removed:

  • removeLandingBanner (common.ts) + all ~27 call sites
  • closeWelcomeScreenIfVisible + its inline blocks (searchRBAC.ts)
  • 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.

Type of change

  • Test/CI improvement

Tests

Playwright-only; no product code changed. Static checks on all changed files: 0 ESLint errors, 0 new tsc errors (two pre-existing TS6133 in entity.ts are 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 loggedInUsers state before navigation, then removes now-redundant banner dismissal helpers. It also contains targeted synchronization and selector improvements for several flaky UI test paths.

  • Adds an opt-out so tour coverage can continue exercising the welcome experience.
  • Removes banner dismissal calls from landing-page, search, activity-feed, entity, and widget helpers.
  • Improves owner refresh, deferred-widget, glossary modal, ingestion wizard, and lineage-node waits.

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/support/user/UserClass.ts Adds default welcome-screen suppression before the first login navigation while exposing an explicit opt-out.
openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts Introduces the localStorage seeding helper and removes the reactive banner-dismissal helper.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/Tour.spec.ts Opts tour coverage out of suppression so the welcome-driven flow remains testable.
openmetadata-ui/src/main/resources/ui/playwright/utils/customizeLandingPage.ts Removes redundant dismissal calls and retries deferred widget discovery until the widget becomes visible.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts Reopens the entity summary panel while polling for asynchronously indexed owner data.
openmetadata-ui/src/main/resources/ui/playwright/utils/glossary.ts Scopes parent selection to the visible hierarchy dialog before interacting with it.

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]
Loading

Reviews (9): Last reviewed commit: "Merge main into remove-welcome-widget-ti..." | Re-trigger Greptile

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]>
Copilot AI lite review requested due to automatic review settings August 21, 2026 06:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Aug 21, 2026
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]>
Copilot AI review requested due to automatic review settings August 21, 2026 06:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@karanh37 karanh37 changed the title test(ui): shorten welcome-banner wait in removeLandingBanner test(ui): suppress landing welcome banner at source, remove dismiss helpers Aug 21, 2026
@github-actions

github-actions Bot commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 5fada00bca8c5dca4a338b8bc20ca9ede169f68e in Playwright run 32554331693, attempt 1.

✅ 729 passed · ❌ 0 failed · 🟡 3 flaky · ⏭️ 0 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) 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:

  • Common shard skew was 15.78% (convergence target: at most 15%).
  • Browser traffic was 221.78 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.8 per UI scenario (2185 boots / 779 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
🟡 Shard chromium-01 113 0 1 0 0 0
✅ Shard chromium-02 110 0 0 0 0 0
✅ Shard chromium-03 123 0 0 0 0 0
🟡 Shard chromium-04 115 0 2 0 0 0
✅ Shard chromium-05 114 0 0 0 0 0
✅ Shard data-asset-rules-01 61 0 0 0 0 0
✅ Shard domain-isolation-01 16 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard ingestion-01 1 0 0 0 0 0
✅ Shard reindex-01 2 0 0 0 0 0
✅ Shard search-01 11 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0
🟡 3 flaky test(s) (passed on retry)
  • Pages/Glossary.spec.ts › Glossary & terms creation for reviewer as user (shard chromium-01, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard chromium-04, 1 retry)
  • Pages/Glossary.spec.ts › Glossary & terms creation for reviewer as team (shard chromium-04, 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

karanh37 and others added 2 commits August 21, 2026 16:53
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]>
Copilot AI review requested due to automatic review settings August 21, 2026 11:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 21, 2026 18:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

…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]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

…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]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gitar-bot

gitar-bot Bot commented Aug 22, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Suppresses the landing welcome banner at the source by seeding loggedInUsers during Playwright login and removes obsolete dismiss helpers. 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 👍 / 👎 | Powered by Gitar — free for open source

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.

6 participants