Skip to content

test: enhance lineage spec to cover all the missing cases#26796

Open
chirag-madlani wants to merge 26 commits intofix-column-filteringfrom
lineage-e2e-tests
Open

test: enhance lineage spec to cover all the missing cases#26796
chirag-madlani wants to merge 26 commits intofix-column-filteringfrom
lineage-e2e-tests

Conversation

@chirag-madlani
Copy link
Copy Markdown
Collaborator

@chirag-madlani chirag-madlani commented Mar 26, 2026

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

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • 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.

Summary by Gitar

  • New comprehensive lineage test suite:
    • Added Lineagev1.spec.ts with 30+ test cases covering lineage creation, filtering, and interactions across 15+ entity types
    • Tests include domain, owner, tag, tier, service, and database filters with partial metadata assignment
  • Enhanced lineage utilities:
    • Added getDefaultAdminAPIContext helper for API context initialization
    • Extended getEntityTypeSearchIndexMapping to support 5 new entity types (Directory, File, Spreadsheet, Worksheet, StoredProcedure)
    • Updated verifyExportLineageCSV to accept generic entity arrays
  • Entity support additions:
    • Implemented patch method in MetricClass for entity metadata updates
    • Added lineage nodes for all missing entity types (Directory, File, Spreadsheet, Worksheet)
  • Test configuration update:
    • Modified playwright.config.ts to filter and run lineage-specific tests

This will update automatically on new commits.

@chirag-madlani chirag-madlani requested a review from a team as a code owner March 26, 2026 10:43
@github-actions github-actions bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Mar 26, 2026
SearchIndex: 'searchIndex',
ApiEndpoint: 'apiEndpoint',
Metric: 'metric',
['Store Procedure']: 'storedProcedure',
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Bug: Typo 'Store Procedure' should be 'Stored Procedure'

The search index mapping key ['Store Procedure'] is missing the 'd'. The rest of the codebase (e.g., importUtils.ts, class names) consistently uses 'Stored Procedure'. This mismatch will cause entity type lookups to fail for stored procedures, as getEntityTypeSearchIndexMapping('Stored Procedure') will return undefined.

Suggested fix:

Change:
    ['Store Procedure']: 'storedProcedure',
To:
    ['Stored Procedure']: 'storedProcedure',

Was this helpful? React with 👍 / 👎 | Reply gitar fix to apply this suggestion

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 64%
64.84% (58266/89860) 44.66% (30783/68915) 47.66% (9222/19349)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2026

🔴 Playwright Results — 15 failure(s), 27 flaky

✅ 3493 passed · ❌ 15 failed · 🟡 27 flaky · ⏭️ 208 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 450 0 5 2
🟡 Shard 2 620 0 6 32
🟡 Shard 3 631 0 3 26
🟡 Shard 4 619 0 2 47
🟡 Shard 5 581 0 2 68
🔴 Shard 6 592 15 9 33

Genuine Failures (failed on all attempts)

Pages/Lineage/DataAssetLineage.spec.ts › Verify opening config modal (shard 6)
�[31mTest timeout of 60000ms exceeded while running "beforeEach" hook.�[39m
Pages/Lineage/DataAssetLineage.spec.ts › Verify updating depth configuration (shard 6)
�[31mTest timeout of 60000ms exceeded while running "beforeEach" hook.�[39m
Pages/Lineage/DataAssetLineage.spec.ts › Verify validation for invalid depth (shard 6)
�[31mTest timeout of 60000ms exceeded while running "beforeEach" hook.�[39m
Pages/Lineage/LineageControls.spec.ts › Verify fit view options menu (shard 6)
�[31mTest timeout of 60000ms exceeded.�[39m
Pages/Lineage/LineageControls.spec.ts › Verify fullscreen toggle (shard 6)
Error: �[2mexpect(�[22m�[31mreceived�[39m�[2m).�[22mnot�[2m.�[22mtoContain�[2m(�[22m�[32mexpected�[39m�[2m) // indexOf�[22m

Expected substring: not �[32m"fullscreen=true"�[39m
Received string:        �[31m"http://localhost:8585/table/pw-database-service-4769a46e.pw-database-23d59b8b.pw-database-schema-bdefd443.pw-table-1f4ef556-ab10-48dc-8334-860307da9f4a/lineage?�[7mfullscreen=true�[27m"�[39m
Pages/Lineage/LineageControls.spec.ts › Verify invalid entity search handling (shard 6)
�[31mTest timeout of 60000ms exceeded.�[39m
Pages/Lineage/LineageFilters.spec.ts › verify upstream count for all the entities (shard 6)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeVisible�[2m(�[22m�[2m)�[22m failed

Locator: getByRole('button', { name: 'Downstream 0' })
Expected: visible
Timeout: 15000ms
Error: element(s) not found

Call log:
�[2m  - Expect "toBeVisible" with timeout 15000ms�[22m
�[2m  - waiting for getByRole('button', { name: 'Downstream 0' })�[22m

Pages/Lineage/LineageInteraction.spec.ts › Verify edge click opens edge drawer (shard 6)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeVisible�[2m(�[22m�[2m)�[22m failed

Locator: locator('.edge-info-drawer')
Expected: visible
Timeout: 15000ms
Error: element(s) not found

Call log:
�[2m  - Expect "toBeVisible" with timeout 15000ms�[22m
�[2m  - waiting for locator('.edge-info-drawer')�[22m

Pages/Lineage/LineageInteraction.spec.ts › Verify edge delete button in drawer (shard 6)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeVisible�[2m(�[22m�[2m)�[22m failed

Locator: locator('.edge-info-drawer').getByTestId('delete-edge')
Expected: visible
Timeout: 15000ms
Error: element(s) not found

Call log:
�[2m  - Expect "toBeVisible" with timeout 15000ms�[22m
�[2m  - waiting for locator('.edge-info-drawer').getByTestId('delete-edge')�[22m

Pages/Lineage/LineageInteraction.spec.ts › Verify add pipeline to edge (shard 6)
�[31mTest timeout of 60000ms exceeded.�[39m
Pages/Lineage/LineageInteraction.spec.ts › Verify node panel opens on click (shard 6)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeVisible�[2m(�[22m�[2m)�[22m failed

Locator: getByText('pw-topic-entity-class-0628566d')
Expected: visible
Error: strict mode violation: getByText('pw-topic-entity-class-0628566d') resolved to 2 elements:
    1) <span data-testid="entity-header-display-name" class="ant-typography ant-typography-ellipsis ant-typography-single-line ant-typography-ellipsis-single-line m-b-0 d-block text-left entity-header-display-name text-md font-medium w-54">pw-topic-entity-class-0628566d</span> aka getByTestId('rf__node-2e0628e8-92ef-4910-a9a1-b350ee281d35')
    2) <a data-testid="entity-header-title" href="/topic/pw-messaging-service-a4736a3d.pw-topic-entity-class-0628566d" class="tw:min-w-0 tw:overflow-hidden tw:text-sm tw:font-semibold tw:truncate tw:no-underline tw:text-blue-700 tw:block">pw-topic-entity-class-0628566d</a> aka getByTestId('entity-summary-panel-container').getByTestId('entity-header-title')

Call log:
�[2m  - Expect "toBeVisible
Pages/Lineage/LineageInteraction.spec.ts › Verify edit mode with edge operations (shard 6)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeVisible�[2m(�[22m�[2m)�[22m failed

Locator: locator('.edge-info-drawer')
Expected: visible
Timeout: 15000ms
Error: element(s) not found

Call log:
�[2m  - Expect "toBeVisible" with timeout 15000ms�[22m
�[2m  - waiting for locator('.edge-info-drawer')�[22m

Pages/Lineage/PlatformLineage.spec.ts › Verify table search with special characters as handled (shard 6)
�[31mTest timeout of 60000ms exceeded.�[39m
Pages/Lineage/PlatformLineage.spec.ts › Verify domain platform view (shard 6)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeVisible�[2m(�[22m�[2m)�[22m failed

Locator: getByTestId('lineage-layer-domain-btn')
Expected: visible
Timeout: 15000ms
Error: element(s) not found

Call log:
�[2m  - Expect "toBeVisible" with timeout 15000ms�[22m
�[2m  - waiting for getByTestId('lineage-layer-domain-btn')�[22m

Pages/Lineage/PlatformLineage.spec.ts › Verify platform view switching (shard 6)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).not.�[22mtoHaveClass�[2m(�[22m�[32mexpected�[39m�[2m)�[22m failed

Locator: getByTestId('lineage-layer-domain-btn')
Expected pattern: not �[32m/Mui-selected/�[39m
Timeout: 15000ms
Error: element(s) not found

Call log:
�[2m  - Expect "not toHaveClass" with timeout 15000ms�[22m
�[2m  - waiting for getByTestId('lineage-layer-domain-btn')�[22m

🟡 27 flaky test(s) (passed on retry)
  • Flow/Metric.spec.ts › Verify Related Metrics Update (shard 1, 1 retry)
  • Flow/Tour.spec.ts › Tour should work from help section (shard 1, 1 retry)
  • Flow/Tour.spec.ts › Tour should work from URL directly (shard 1, 1 retry)
  • Pages/AuditLogs.spec.ts › should apply both User and EntityType filters simultaneously (shard 1, 1 retry)
  • Pages/UserCreationWithPersona.spec.ts › Create user with persona and verify on profile (shard 1, 1 retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 2 retries)
  • Features/BulkImport.spec.ts › Keyboard Delete selection (shard 2, 1 retry)
  • Features/DataProductPersonaCustomization.spec.ts › Data Product - customization should work (shard 2, 1 retry)
  • Features/Glossary/GlossaryHierarchy.spec.ts › should cancel move operation (shard 2, 1 retry)
  • Features/ImpactAnalysis.spec.ts › verify tier for Asset level impact analysis (shard 2, 1 retry)
  • Features/ImpactAnalysis.spec.ts › Verify search functionality filters table results (shard 2, 1 retry)
  • Features/Permissions/GlossaryPermissions.spec.ts › Team-based permissions work correctly (shard 3, 1 retry)
  • Features/TestSuiteMultiPipeline.spec.ts › TestSuite multi pipeline support (shard 3, 1 retry)
  • Flow/ExploreDiscovery.spec.ts › Should display deleted assets when showDeleted is checked and deleted is not present in queryFilter (shard 3, 1 retry)
  • Pages/Domains.spec.ts › Rename domain with deeply nested subdomains (3+ levels) verifies FQN propagation (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Rename domain with assets (tables, topics, dashboards) preserves associations (shard 4, 1 retry)
  • Pages/ExploreTree.spec.ts › Verify Database and Database Schema available in explore tree (shard 5, 1 retry)
  • Pages/Glossary.spec.ts › Column dropdown drag-and-drop functionality for Glossary Terms table (shard 5, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › Column lineage for searchIndex -> dashboardDataModel (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage service filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab is NOT visible for dashboardService in platform lineage (shard 6, 1 retry)
  • Pages/ODCSImportExport.spec.ts › Multi-object ODCS contract - object selector shows all schema objects (shard 6, 1 retry)
  • Pages/UserDetails.spec.ts › Create team with domain and verify visibility of inherited domain in user profile after team removal (shard 6, 1 retry)
  • Pages/Users.spec.ts › Permissions for table details page for Data Consumer (shard 6, 1 retry)
  • Pages/Users.spec.ts › Check permissions for Data Steward (shard 6, 1 retry)
  • VersionPages/EntityVersionPages.spec.ts › Directory (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@gitar-bot
Copy link
Copy Markdown

gitar-bot bot commented Mar 28, 2026

Code Review ⚠️ Changes requested 9 resolved / 10 findings

Enhances lineage E2E tests with comprehensive coverage for missing cases, resolving nine test infrastructure issues including missing awaits, incorrect cleanup, and import errors. The typo 'Store Procedure' in the search index mapping must be corrected to 'Stored Procedure' before merging.

⚠️ Bug: Typo 'Store Procedure' should be 'Stored Procedure'

📄 openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts:156

The search index mapping key ['Store Procedure'] is missing the 'd'. The rest of the codebase (e.g., importUtils.ts, class names) consistently uses 'Stored Procedure'. This mismatch will cause entity type lookups to fail for stored procedures, as getEntityTypeSearchIndexMapping('Stored Procedure') will return undefined.

Suggested fix
Change:
    ['Store Procedure']: 'storedProcedure',
To:
    ['Stored Procedure']: 'storedProcedure',
✅ 9 resolved
Bug: Incorrect owner patch value format — array of name instead of object with type/id

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineagev1.spec.ts:495
At line 495, the owner patch value is [EntityDataClass.user1.responseData.name] (an array containing a string). The API expects an object with type and id fields, as used correctly in all other owner patch calls in this file (e.g., lines 621-624, 766-769).

This will cause the PATCH request to fail or set invalid owner data, making the 'clear all filters' test unreliable.

Bug: Missing await on async entity.patch() call

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineagev1.spec.ts:489
At line 489, entity.patch({...}) is called without await. The patch method is async (returns a Promise), so without await the test proceeds before the PATCH request completes. This means the subsequent filter test may run against an entity that hasn't been updated yet, leading to flaky test failures.

All other patch calls in this file (lines 264, 289, 314, 344) correctly use await.

Bug: Schema and column filter tests click wrong dropdown

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineagev1.spec.ts:565-578 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineagev1.spec.ts:615-628
The 'Verify lineage schema filter selection' test (line ~564) and 'Verify lineage column filter selection' test (line ~614) both click search-dropdown-Database instead of their respective filter dropdowns (e.g., search-dropdown-Schema and search-dropdown-Column). They also read entityResponseData.database.name instead of the appropriate schema/column property. These appear to be copy-pasted from the database filter test without updating the selectors and data paths.

While these tests are marked test.fixme, they'll remain broken even when re-enabled unless the selectors and property paths are corrected.

Quality: LineageRightPanel.spec.ts missing afterAll cleanup for entities

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineage/LineageRightPanel.spec.ts:44-50 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineage/LineageRightPanel.spec.ts:101-107
The supportedEntities suite (line 30) creates 10 entities in beforeAll (line 44-49) but has no afterAll hook to delete them. The unsupportedServices suite (line 90) similarly creates 7 services (line 101-107) without cleanup. This leaves test data behind, which can accumulate over repeated test runs and potentially cause flaky behavior in other tests.

Bug: entitiesToHide filter index doesn't match entityToTest index

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineagev1.spec.ts:473 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineagev1.spec.ts:476 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineagev1.spec.ts:519 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineagev1.spec.ts:522 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineagev1.spec.ts:569 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineagev1.spec.ts:572 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineagev1.spec.ts:619 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Lineagev1.spec.ts:622
In the new service type, database, schema, and column filter tests, entityToTest is selected at index 5 or 7 in restEntity, but entitiesToHide always filters out index 3 (index !== 3). This means entityToTest will be included in entitiesToHide, and the test will assert it's both visible AND hidden — which will fail (or coincidentally pass for wrong reasons).

For example in the service type filter test: entityToTest = restEntity[5] but entitiesToHide = restEntity.filter((_, index) => index !== 3). The filter should exclude index 5 to match entityToTest.

This is a copy-paste error from the service filter test where the indices were correct (both used 3).

...and 4 more resolved from earlier reviews

🤖 Prompt for agents
Code Review: Enhances lineage E2E tests with comprehensive coverage for missing cases, resolving nine test infrastructure issues including missing awaits, incorrect cleanup, and import errors. The typo 'Store Procedure' in the search index mapping must be corrected to 'Stored Procedure' before merging.

1. ⚠️ Bug: Typo 'Store Procedure' should be 'Stored Procedure'
   Files: openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts:156

   The search index mapping key `['Store Procedure']` is missing the 'd'. The rest of the codebase (e.g., `importUtils.ts`, class names) consistently uses 'Stored Procedure'. This mismatch will cause entity type lookups to fail for stored procedures, as `getEntityTypeSearchIndexMapping('Stored Procedure')` will return `undefined`.

   Suggested fix:
   Change:
       ['Store Procedure']: 'storedProcedure',
   To:
       ['Stored Procedure']: 'storedProcedure',

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

@sonarqubecloud
Copy link
Copy Markdown

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.

1 participant