Skip to content

Fixed context center flaky tests - #30591

Merged
chirag-madlani merged 2 commits into
mainfrom
context-center-flacky-test
Jul 29, 2026
Merged

Fixed context center flaky tests#30591
chirag-madlani merged 2 commits into
mainfrom
context-center-flacky-test

Conversation

@Rohit0301

@Rohit0301 Rohit0301 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #

I worked on ... because ...

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

High-level design:

N/A — small change.

Tests:

Use cases covered

Unit tests

Backend integration tests

Ingestion integration tests

Playwright (UI) tests

Manual testing performed

UI screen recording / screenshots:

Not applicable.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • For UI changes: I attached a screen recording and/or screenshots above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

Summary by Gitar

  • Test fixes:
    • Updated assertions in Playwright tests for ContextCenterDocument and ContextCenterArticles to prevent flakiness

This will update automatically on new commits.

Greptile Summary

This PR adjusts two Context Center Playwright assertions intended to reduce test flakiness.

  • Changes the article persistence assertion from an exact input-value check to a text-content check.
  • Re-reads and numerically compares the document folder’s global file count before and after folder selection.

Confidence Score: 3/5

The PR is not yet safe to merge because the article persistence test now checks textarea text content instead of its saved value.

The article title is rendered through a textarea value, but the changed assertion examines text content after navigation and can therefore fail despite correct persistence; the document count change now performs the requested post-selection read.

Files Needing Attention: openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterArticles.spec.ts

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterArticles.spec.ts Changes the saved-title check to an assertion that does not match the textarea’s value-based contract.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterDocument.spec.ts Re-reads the folder-view count after selection, addressing the previously reported cached-value problem.

Reviews (2): Last reviewed commit: "addressed gitar comment" | Re-trigger Greptile

@Rohit0301 Rohit0301 self-assigned this Jul 28, 2026
@Rohit0301
Rohit0301 requested a review from a team as a code owner July 28, 2026 14:11
@Rohit0301 Rohit0301 added the safe to test Add this label to run secure Github workflows on PRs label Jul 28, 2026
@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 Jul 28, 2026
@Rohit0301
Rohit0301 enabled auto-merge July 28, 2026 14:40
@Rohit0301
Rohit0301 added this pull request to the merge queue Jul 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 28, 2026
@Rohit0301
Rohit0301 added this pull request to the merge queue Jul 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 28, 2026
@chirag-madlani
chirag-madlani added this pull request to the merge queue Jul 29, 2026
Merged via the queue into main with commit c00a7cf Jul 29, 2026
68 of 70 checks passed
@chirag-madlani
chirag-madlani deleted the context-center-flacky-test branch July 29, 2026 07:29
@gitar-bot

gitar-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 resolved / 1 findings

Updates assertions in Playwright tests for Context Center documents and articles to resolve flakiness by using substring matching and numeric comparisons. No issues found.

✅ 1 resolved
Quality: Second folder-count assertion re-checks a stale constant

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterDocument.spec.ts:1159-1163 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterDocument.spec.ts:1176
Line 1176 re-asserts expect(folderCount).toBeGreaterThanOrEqual(globalCount), but folderCount and globalCount are both constants captured before the folder click (lines 1155, 1159-1162). Since neither value changes, this assertion is a tautological no-op and no longer verifies that the DocumentFolderView header still shows the global total after selectFolderInSidebar — its stated purpose per the comment. Re-read the DOM at that point to make the check meaningful, e.g. const folderCountAfter = parseInt((await folderViewCount.textContent())?.match(/\d+/)?.[0] ?? '0', 10); expect(folderCountAfter).toBeGreaterThanOrEqual(globalCount);.

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 | Powered by Gitar — free for open source

Rohit0301 added a commit that referenced this pull request Jul 29, 2026
* Fixed context center flaky tests

* addressed gitar comment
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.

3 participants