Fixes 31799: make BundleSuiteBulkOperations act on its own test cases [1.13] - #31806
Conversation
Cherry-pick of the main-branch fix, with the row/checkbox locators ported to 1.13. The spec ticked row 1 of the global Test Cases list, which is sorted by most-recent result descending. Its own test cases are created without a result, so they can never be row 1 -- under CI parallelism row 1 is reliably a test case another worker created seconds ago and is about to hard-delete. When that cleanup ran, the CONTAINS edge this spec had just created was cascade-deleted, and the suite read back empty (or the add was rejected outright with "test cases that do not exist"). Select by name instead. The list search is Elasticsearch-backed and tokenises names on `_`, so searching a whole `<prefix>_<uuid>` name matches every `<prefix>_*` test case on the server and the wanted one ranks off page 1; `ownedTestCase` therefore pairs each name with the uuid segment that actually narrows it, and the row assertion is an exact `toHaveCount(1)` rather than `.first()`. Also assert the bulk add response. A rejected add left the modal open and only surfaced 15s later as a confusing "URL never changed" timeout, hiding the server's explanation. 1.13 still renders the Test Cases list with the antd table, so `searchAndSelectTestCase` uses `tr[data-row-key]` + `input[type="checkbox"]`.check() here, matching this branch's existing `selectTestCasesByCheckbox`, rather than main's core-Table `tr[data-key]` + `label[slot="selection"]`. The cherry-pick applies without conflict but would have been silently wrong without this. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
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 |
Code Review ✅ ApprovedUpdates OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes #31799
Cherry-pick of #31800 (
main) onto1.13, with the row/checkbox locators ported to this branch — see the caveat below.BundleSuiteBulkOperations.spec.ts › Add test case to existing Bundle Suiteticked row 1 of the global Test Cases list, which is sorted by most-recent result descending. The spec's own test cases are created without a result, so they can never be row 1 — under CI parallelism row 1 is reliably a test case another worker created seconds ago and is about to hard-delete. When that cleanup ran (?recursive=true&hardDelete=true), it cascaded to the test case and removed theCONTAINSedge this spec had just created, so the suite read backtests: []. When the delete landed earlier, the add was rejected with400 "You are trying to add one or more test cases that do not exist."Full analysis in #31799.The two tests that act on their selection now search for a test case the spec created:
The search term is the uuid segment, not the whole name — the list search is Elasticsearch-backed and tokenises on
_, so a full<prefix>_<uuid>name matches every<prefix>_*test case on the server and the wanted one ranks off page 1.Important
This is not a clean pick, even though git applied it without conflict.
1.13still renders the Test Cases list with the antd table, whereasmain/2.0use the coreTable. The cherry-pick merged textually but would have been silently wrong — the new helper would have looked fortr[data-key]+label[slot="selection"], neither of which exists here.searchAndSelectTestCasetherefore usestr[data-row-key]+input[type="checkbox"].check() on this branch, matching this branch's ownselectTestCasesByCheckbox. Worth a careful look during review.The
data-testid="searchbar"the helper types into does exist on1.13(viacommon/SearchBarComponent), and this same page is already driven that way bydataQuality.ts— so that part needed no change.Type of change:
High-level design:
N/A — cherry-pick with a locator port.
Tests:
Use cases covered
Unit tests
Not applicable — Playwright-only change.
Backend integration tests
Not applicable — no backend API changes.
Ingestion integration tests
Not applicable — no ingestion changes.
Playwright (UI) tests
openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DataQuality/BundleSuiteBulkOperations.spec.tsopenmetadata-ui/src/main/resources/ui/playwright/utils/dataQuality.tsManual testing performed
The behavioural validation was done on the
mainPR (#31800): the pre-fix spec was made to fail 4/8 under a script reproducing the race, and interleaved under one live churn the old spec failed 2/6 while the fixed spec passed 6/6; the fixed spec passed 24/24 unchurned and 8/8 under churn.That run-time evidence does not fully transfer to this branch, because the ported locators are branch-specific and were not exercised against a
1.13server locally. What was verified here:selectTestCasesByCheckbox(tr[data-row-key]+input[type="checkbox"].check()).data-testid="searchbar"is present on this branch's Test Cases page and already used bydataQuality.ts:157.@playwright/testis1.57.0on both branches, so no API-compatibility gap inexpect.poll/Locator.filter/APIResponse.ok().tscreports zero errors in both changed files; eslint and prettier clean.Please let CI exercise this one before merging rather than relying on the
mainvalidation alone.UI screen recording / screenshots:
Not applicable — test-only change.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.Greptile Summary
The PR stabilizes Bundle Suite bulk-operation Playwright coverage by selecting test cases owned by the spec rather than globally sorted rows.
Confidence Score: 5/5
The PR appears safe to merge, with no concrete changed-code defect identified.
The new polling request matches the branch's Test Cases search contract, the selection helper uses the table structure already used on this branch, and each mutating test targets a distinct UUID-named resource it created.
Important Files Changed
Reviews (1): Last reviewed commit: "Fixes 31799: make BundleSuiteBulkOperati..." | Re-trigger Greptile
Note
Why
skip-pr-checksis applied.Validate PR Metadataresolves same-repo links through GitHub'sclosingIssuesReferences, which GitHub only populates for PRs targeting the default branch. A backport targeting a release branch therefore cannot satisfy it from the description, no matter how theFixes #line is written — every current release-branch PR hits this (e.g. #31808, #31807). The issue is #31799 and is linked from themainPR #31800.