Skip to content

Fixes #38916: lineage canvas as browser tests - #38917

Merged
chirag-madlani merged 7 commits into
mainfrom
test/lineage-canvas-browser
Nov 27, 2026
Merged

chirag-madlani merged 7 commits into
mainfrom
test/lineage-canvas-browser

Conversation

@chirag-madlani

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

Copy link
Copy Markdown
Collaborator

Fixes #38916

Stability: UI Browser Tests ran 5 times on this commit (attempts 1–5 of run 45938668522), all green with no retries. Each run selected the 3 lineage test files; the canvas file ran its 37 tests every time. The column-tracing failure seen locally came from an overloaded machine (load average 37–70); run alone, the canvas settles about 1 s after fit-to-view.

Describe your changes:

Wave 2, PR 3 of the lineage migration (open-metadata/openmetadata-collate#8315): the lineage canvas as Vitest browser tests. The real page runs and only the network is mocked. It builds on the shared lineage fixture from #38789, now on main.

  • EntityLineageCanvas.browser.test.tsx (37 runtime tests):

    • every one of the 15 entity types renders on the canvas and opens in the node drawer;
    • the column layer and column tracing;
    • temp-table nodes, and the hide setting being remembered;
    • the settings modal: depth validation, and the refetch with the new depth;
    • lineage search and the filter panel;
    • 9 canvas filters, each asserting the query_filter sent and the nodes drawn. Database, schema and column are tested only on the first hop, so the tests don't encode Lineage: Database, Schema and Column filters stop at the first non-matching node #38783;
    • edges: add, edit pipeline, CSV export and delete;
    • column edges: table→table, table→dashboard, table→metric.

    An edge is selected by focusing its marker button and pressing Enter, the keyboard path, instead of clicking canvas coordinates.

  • fixtures/lineage.ts: the canvas getLineage returns the nodes reachable from the root, or the matches plus their path when filtered. Edges are stateful: PUT upserts, DELETE removes.

  • Tags on 33 runtime tests in DataAssetLineage.spec.ts, LineageFilters.spec.ts and LineageTempTables.spec.ts, pointing at ITs in Fixes #38784: lineage filter, count and metric column ITs; make BaseEntityIT lineage test assert #38785; all the method names exist there. The Domains, Owners, Tag and Tier canvas-filter tests stay untagged until a Java IT pins the canvas metadata filters. Most of the spec diff is Prettier re-indenting.

Found while writing these: a table lineage node without a columns array blanks the canvas, because getTableFlattenChildren calls flatMap on undefined. Real search docs always carry columns, so the fixture defaults it.

Type of change:

  • Improvement

🤖 Generated with Claude Code

chirag-madlani and others added 6 commits November 26, 2026 12:33
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>
…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>
…filters

# Conflicts:
#	.github/playwright/impact-map.generated.json
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EntityLineageCanvas.browser.test.tsx covers the Lineage tab canvas: nodes
and the node drawer for all 15 lineage entity types, the column layer,
column tracing, temp tables (and the remembered hide choice), the lineage
config, the lineage search, the filter panel, the canvas quick filters
(service, service type, domains, owners, tag, tier, database, schema,
column), adding an edge from the node menu, editing an edge's pipeline,
CSV export, deleting an edge, and column lineage to a table, a dashboard
chart and a metric.

fixtures/lineage.ts gains the canvas getLineage (only nodes reachable from
the root; with a filter, the matches plus their path to the root), PUT and
DELETE /lineage, getLineageEdge, exportAsync and the node drawer's calls.

The replaced Playwright tests are tagged migratedTo.browser/split.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rowser

# Conflicts:
#	.github/playwright/impact-map.generated.json
#	openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineage/LineageFilters.spec.ts
#	openmetadata-ui/src/main/resources/ui/src/test/browser/fixtures/lineage.ts
@chirag-madlani
chirag-madlani marked this pull request as ready for review November 27, 2026 04:56
@chirag-madlani
chirag-madlani requested a review from a team as a code owner November 27, 2026 04:56
@chirag-madlani
chirag-madlani requested review from anuj-kumary and a balanced review from Copilot November 27, 2026 04:56

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.

@chirag-madlani
chirag-madlani enabled auto-merge (squash) November 27, 2026 09:32
…nvas; fixture review fixes

- getTableFlattenChildren was the only children resolver without `?? []`,
  so a table or dashboard data model node with no `columns` threw inside
  the layout and blanked the canvas. Unit-tested for both types.
- serveLineage: `root` now drives every lineage handler (entity count,
  directional, columnEdge), not just the canvas ones.
- getLineage/{direction} returns only its own side: upstream edges reach
  the root, downstream edges leave it.

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

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 27, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Defaulting missing table columns to an empty list changes lineage rendering for incomplete records, preventing canvas blanking; impact is localized to UI.

Adds the lineage canvas as Vitest browser tests covering entity rendering, column tracing, canvas filters, edge operations, and settings validation, with network mocked via a stateful lineage fixture. No issues found.

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 77549bd into main Nov 27, 2026
53 checks passed
@chirag-madlani
chirag-madlani deleted the test/lineage-canvas-browser branch November 27, 2026 10:42
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 canvas as browser tests (Wave 2)

3 participants