Skip to content

test: fix IntakeForm 'pick admin user' Steward popper close hanging for 180s#29771

Merged
siddhant1 merged 1 commit into
mainfrom
fix/playwright-intakeform-steward-escape
Jul 6, 2026
Merged

test: fix IntakeForm 'pick admin user' Steward popper close hanging for 180s#29771
siddhant1 merged 1 commit into
mainfrom
fix/playwright-intakeform-steward-escape

Conversation

@siddhant1

@siddhant1 siddhant1 commented Jul 6, 2026

Copy link
Copy Markdown
Member

What / Why

The Playwright test IntakeForm.spec.tspick admin user → DP create succeeds with correct extension payload times out for the full 180s on every retry (3× with test.slow()), making the whole IntakeForm project red.

Root cause

#29513 added these two lines after the admin option is clicked, to dismiss the Steward Autocomplete popper before clicking Save:

await stewardInput.press('Escape');
await expect(listbox).toBeHidden();

But once an option is selected, the Steward entity-ref picker collapses its input into a read-only selected-value chip (A admin ✕), so the locator

getByRole('combobox', { name: 'Steward' }).or(getByRole('textbox', { name: 'Steward' }))

no longer resolves. stewardInput.press('Escape') then blocks on the vanished element until the test timeout.

Evidence from the failing run's captured artifacts:

  • Accessibility snapshot at failure: the Steward field is a group rendering avatar "A" → "admin" → clear button — there is no combobox/textbox named "Steward" left (the other empty pickers — Owners/Experts/Reviewers — still expose theirs).
  • Failure screenshot: the dialog is fully populated with A admin ✕ in the required Steward field, ready to Save. The product works; only the test's teardown-of-the-popper step is broken.
  • Failed all 3 retries identically (not flaky), each burning ~170s on Press "Escape".

Fix

Press Escape on the page (whatever is focused — i.e. the open popper) instead of on the now-detached input. This preserves the intent of #29513 (close the popper before Save) without depending on a locator that stops existing after selection.

-        await stewardInput.press('Escape');
+        // Selecting the option collapses the Steward picker's input into a
+        // read-only chip, so `stewardInput` no longer resolves. Press Escape on
+        // the page (not the vanished input) to close the Autocomplete popper.
+        await page.keyboard.press('Escape');
         await expect(listbox).toBeHidden();

page is already a fixture in the test signature; no new imports. The await expect(listbox).toBeHidden() assertion is kept.

Testing

Local static verification only (single-line test change; the scenario needs a running server + a seeded intake form). Relying on CI's Playwright suite to exercise the IntakeForm project end-to-end.

Greptile Summary

This PR fixes a Playwright test that was timing out for 180 s on every retry because it attempted to press Escape on a Steward input element that no longer exists after a selection collapses it into a read-only chip.

  • Replaces stewardInput.press('Escape') with page.keyboard.press('Escape') so the Escape keystroke is sent to whatever is currently focused (the open Autocomplete popper) rather than a stale locator.
  • The subsequent await expect(listbox).toBeHidden() assertion is preserved unchanged, keeping the original intent of test: close Steward Autocomplete popper before clicking Save #29513 to verify the popper is dismissed before clicking Save.

Confidence Score: 5/5

Safe to merge — single-line test fix with no production code changes.

The change swaps a locator-based keypress that was targeting a now-detached DOM element for a page-level keypress that is always valid. The fix is minimal, well-commented, and preserves the follow-up assertion that confirms the popper actually closes. No risk to production code paths.

No files require special attention.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/IntakeForm.spec.ts Replaces stewardInput.press('Escape') with page.keyboard.press('Escape') to avoid blocking on the Steward picker's input element, which is collapsed into a read-only chip after selection and no longer resolves.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant Test
    participant StewardInput as stewardInput (combobox/textbox)
    participant Listbox as Autocomplete Listbox
    participant Page as page.keyboard

    Test->>StewardInput: click() + fill('admin')
    StewardInput->>Listbox: opens dropdown
    Test->>Listbox: click adminOption.first()
    Note over StewardInput: collapses into read-only chip (combobox/textbox no longer resolves)
    alt Before fix (broken)
        Test->>StewardInput: press('Escape') — blocks 180s (element gone)
    else After fix (correct)
        Test->>Page: press('Escape') — closes popper immediately
    end
    Test->>Listbox: expect(listbox).toBeHidden()
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant Test
    participant StewardInput as stewardInput (combobox/textbox)
    participant Listbox as Autocomplete Listbox
    participant Page as page.keyboard

    Test->>StewardInput: click() + fill('admin')
    StewardInput->>Listbox: opens dropdown
    Test->>Listbox: click adminOption.first()
    Note over StewardInput: collapses into read-only chip (combobox/textbox no longer resolves)
    alt Before fix (broken)
        Test->>StewardInput: press('Escape') — blocks 180s (element gone)
    else After fix (correct)
        Test->>Page: press('Escape') — closes popper immediately
    end
    Test->>Listbox: expect(listbox).toBeHidden()
Loading

Reviews (1): Last reviewed commit: "test: close Steward popper via page.keyb..." | Re-trigger Greptile

…input

The intake-form "pick admin user" test timed out for the full 180s on every
retry. After selecting the admin option, the Steward entity-ref picker collapses
its input into a read-only chip, so `getByRole('combobox'/'textbox', { name:
'Steward' })` no longer resolves. The `stewardInput.press('Escape')` added in
#29513 then blocked on that vanished locator until the test timed out.

Press Escape on the page instead of the detached input to close the Autocomplete
popper before clicking Save.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@siddhant1 siddhant1 requested a review from a team as a code owner July 6, 2026 10:20
Copilot AI review requested due to automatic review settings July 6, 2026 10:20
@github-actions

github-actions Bot commented Jul 6, 2026

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 commented Jul 6, 2026

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!

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.

Pull request overview

This PR fixes a Playwright E2E test hang in the IntakeForm flow by changing how the test dismisses the Steward Autocomplete popper after selecting an option, preventing press('Escape') from blocking on a locator that no longer exists once the selection collapses into a chip.

Changes:

  • Replace stewardInput.press('Escape') with page.keyboard.press('Escape') to avoid waiting on a detached input.
  • Add an explanatory comment documenting why the input locator disappears post-selection.
  • Keep the await expect(listbox).toBeHidden() synchronization to ensure the popper is dismissed before Save.

@gitar-bot

gitar-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Switches the Steward popper dismissal from a locator-based keypress to a page-level keyboard event to prevent test timeouts caused by the input element collapsing into a read-only chip. 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 👍 / 👎 | Gitar

@siddhant1 siddhant1 enabled auto-merge (squash) July 6, 2026 10:23
@siddhant1 siddhant1 added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (22 flaky)

✅ 4483 passed · ❌ 0 failed · 🟡 22 flaky · ⏭️ 37 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 440 0 2 16
🟡 Shard 2 816 0 8 3
✅ Shard 3 795 0 0 12
🟡 Shard 4 811 0 2 5
🟡 Shard 5 856 0 1 0
🟡 Shard 6 765 0 9 1
🟡 22 flaky test(s) (passed on retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: metric (shard 1, 1 retry)
  • Flow/SearchRBAC.spec.ts › the browse tree only shows the asset-type categories a user can access (shard 1, 1 retry)
  • Features/BulkEditEntity.spec.ts › Glossary Term (Nested) (shard 2, 1 retry)
  • Features/BulkImport.spec.ts › Database Schema (shard 2, 1 retry)
  • Features/ContextCenterArticles.spec.ts › Article listing search filters, clears, and shows empty state (shard 2, 1 retry)
  • Features/ContextCenterArticles.spec.ts › Article list cards, recently viewed widget, and pagination work (shard 2, 1 retry)
  • Features/ContextCenterDocumentPage.spec.ts › move document to folder via card menu shows folder name on the card (shard 2, 1 retry)
  • Features/ContextCenterDocumentPage.spec.ts › document appears nested in the folder tree after being moved to a folder (shard 2, 1 retry)
  • Features/ContextCenterPermission.spec.ts › user with deleteAll permission can see delete action but not restore action on an archived document, and can delete it (shard 2, 1 retry)
  • Features/ContextCenterPermission.spec.ts › Data Steward can edit content, title, owners, tags, and glossary terms but cannot add article, domain, reviewer, data product, or data assets (shard 2, 2 retries)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for Directory (shard 4, 1 retry)
  • Pages/DataContractsSemanticRules.spec.ts › Validate Owner Rule Is_Set (shard 4, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 1 retry)
  • Pages/ExplorePageRightPanel.spec.ts › Should allow Data Steward to edit glossary terms for mlmodel (shard 6, 1 retry)
  • Pages/Glossary.spec.ts › Approve and reject glossary term from Glossary Listing (shard 6, 1 retry)
  • Pages/GlossaryImportExport.spec.ts › Glossary Bulk Import Export (shard 6, 1 retry)
  • Pages/InputOutputPorts.spec.ts › Output ports section collapse/expand (shard 6, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › Column lineage for mlModel -> topic (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab is NOT visible for pipelineService in platform lineage (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab is NOT visible for apiService in platform lineage (shard 6, 1 retry)
  • Pages/UserDetails.spec.ts › Admin user can get all the roles hierarchy and edit roles (shard 6, 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

@siddhant1 siddhant1 merged commit f551abb into main Jul 6, 2026
101 of 121 checks passed
@siddhant1 siddhant1 deleted the fix/playwright-intakeform-steward-escape branch July 6, 2026 12:53
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.

3 participants