Skip to content

test(playwright): poll the glossary description viewer instead of snapshotting it (1.13) - #34254

Merged
anuj-kumary merged 1 commit into
1.13from
anuj-kumary/glossary-viewer-container-poll-1.13
Sep 30, 2026
Merged

anuj-kumary merged 1 commit into
1.13from
anuj-kumary/glossary-viewer-container-poll-1.13

Conversation

@anuj-kumary

Copy link
Copy Markdown
Member

Describe your changes

verifyGlossaryDetails read the glossary description with page.textContent(), which waits for [data-testid="viewer-container"] to exist but not for its text. RichTextEditorPreviewNew renders that container synchronously while its content comes from a lazily-mounted BlockEditor, so a cold read lands on the empty shell and the assertion sees "".

Replaced with expect(...).toContainText(...), which polls and survives the hydration gap.

This is a straight backport of the helper fix already on main (b6030a4, #32591) — the added block is byte-identical to main's. 1.13 never got it, so the race is still live there.

Evidence

Postgres Playwright run 36651541894 failed all three attempts of Glossary & terms creation for reviewer as user:

verifyGlossaryDetails (playwright/utils/glossary.ts:457)
expect(received).toContain(expected)
Expected substring: "Glossary terms that describe general conceptual terms…"
Received string:    ""

Not a regression from the head commit — 368cf15e touches only TableRepository.java and TableResourceIT.java, and the MySQL run on the same SHA passed. The runner was just slow enough to land inside the race window.

One helper change covers the three specs that call verifyGlossaryDetails (Glossary.spec.ts 126 / 196 / 414).

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have read the CONTRIBUTING document.
  • My PR title is <type>(<optional scope>): <description>
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation. — N/A, test-only.

Test-only change; the Playwright suites on this PR are the verification.

🤖 Generated with Claude Code

…pshotting it (1.13)

verifyGlossaryDetails read the description with page.textContent(), which
waits for [data-testid="viewer-container"] to exist but not for its text.
The container is rendered synchronously by RichTextEditorPreviewNew while
its content comes from a lazily-mounted BlockEditor, so a cold read lands
on the empty shell and the assertion sees "".

Postgres Playwright run 36651541894 failed all three attempts of
"Glossary & terms creation for reviewer as user" this way; the MySQL run
on the same SHA passed, and the head commit was backend-only.

Backport of the helper fix already on main (b6030a4, #32591) — one
change covers the three specs that call verifyGlossaryDetails.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@anuj-kumary
anuj-kumary requested a review from a team as a code owner September 30, 2026 04:46
@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 the UI UI specific issues label Sep 30, 2026
@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!

@gitar-bot

gitar-bot Bot commented Sep 30, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟢 Low risk · A single Playwright helper now polls for glossary description text during hydration.

Replaces a synchronous textContent() read of the glossary description viewer with a polling expect(...).toContainText(...) assertion to survive the hydration gap between the container's synchronous render and its lazy-mounted content. This backports the fix already on main to resolve race conditions in the glossary creation tests. No issues found.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

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

@anuj-kumary anuj-kumary self-assigned this Sep 30, 2026
@anuj-kumary anuj-kumary added safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Sep 30, 2026
@anuj-kumary
anuj-kumary merged commit 80bac82 into 1.13 Sep 30, 2026
195 of 204 checks passed
@anuj-kumary
anuj-kumary deleted the anuj-kumary/glossary-viewer-container-poll-1.13 branch September 30, 2026 06:54

This branch was previously deployed

1 inactive deployment
test — 7cddfc4d Deployed Sep 30, 2026 by anuj-kumary via playwright-ci-postgresql (6, 6) #97674
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.

1 participant