Skip to content

test(ui): fix flaky glossary description assertion in 2.0 - #33576

Merged
karanh37 merged 1 commit into
2.0from
backport/fix-glossary-viewer-flake-2.0
Sep 18, 2026
Merged

karanh37 merged 1 commit into
2.0from
backport/fix-glossary-viewer-flake-2.0

Conversation

@karanh37

@karanh37 karanh37 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Description

Backport to 2.0 of the glossary.ts Playwright fix from #32591.

verifyGlossaryDetails read the glossary description with page.textContent('[data-testid="viewer-container"]'), which waits for the viewer element to mount but not for its rich-text content to hydrate. On a cold first attempt the call returns "", and expect(...).toContain(description) fails immediately without retrying:

Expected substring: "Glossary terms that describe general conceptual terms. Note that these conceptual terms are used for automatically labeling the data."
Received string:    ""

Switched to expect(page.getByTestId('viewer-container')).toContainText(description), a web-first assertion that polls and survives the hydration gap.

This mirrors the fix already on main; the backport touches only this assertion.

Type of change

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

How was this tested

  • Playwright: Pages/Glossary.spec.ts — Glossary & terms creation for reviewer as team

🤖 Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge and correctly addresses the flaky assertion without changing the tested behavior.

Summary

This PR backports the Playwright glossary-description stability fix to the 2.0 branch.

  • Replaces an immediate textContent() check with a retrying locator assertion.
  • Allows rich-text content hydration to finish before evaluating the description.
  • Preserves the existing substring assertion behavior.

Reviews (1) · Last reviewed commit: "test(ui): fix flaky glossary description..."

Backport of the glossary.ts fix from #32591.

verifyGlossaryDetails read the description via page.textContent(), which
waits for the viewer element to mount but not for its rich-text content to
hydrate. On a cold first attempt it returns "" and expect().toContain()
fails immediately without retrying. Switch to expect(...).toContainText(),
which polls and survives the hydration gap.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@karanh37
karanh37 requested a review from a team as a code owner September 18, 2026 10:41
@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 Sep 18, 2026
@gitar-bot

gitar-bot Bot commented Sep 18, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟢 Low risk

Fixes a flaky Playwright assertion in the glossary description test by switching to a web-first assertion that properly waits for rich-text content to hydrate. 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

@karanh37
karanh37 merged commit aa4228f into 2.0 Sep 18, 2026
86 of 88 checks passed
@karanh37
karanh37 deleted the backport/fix-glossary-viewer-flake-2.0 branch September 18, 2026 11:31

This branch was previously deployed

1 inactive deployment
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