Skip to content

Chore(UI): Fix playwright test failures in AUTs#27706

Merged
aniketkatkar97 merged 7 commits intomainfrom
fix-release-auts
Apr 27, 2026
Merged

Chore(UI): Fix playwright test failures in AUTs#27706
aniketkatkar97 merged 7 commits intomainfrom
fix-release-auts

Conversation

@aniketkatkar97
Copy link
Copy Markdown
Member

@aniketkatkar97 aniketkatkar97 commented Apr 24, 2026

Fix the failures in

Failing due to custom property cleanup happening in other spec/ teardown step before tests run. Hence removed the cleanups for custom properties.

  • ExplorePageRightPanel.spec.ts
  • EntityPermissions.spec.ts

Failing due to the query is not long enought to show the scroll bar.

  • CustomProperties.spec.ts

Summary by Gitar

  • Test maintenance:
    • Cleaned up redundant logic in domain.ts to improve test reliability for domain selections.
    • Updated customizeNavigation.ts to refine visibility assertions for nested sidebar items.
    • Adjusted network response monitoring in customProperty.ts by updating the URL filter from profile to fields.

This will update automatically on new commits.

@aniketkatkar97 aniketkatkar97 self-assigned this Apr 24, 2026
@aniketkatkar97 aniketkatkar97 requested a review from a team as a code owner April 24, 2026 11:14
Copilot AI review requested due to automatic review settings April 24, 2026 11:14
@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Apr 24, 2026
@aniketkatkar97 aniketkatkar97 added the To release Will cherry-pick this PR into the release branch label Apr 24, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Stabilizes Playwright E2E tests in AUT environments by adjusting navigation validation logic and reducing/altering custom-properties cleanup behaviors that can cause test failures.

Changes:

  • Simplified dropdown expansion waiting/verification in validateLeftSidebarWithHiddenItems.
  • Removed custom-property cleanup helpers from shared entity support classes.
  • Updated Custom Properties E2E spec cleanup and adjusted the SQL CodeMirror scroll test input.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
openmetadata-ui/src/main/resources/ui/playwright/utils/customizeNavigation.ts Updates sidebar hidden-item validation flow and dropdown visibility assertions.
openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityDataClass.ts Removes custom-properties schema cleanup from global post-requisites.
openmetadata-ui/src/main/resources/ui/playwright/support/entity/EntityClass.ts Removes per-entity custom-properties cleanup helper and related import.
openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/CustomProperties.spec.ts Removes custom-properties cleanup call in afterAll and tweaks SQL scroll test typing behavior.
Comments suppressed due to low confidence (2)

openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/CustomProperties.spec.ts:312

  • This afterAll now deletes the entity but no longer cleans up the custom properties created in beforeAll via prepareCustomProperty(). Since createCustomPropertyForEntity() adds random cp-*-<uuid> definitions to the entity's metadata type, rerunning against a persistent AUT can accumulate many custom properties and impact other tests. Consider adding a targeted cleanup step that removes only the custom properties created for this test (track the created names from mainEntity.customPropertyValue), rather than removing the entire /customProperties array.
    test.afterAll(async ({ browser }) => {
      const { apiContext, afterAction } = await createNewPage(browser);

      if (makeInstance !== null) {
        await mainEntity.delete(apiContext);
        if (key === 'entity_dataProduct') {
          for (const domain of (mainEntity as DataProduct).getDomains()) {
            await domain.delete(apiContext);
          }
        }
      } else if (tableForColumnTest !== null) {

openmetadata-ui/src/main/resources/ui/playwright/utils/customizeNavigation.ts:103

  • For items that are nested under a dropdown (those present in SIDEBAR_LIST_ITEMS), the code expands the parent, validates the child, then collapses the parent again. After that, the function falls through to the generic hiddenItems.includes(item) visibility assertion for app-bar-item-${item}; at this point the submenu is collapsed, so the child item will typically be hidden and the assertion can fail for non-hidden items. Consider skipping the generic assertion for these nested items (e.g., continue after collapsing), or performing the app-bar-item-${item} assertion while the parent submenu is still expanded.
        await page.click(`[data-testid="${items[0]}"]`);
      }
      if (hiddenItems.includes(item)) {
        await expect(
          page.getByTestId('left-sidebar').getByTestId(`app-bar-item-${item}`)
        ).not.toBeVisible();
      } else {

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 61%
62.06% (61926/99779) 42.15% (33109/78550) 45.24% (9803/21668)

Copilot AI review requested due to automatic review settings April 27, 2026 04:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread openmetadata-ui/src/main/resources/ui/playwright/utils/customizeNavigation.ts Outdated
Copilot AI review requested due to automatic review settings April 27, 2026 11:27
@open-metadata open-metadata deleted a comment from github-actions Bot Apr 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Comment thread openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts
@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 27, 2026

Code Review ✅ Approved

Updates Playwright selectors and timeout configurations to resolve intermittent test failures in the application under test. No issues found.

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

@github-actions
Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (21 flaky)

✅ 3955 passed · ❌ 0 failed · 🟡 21 flaky · ⏭️ 86 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 297 0 2 4
🟡 Shard 2 739 0 5 8
🟡 Shard 3 745 0 5 7
🟡 Shard 4 755 0 4 18
🟡 Shard 5 686 0 1 41
🟡 Shard 6 733 0 4 8
🟡 21 flaky test(s) (passed on retry)
  • Features/DescriptionSuggestion.spec.ts › should edit and accept a suggested table column description (shard 1, 1 retry)
  • Pages/UserCreationWithPersona.spec.ts › Create user with persona and verify on profile (shard 1, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event is created when description is updated (shard 2, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event shows the actor who made the change (shard 2, 1 retry)
  • Features/DataQuality/TestCaseImportExportE2eFlow.spec.ts › Admin: Complete export-import-validate flow (shard 2, 1 retry)
  • Features/DataQuality/TestCaseResultPermissions.spec.ts › User with only VIEW cannot PATCH results (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should start term as Draft when glossary has reviewers (shard 2, 2 retries)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Features/UserProfileOnlineStatus.spec.ts › Should not show online status for inactive users (shard 3, 1 retry)
  • Features/Workflows/WorkflowOssRestrictions.spec.ts › editing a form field and saving node config then workflow fires PUT API with updated data (shard 3, 1 retry)
  • Flow/PersonaDeletionUserProfile.spec.ts › User profile loads correctly before and after persona deletion (shard 3, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 3, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for Table (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for Container (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for Spreadsheet (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Domain Rbac (shard 4, 1 retry)
  • Pages/Entity.spec.ts › Inactive Announcement create & delete (shard 5, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema 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/ServiceEntity.spec.ts › Tier Add, Update and Remove (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)

📦 Download artifacts

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

@aniketkatkar97 aniketkatkar97 merged commit 48a7de3 into main Apr 27, 2026
54 of 55 checks passed
@aniketkatkar97 aniketkatkar97 deleted the fix-release-auts branch April 27, 2026 17:55
@github-actions
Copy link
Copy Markdown
Contributor

Failed to cherry-pick changes to the 1.12.7 branch.
Please cherry-pick the changes manually.
You can find more details here.

aniketkatkar97 added a commit that referenced this pull request Apr 27, 2026
* Fix the failures in ExplorePageRightPanel, EntityPermissions, CustomProperties specs

* Fix checkstyle

* Fix customizeDetailsPage spec

* Fix the test flakiness and failures

* fix checkstyle
aniketkatkar97 added a commit that referenced this pull request Apr 27, 2026
* Fix the failures in ExplorePageRightPanel, EntityPermissions, CustomProperties specs

* Fix checkstyle

* Fix customizeDetailsPage spec

* Fix the test flakiness and failures

* fix checkstyle
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 To release Will cherry-pick this PR into the release branch UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants