cherry-pick(2.0): Fix the CustomizeWidget CustomizeLandingPage tests (#31551) - #31579
cherry-pick(2.0): Fix the CustomizeWidget CustomizeLandingPage tests (#31551)#31579aniketkatkar97 wants to merge 1 commit into
Conversation
* Fix the CustomizeWidget CustomizeLandingPage tests
* Worked on comment
* fix(e2e): make widget skeleton waits target the real data-testid
widget.locator('entity-list-skeleton') is a tag-name selector that never
matches anything - the skeleton renders data-testid="entity-list-skeleton" -
so every 'wait for widget data to settle' in widgetFilters.ts resolved
instantly. The sort/filter flows then clicked dropdown -> item -> dropdown ->
item with zero settle time between refetches, which is the race window behind
the CustomizeWidgets widget-filter hangs in nightly AUT runs.
Use getByTestId like the three already-correct call sites in the same file.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* ci(playwright): map landing-page/customization helper modules to their specs
customizeLandingPage.ts and widgetFilters.ts are shared by every
landing-page/customization spec, but changes to them were unmapped in the
impact map - a helper-only PR ran smoke + canary while CustomizeWidgets,
CustomizeLandingPage and the other importers of the changed code never ran.
Map both helpers to their exact importer specs (LandingPageWidgets as a
directory glob). DataInsight.spec.ts is @data-insight-tagged, hence the
Data Insight project alongside chromium.
Verified with select_playwright_tests.py: the changed files of this PR now
select all 12 specs with zero unmapped files.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(e2e): isolate persona and user per test in CustomizeLandingPage spec
Same class of bug as #31407/#31408, seen in AUT run 31867679974. The file
shared one persona and one user across tests, and only 'Add, Remove and
Reset' set the user's default persona (via the profile UI, mid-test). Under
fullyParallel the file's tests run in different workers - each worker's
beforeAll created its own user that never got a default persona, so
'Widget drag and drop reordering' saved the persona layout correctly but
/my-data rendered the stock layout (loggedInUser.defaultPersona = null in
every trace) and the widget-visibility assertions failed at
customizeLandingPage.ts:258.
Port the per-test testUser/persona fixtures from CustomizeWidgets (#31408):
the persona fixture attaches the persona and defaultPersona to the user via
API PATCH before login, so every test in any worker starts with the right
session, and per-test personas also remove the last-write-wins races on the
shared persona.<name> layout document.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(e2e): pass the KPI widget's layout key to waitForLandingPageWidget
DataInsight.spec.ts called waitForLandingPageWidget(page, 'kpi-widget'),
but kpi-widget is a child div of the widget - KPIWidget renders
KnowledgePanel.KPI on its WidgetWrapper and that is the key its
DeferredWidget slot is named after.
That worked only by accident: the old helper's loop blind-scrolled the
landing page on every iteration whether or not the key resolved, which
mounted the deferred widget and made the inner testid appear. The
rewritten helper only scrolls a locator it can resolve, so the inner
testid now reveals nothing and the widget never mounts - the spec failed
in playwright-ci-postgresql (chromium-01) with "getByTestId('kpi-widget')
element(s) not found".
Pass the layout key and assert the inner testid against the returned
locator, which also proves the widget's content rendered rather than just
locating a div. Document the contract on waitForLandingPageWidget so the
next caller does not repeat it. Audited every call site: this was the only
one passing an inner testid.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 2b11dda)
❌ 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 |
Code Review 👍 Approved with suggestions 0 resolved / 1 findingsCherry-picks CustomizeWidget and CustomizeLandingPage test fixes onto the 2.0 branch, improving test isolation and skeleton waits. Verify verifyDomainsFilters still uses the broken skeleton selector. 💡 Bug: verifyDomainsFilters still uses broken skeleton selector📄 openmetadata-ui/src/main/resources/ui/playwright/utils/widgetFilters.ts:239-253 The PR replaces the tag-name selector Apply to all three skeleton waits inside verifyDomainsFilters, matching the fix used in the other filter helpers.🤖 Prompt for agentsOptionsDisplay: 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 |
❌ UI Checkstyle Failed❌ Core Components - I18n SyncCore-components ❌ Antd + Less Deprecation GuardA new Affected filesat Function._resolveFilename (node:internal/modules/cjs/loader:1401:15) Fix locally (fast - only checks files changed in this branch): make ui-checkstyle-changed |
🔴 Playwright Results — workflow failedValidated commit ✅ 656 passed · ❌ 0 failed · 🟡 3 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky Pipeline and setup failures (1)
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) 49m 50s ⏱️ Max setup 2m 53s · max shard execution 16m 40s · max shard-job elapsed before upload 19m 57s · reporting 9s 🌐 213.76 requests/attempt · 2.88 app boots/UI scenario · 33.60% 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 |
Clean cherry-pick of
2b11ddab(#31551) from main onto2.0, as planned after the main merge.Carries:
fix(e2e): per-testtestUser/personaisolation inCustomizeLandingPage.spec.ts(same class as CustomizeWidgets Playwright spec is flaky: parallel tests clobber the shared persona landing-page layout #31407/Fixes #31407: isolate persona and user per test in CustomizeWidgets Playwright spec #31408) — fixes thedefaultPersona: nulllanding-page failures seen in AUT run 31867679974 underfullyParallel.fix(e2e):widgetFilters.tsskeleton waits now target the realdata-testid(were tag-name selectors that never matched — every settle-wait was a no-op).ci(playwright): impact-map entry mapping the landing-page/customization helper modules to their importer specs, so helper-only changes actually run these specs on PRs.🤖 Generated with Claude Code