Skip to content

Fixes #38788: lineage impact-analysis filters and counts as browser tests - #38789

Merged
chirag-madlani merged 4 commits into
mainfrom
test/lineage-browser-filters
Nov 26, 2026
Merged

chirag-madlani merged 4 commits into
mainfrom
test/lineage-browser-filters

Conversation

@chirag-madlani

@chirag-madlani chirag-madlani commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #38788

Describe your changes:

Wave 2, PR 1 of the lineage migration (open-metadata/openmetadata-collate#8315): the impact-analysis half of LineageFilters.spec.ts as Vitest browser tests. The real page runs and only the network is mocked. The API half is in #38785. No canvas tests yet; those are PR 3.

  • src/test/browser/fixtures/lineage.ts (new, shared): serveLineage({ upstream, downstream, columnEdges, facets }) serves the root entity, lineage/scene, search/aggregate, getLineageByEntityCount and getLineage/{direction}, and records each request. It filters nodes by the query_filter / column_filter the page actually sends, so rows depend on the request rather than echoing the mock. Per-depth counts follow AbstractLineageGraphBuilder#buildPaginationInfo.
  • LineageTable.browser.test.tsx (new, 10 tests):
    • the filter panel toggle;
    • Service and Service Type filters: rows, exact query_filter, badge count, and Clear All refetching with no filter;
    • Domains, Owners, Tag and Tier filters;
    • search, which sends the name/displayName wildcard;
    • per-direction depth counts;
    • the Column filter at Column Level.
  • ImpactAnalysisPagination.browser.test.tsx: its inline handlers are replaced by the shared fixture.
  • LineageFilters.spec.ts: tags only. The service, service type and upstream/downstream count tests are migratedTo.split with the LineageFilterIT methods from Fixes #38784: lineage filter, count and metric column ITs; make BaseEntityIT lineage test assert #38785. Most of the diff is Prettier re-indenting; ignoring whitespace it's +68/−19, and the test bodies are unchanged. The filter-panel toggle and the Domains, Owners, Tag and Tier tests run on the canvas, so they stay untagged until PR 3.

Column filter, for reviewers: the canvas (Lineage.tsx) sends a query_filter on columns.name.keyword. Impact analysis at Column Level (LineageTable.tsx) sends column_filter=columnName:<name> and leaves it out of query_filter. This PR asserts the impact-analysis behaviour.

Type of change:

  • Improvement

Tests

  • The two changed browser-test files passed 10 runs in a row (12 tests each).
  • A combined run of src/components/LineageTable and src/test/browser: 110 files, 1,008 passed, 154 skipped.
  • ESLint and Prettier are clean, tsc shows no errors in the changed files, and the Playwright tsconfig check is clean.

🤖 Generated with Claude Code

Add a shared lineage MSW fixture (fixtures/lineage.ts). It serves the root
table, the scene, the filter facets, getLineageByEntityCount and
getLineage/{direction}, and applies query_filter/column_filter to the nodes
the way the server does. Move ImpactAnalysisPagination onto it. Cover the
filter panel toggle, the service, service type, domain, owner, tag and tier
filters, the search box, the per-direction depth counts and the Column
Level column_filter in LineageTable.browser.test.tsx. Tag the replaced
LineageFilters Playwright tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chirag-madlani
chirag-madlani requested a review from a team as a code owner November 26, 2026 07:05
@chirag-madlani
chirag-madlani requested review from karthicksharan and a balanced review from Copilot November 26, 2026 07:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions

Copy link
Copy Markdown
Contributor

UI browser tests

Ran: 3 of 136 test files execute the changed code

Result: ✅ 14 passed · 0 skipped

…mode panel toggle

The Playwright filter-panel toggle runs on the lineage canvas; the browser
test covers impact-analysis mode, so it stays untagged until the canvas PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 26, 2026 07:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

…filters

# Conflicts:
#	.github/playwright/impact-map.generated.json
Copilot AI balanced review requested due to automatic review settings November 26, 2026 07:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 26, 2026 08:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@gitar-bot

gitar-bot Bot commented Nov 26, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🟢 Low risk 1 closed / 1 findings

The PR adds browser tests and shared mocked lineage fixtures while changing test migration metadata; application runtime behavior and interfaces remain unchanged.

Adds Vitest browser tests for the impact-analysis filters and counts in LineageTable, with a shared serveLineage fixture that mocks the network while the real page runs. The canvas filter-toggle tag was removed, and the remaining tags cover impact-analysis tests only. No open issues found.

✅ 1 closed
✅ Quality: Canvas filter-toggle test tagged as migrated to an impact-analysis test

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineage/LineageFilters.spec.ts:394-408 📄 openmetadata-ui/src/main/resources/ui/src/components/LineageTable/LineageTable.browser.test.tsx:128-142
Verify lineage filter panel toggle runs after the file's beforeEach (visitLineageTab). It never calls openImpactAnalysisTab, and it scopes its Domains assertion to getByTestId('lineage-details'), which is the canvas in Lineage.component.tsx. So the test is about the canvas. Its replacement in LineageTable.browser.test.tsx only opens mode=impact_analysis and clicks the CustomControls instance inside LineageTable.

The canvas path is still untested. That path also flips the fullscreen URL param when filters open (CustomControls.component.tsx). Yet migratedTo.browser tells whoever prunes @migrated-browser tests that this Playwright test can now be deleted. That contradicts the PR's own rule: "No canvas tests yet; those are PR 3", with canvas-half tests left untagged.

Fix: leave this test untagged until PR 3 adds a canvas browser test. Alternatively, add a canvas-mode toggle case (lineageImpactUrl without mode=impact_analysis) to the browser test now.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

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

@chirag-madlani
chirag-madlani merged commit 7004e38 into main Nov 26, 2026
46 checks passed
@chirag-madlani
chirag-madlani deleted the test/lineage-browser-filters branch November 26, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lineage impact-analysis filters and counts as browser tests (Wave 2)

3 participants