Skip to content

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

Open
karanh37 wants to merge 4 commits into
mainfrom
remove-welcome-widget-timing
Open

test(ui): suppress landing welcome banner at source, remove dismiss helpers#31853
karanh37 wants to merge 4 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 Playwright landing-page welcome banner before navigation and removes redundant reactive dismissal waits.

  • Seeds loggedInUsers from UserClass.login, with an explicit opt-out for tour coverage.
  • Removes removeLandingBanner and equivalent inline dismissal logic from affected specs and utilities.
  • Extends AdminClass.login to forward welcome-screen suppression options.

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 pre-navigation welcome-screen suppression while allowing explicit opt-out.
openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts Adds the localStorage seeding helper and removes the timeout-based banner dismissal helper.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/Tour.spec.ts Explicitly preserves the welcome banner for tests that exercise the tour entry point.
openmetadata-ui/src/main/resources/ui/playwright/support/user/AdminClass.ts Forwards the new suppression option through the admin login wrapper.
openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts Removes redundant welcome-banner dismissals from entity navigation and widget helpers.
openmetadata-ui/src/main/resources/ui/playwright/utils/searchRBAC.ts Removes redundant welcome-screen closing logic from search RBAC flows.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Login["UserClass.login"] --> Option{"Suppress welcome screen?"}
  Option -->|Yes| Seed["Seed loggedInUsers via addInitScript"]
  Option -->|No| Preserve["Leave localStorage unchanged"]
  Seed --> SignIn["Navigate to /signin and authenticate"]
  Preserve --> SignIn
  SignIn --> Landing["Load /my-data"]
  Landing --> Gate{"Current user is in loggedInUsers?"}
  Gate -->|Yes| Hidden["Welcome banner remains hidden"]
  Gate -->|No| Visible["Welcome banner renders for tour coverage"]
Loading

Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | 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) <noreply@anthropic.com>
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) <noreply@anthropic.com>
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 1a0ef9f078eb4ba476e8ebc37c2b0f95ba60073c in Playwright run 32477018438, attempt 1.

✅ 664 passed · ❌ 0 failed · 🟡 1 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) 47m 37s

⏱️ Max setup 4m 40s · max shard execution 14m 28s · max shard-job elapsed before upload 18m 4s · reporting 5s

🌐 221.63 requests/attempt · 2.89 app boots/UI scenario · 25.35% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 25.35% (convergence target: at most 15%).
  • Browser traffic was 221.63 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.89 per UI scenario (2035 boots / 704 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
🟡 Shard chromium-01 108 0 1 0 0 0
✅ Shard chromium-02 96 0 0 0 0 0
✅ Shard chromium-03 105 0 0 0 0 0
✅ Shard chromium-04 104 0 0 0 0 0
✅ Shard chromium-05 97 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
🟡 1 flaky test(s) (passed on retry)
  • Features/ActivityFeed.spec.tsemoji reactions can be added and toggled off on a feed card (shard chromium-01, 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) <noreply@anthropic.com>
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.

@gitar-bot

gitar-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Playwright test suite refactor that suppresses the landing welcome banner at the source via localStorage seeding and removes all obsolete dismissal helpers and call sites. 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

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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants