Description
Goal
Make the glossary E2E suite give a trustworthy signal about glossary descriptions, so a green Playwright run means the description actually rendered — and a red one means something is genuinely broken.
Current behaviour
verifyGlossaryDetails reads the description with a single, non-retrying DOM read:
// playwright/utils/glossary.ts
const viewerContainerText = await page.textContent('[data-testid="viewer-container"]');
expect(viewerContainerText).toContain(glossaryDetails.description);page.textContent() resolves as soon as the element is attached and reads its text exactly once. The description is rendered by RichTextEditorPreviewNew, whose BlockEditor is withSuspenseFallback(lazy(() => import(...))) with the default null fallback — so viewer-container is attached with a literally empty subtree until that chunk resolves (and its content state starts as '', set later in a useEffect).
The helper therefore reads "" whenever the lazy chunk hasn't landed yet, and fails with:
expect(received).toContain(expected) // indexOf
Expected substring: "Glossary terms that describe general conceptual terms. …"
Received string: ""
Two things make this easy to miss:
waitForAllLoadersToDisappeargives false confidence — it waits for[data-testid="loader"], and this Suspense fallback renders no loader at all.- The failure looks like missing data, but the data is fine. The screenshot Playwright captures after the assertion fails shows the description rendered correctly.
Impact
Across 10 Postgres Playwright runs on 11–12 Aug, Glossary.spec.ts › "Approve and reject glossary term from Glossary Listing" ran 9 times: 4 flaky + 1 hard failure + 4 clean — a 56% first-attempt failure rate. The hard failure (run 31566736080) blocked the merge queue for an unrelated PR.
The same helper backs two sibling tests in the same file ("Glossary & terms creation for reviewer as user" / "as team"), which fail with the identical signature.
Proposed change
Use a web-first assertion so the check retries until the lazily-mounted editor renders — matching the pattern already used everywhere else in the suite (e.g. playwright/utils/tag.ts):
await expect(page.getByTestId('viewer-container')).toContainText(
glossaryDetails.description
);Notes
page.textContent() + toContain appears in 4 other places in the Playwright tree (utils/entity.ts, utils/user.ts, support/entity/ingestion/RedshiftWithDBTIngestionClass.ts, e2e/Features/QueryEntity.spec.ts). Those aren't currently failing, so they're left alone here — worth a follow-up sweep under #31035.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone ✅
Activity
Fixes open-metadata#32588: fix 5 masked Playwright failures, quaranti…