Repository navigation
Fixes #37220, #37221: Migrate entity, custom-property and advanced-search specs to browser tests; run only affected browser tests - #36198
Conversation
…lure vitest-browser-react unmounts in the next test's beforeEach, so the global afterEach reset handlers and the URL under a still-mounted page, which then refetched and got wrong-shaped responses (unhandled paging/permission errors). Also write lcov when a test fails so one flake can't drop Sonar coverage.
…nd stability runs Runs the browser suite with istanbul coverage and posts a Jest-style coverage and JUnit comment, plus five shuffled no-retry runs whose failures are summarized in a second comment. Drops the duplicate patch file.
…s on failure main now calls /metadata/types/workflows/approvalEnforcedEntityTypes and /changeRequests from entity pages, which the strict unmocked-API check caught. The workflow now records wall time and uploads screenshots even when tests fail.
# Conflicts: # openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Pagination.spec.ts # openmetadata-ui/src/main/resources/ui/yarn.lock
…rker Adds a Data Steward persona built from the seeded policies (server-accurate ViewAll/EditAll expansion and notAllow), an entity server that applies the page's JSON patches, a search fixture keyed by index alias, and the first migrated flow: owners add/replace/clear on the table page. Drops the AntDConfigProvider main removed. migratedTo.browser/javaIT tags Playwright tests whose coverage moved, with the replacement in an annotation.
…ity type Vitest runs a file in one worker, so the 195 cases ran serially (6m18s locally). The flows now live in entityDataSteward.contract.tsx and each entity type has a thin file, so workers run types in parallel (4m25s on 3 workers). The Playwright marker points at the new files.
|
✅ SSO Login Nightly — PASSED View workflow run · Commit
Totals: 118 passed · 0 failed · 0 flaky · 0 skipped · duration 25m 39s |
…contract settle() slept 300 ms. The contract now waits until MSW has nothing in flight and no new request for a short quiet window, which is what a request count needs to be final; render waits poll for the row. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…advanced search Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Data Models and Stored Procedures: their browser tests are pinned failing by a product bug (#38295), so their Playwright tests stay untagged; double fetch filed as #38296. Migration doc counts and rows updated. - Decision record is Proposed until the team signs off. - No Sonar claims (it does not read browser coverage yet); no unused JUnit. - The workflow also runs on setup-action changes; the setup action caches Chromium and the ANTLR CLI. - setup.ts resets the app-wide zustand stores between tests. - networkIdle counts /api requests only and notes its quiet-window limit. - Screenshot comparison runs on Linux only (its baseline's platform). - Contract: two-page assumption checked, empty-record guard, isListPage shared, search mock scope documented; msw resolutions dropped. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rowser-migration # Conflicts: # .github/workflows/ui-browser-tests.yml # openmetadata-ui/src/main/resources/ui/src/test/browser/setup.ts
# Conflicts: # .claude/rules/frontend-browser-tests.md # .github/playwright/impact-map.generated.json # .github/workflows/ui-browser-tests.yml # .gitignore # openmetadata-ui/src/main/resources/ui/package.json # openmetadata-ui/src/main/resources/ui/src/components/LineageTable/ImpactAnalysisPagination.browser.test.tsx # openmetadata-ui/src/main/resources/ui/src/pages/MetricsPage/MetricListPage/MetricListPage.browser.test.tsx # openmetadata-ui/src/main/resources/ui/src/pages/ServiceDetailsPage/DriveServiceFiles.browser.test.tsx # openmetadata-ui/src/main/resources/ui/src/test/browser/README.md # openmetadata-ui/src/main/resources/ui/src/test/browser/fixtures/table.ts # openmetadata-ui/src/main/resources/ui/src/test/browser/paginationContract.ts # openmetadata-ui/src/main/resources/ui/src/test/browser/renderWithApp.tsx # openmetadata-ui/src/main/resources/ui/src/test/browser/setup.ts # openmetadata-ui/src/main/resources/ui/vitest.browser.config.ts
- SearchBar: one debounced search per typingInterval reading the latest onSearch, so a rerender then unmount leaves no old timer running. - TreeSelect: resync on the selected nodes' content (id, label, data), so a renamed selection updates while an equal rebuilt value keeps the draft. - Selection: a changed screenshot baseline runs its test, global styles run everything, and a deleted source file still selects its tests. - Workflow: manual runs always run in full; a run that selects nothing still updates the PR comment with why. - Tests: no as-unknown-as casts (typed EntityLike children, generic column fixtures); setup.ts store reset and the Bots fixture now type-check. - pickOption keeps its confirm-then-repick, documented as the one sanctioned re-attempt, and the rule now says when that is allowed. - Decision record for the selection policy. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…l when selection fails A core-only pull request still runs core's own tests, but the merge queue now runs every browser test for it, so a core change that breaks the app cannot reach main. If test selection fails, the report check fails instead of being skipped (a skipped required check passes). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code Review ✅ Approved 🟡 Medium risk 3 closed / 3 findingsSelective browser-test CI and UI fixes change test coverage and bounded interactions; a selection miss could leave affected PR checks unrun before merge-queue validation. Migrates entity, custom-property and advanced-search checks from Playwright into browser tests and runs only affected browser tests on pull requests. Resolved stuck poll handler leak, screenshot baseline selection gap, and missing ADR documentation. No issues found. ✅ 3 closed✅ Edge Case: A stuck in-flight poll skips handler reset and leaks into later tests
✅ Bug: Changed screenshot baselines select no test, so visual checks never run
✅ Quality: Impact-based browser-test selection policy is not recorded in docs/decisions
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. 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:
Draft, stacked on #35623 (the Vitest browser-mode POC). Base is
poc/ui-integration-tests, so this diff shows only the migration work.This follows the testing-strategy plan. Playwright keeps genuine end-to-end flows. UI checks become browser tests: the real page and its real children, with only the network mocked. API behaviour becomes Java integration tests (#36327).
What moved
EntityDataSteward.spec.tsentity-matrix/EntityDataSteward.*.browser.test.tsx(per entity type)EntityDataConsumer.spec.tsentity-matrix/EntityDataConsumer.*Entity.spec.tsentity-matrix/EntityAdmin.*,EntityColumnPanel.*,EntityTableTabsServiceEntity.spec.tsentity-matrix/ServiceEntity.*CustomProperties.spec.tscustom-properties/*AdvancedSearch.spec.tsadvanced-search/*@migrated-browser, across 9 files.@migrated-java-it, each naming the IT method that covers it. All the references resolve, some to the ITs added in Fixes #36326: Java ITs for API behaviour only Playwright tested #36327.playwright/constant/migration.ts:migratedTo.browser/.javaIT/.split).Harness (
src/test/browser/fixtures/):CompiledRule.matchOperation, includingViewAll/EditAllexpansion,notAllowvsdeny, andisOwner()/noOwner()returningconditionalAllowon resource-level lookups.Product bugs the migration found (each has a regression test):
SearchBar: a debounced search fired after unmount and leaked into whatever rendered next. It is now cancelled on unmount only.OMFieldSelect: after anullcommit, the Field box went blank even though a field was still held.TreeSelect(staged mode): the draft reset whenevervaluechanged identity. An entity refetch rebuilds the tags array, so a glossary term or tag picked just before the refetch was lost on Apply. It now resyncs on the selected nodes' content (id, label, data), so an equal rebuilt value keeps the draft and a renamed selection still updates.CI (
ui-browser-tests.yml)Pull requests run only the affected test files (
scripts/select-browser-tests.mjs). Full runs record which source files each test file executes (coverage counters,src/test/browser/impact.ts). A PR selects:en-us.jsonkey;It runs everything for changes to test setup, the Vite/Vitest config, dependencies, global styles (
src/styles/), or when no map exists yet. Manual runs always run everything. Replayed over 60 recent main commits it averaged about 48% of a full run before core components stopped forcing full runs.Core components are treated like a library on pull requests: a core-only change runs core's own tests and build (the
core componentsjob), not the browser tests.The policy is recorded in
ADR:2026-11-23-browser-tests-run-by-impact-on-pull-requests-and-in-full-in-the-merge-queue(Proposed).The merge queue runs every test file whenever the queued change touches the UI or core components (
merge_grouphas nopathsfilter, so the select job diffs the queue entry). A selection miss, or a core change that breaks the app, therefore cannot reach main. If selection itself fails, the report check fails rather than being skipped. Its passing run publishes the impact map as an artifact that PRs download; queue caches are not readable from PRs.PR comment:
This replaces an overall coverage percentage, which only reflects whichever tests were selected.
Up to 5 shards (fewer when few files are selected), with blob reports merged by a report job.
No test retries; the one exception is
pickOption's confirm-then-repick for a dropped combobox click, documented in the code and the rule. The shuffled stability matrix was removed once it showed no flakes (3,210/3,210). A nightly shuffled run replaces it as follow-up openmetadata-collate#8349.The setup action caches Chromium per Playwright version (no apt deps), installs the ANTLR CLI from a cached jar with a pinned checksum, and retries
yarn install.Timeouts: 30 s per test and a 10 s
expect.polldefault. Long cold-load waits usescaled()/suiteTimeout(), which double under coverage instrumentation.Results
Review tip: Prettier re-indented each marked Playwright test. Hide whitespace to see the real change.
Type of change:
Tests:
Browser tests, and unit tests for the three product fixes. The Playwright tests keep running unchanged until the migration is validated.
Checklist:
🤖 Generated with Claude Code
Summary by Gitar
BulkCreateConflictPolicyandBulkCreateResulthandling toEntityRepositoryWorkflowEventConsumerandMutationOpintoEntityRepositoryfor change requestsSearchbarunmounts, so closed pickers don't fire stale requestsOMFieldSelectwhen a Field box is left unpickedselect-browser-tests.mjstest:ui:coveragerunEntityAdmin,EntityColumnPanel,ServiceEntity,AdvancedSearchandCustomPropertiesbrowser suites beyond the Data Steward matrixThis will update automatically on new commits.


Confidence Score: 5/5
The latest changes appear safe to merge.Summary
Moves entity, custom-property, and advanced-search checks into browser tests while keeping the marked Playwright tests running. Pull requests select affected browser tests; the merge queue runs the full suite.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Workflow starts] --> B{Event} B -->|Pull request| C[Select affected browser tests] B -->|Merge queue| D{UI or core changed?} B -->|Manual| E[Run every browser test] D -->|Yes| E D -->|No| F[Skip browser tests] C -->|Tests selected| G[Run selected tests] C -->|None selected| H[Publish no-test explanation] C -->|Selection fails| I[Fail reporting check] E --> J[Merge reports] G --> J J --> K[Report results]Reviews (12) · Last reviewed commit: "ci(ui): run the full browser suite in th..." · Reviewed by Greptile