Skip to content

Playwright: mark Setup Domains widget test as slow#28027

Merged
siddhant1 merged 8 commits into
mainfrom
fix/playwright-domain-widget-timeout
May 13, 2026
Merged

Playwright: mark Setup Domains widget test as slow#28027
siddhant1 merged 8 commits into
mainfrom
fix/playwright-domain-widget-timeout

Conversation

@siddhant1
Copy link
Copy Markdown
Member

@siddhant1 siddhant1 commented May 11, 2026

Summary

Adds test.slow() to the Setup Domains widget on landing page test in DomainWidgetFilter.spec.ts so it gets the standard 3× timeout (180s) instead of the default 60s. The test runs ~67s of legitimate work in a 60s budget and times out before expect.poll can finish a single iteration.

Why it's failing now

Two earlier commits compounded into a flake:

  1. Allow multi assets selection for curated assets #23084 (Sep 2025) added waitFor({ timeout: 5000 }) to removeLandingBanner so callers don't fail when the welcome modal is already dismissed. Tolerance is correct, but 5s is paid even when the banner isn't there.
  2. 42ff5a63bf (Mar 2026) wrapped the post-save widget check in addAndVerifyWidget with expect.poll, calling removeLandingBanner 1× before + 1× per iteration to handle ES indexing lag and avoid networkidle hangs on persona routes. This multiplied the 5s waste from 1× to 4×.

Neither broke the test alone. Together they pushed the heavy flow (UI persona-set + settings-nav + customize-editor + save + verify) over the 60s line.

Time breakdown (60s budget, AUT trace)

Phase Cumulative
Before hooks (create domains/persona) T+7.5s
Set default persona via UI (incl. 14s toContainText) T+32s
Navigate to /settings/persona/... + loader T+44s
Customize editor + add widget modal + save T+52s
Redirect home + first removeLandingBanner (5s wait) T+61.6s
expect.poll enters iteration 1 over budget
Test ended (60s timeout) T+67.5s

The page snapshot at failure shows the Domains widget is rendered — the test would have passed with budget. expect.poll simply never got a chance.

Why test.slow() instead of a deeper refactor

Two heavier fixes were considered and intentionally deferred:

  • Replace the 5s waitFor in removeLandingBanner with an immediate isVisible() check. Would shave ~5s per call and benefit every test that touches the helper. Broader blast radius; better as a separate cleanup PR if other tests start flaking.
  • Bypass the UI persona-set flow with a PATCH on /api/v1/users/admin. Would save ~22s but changes test semantics (the UI flow becomes untested in this spec).

test.slow() is the smallest, safest change that lets this test pass while preserving the expect.poll / removeLandingBanner pattern that the Mar 2026 commit added intentionally for ES-indexing-lag scenarios in sibling tests.

Test plan

  • Run npx playwright test DomainWidgetFilter --reporter=list against the AUT — expect both tests in the file to pass (the second test Domains widget should show only selected domain when domain filter is active was previously skipped via describe.serial when the first failed).
  • Confirm test duration is comfortably under 180s (expected: ~65–80s with current budget headroom).
  • No other Playwright tests are touched.

Summary by Gitar

  • Testing:
    • Applied test.slow() to the Setup Domains widget test to accommodate its ~67s execution time.
  • Data sampling:
    • Excluded temporal table period columns from autoClassification sampling to resolve issue 21329.

This will update automatically on new commits.

The test "Setup Domains widget on landing page" hits the 60s default test
timeout because its setup is legitimately heavy:
  - set default persona via UI flow (~22s incl. toContainText wait)
  - navigate to /settings/persona/<name> + loader settle (~12s)
  - open customize landing-page editor + add widget modal + save (~3s)
  - redirect home + first removeLandingBanner 5s waitFor (~7s)
  - expect.poll iteration to verify the widget under the layout

Cumulative ~67s on a 60s budget, so expect.poll never gets to complete an
iteration. The page snapshot at failure shows the Domains widget IS
rendered — the test would have passed with budget.

test.slow() triples the timeout to 180s, restoring comfortable headroom
without changing any test or util semantics. The expect.poll pattern in
addAndVerifyWidget stays intact (it intentionally handles async ES
indexing and banner-blocks-widget reload scenarios for other widgets).
Copilot AI review requested due to automatic review settings May 11, 2026 06:54
@siddhant1 siddhant1 requested a review from a team as a code owner May 11, 2026 06:54
@github-actions
Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR reduces Playwright flakiness in the landing page Domains widget setup flow by marking the setup test as slow so it receives the standard 3× timeout.

Changes:

  • Mark Setup Domains widget on landing page as test.slow() to increase its timeout budget from the default to the slow-test budget.

@siddhant1 siddhant1 added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels May 11, 2026
Copilot AI review requested due to automatic review settings May 11, 2026 10:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines 59 to 61
test('Setup Domains widget on landing page', async ({ page }) => {
test.slow();
await redirectToHomePage(page);
@siddhant1 siddhant1 enabled auto-merge (squash) May 12, 2026 05:44
Copilot AI review requested due to automatic review settings May 13, 2026 05:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines 58 to 61
test.describe.serial('Domain Widget Filter', () => {
test('Setup Domains widget on landing page', async ({ page }) => {
test.slow();
await redirectToHomePage(page);
@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented May 13, 2026

Code Review ✅ Approved

Increases the timeout for the Setup Domains widget test to 180s using test.slow(), resolving flakiness caused by recent UI flow and polling overhead. No issues 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

@siddhant1 siddhant1 merged commit 322f14a into main May 13, 2026
46 of 47 checks passed
@siddhant1 siddhant1 deleted the fix/playwright-domain-widget-timeout branch May 13, 2026 11:17
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.

4 participants