Skip to content

fix(ui): unbreak ColumnDetailPanel test suite on 1.12.6#27437

Open
siddhant1 wants to merge 1 commit into1.12.6from
fix/column-detail-panel-test-mui-styled-mock
Open

fix(ui): unbreak ColumnDetailPanel test suite on 1.12.6#27437
siddhant1 wants to merge 1 commit into1.12.6from
fix/column-detail-panel-test-mui-styled-mock

Conversation

@siddhant1
Copy link
Copy Markdown
Member

Summary

  • Remove the jest.mock('@mui/material/styles', ...) block from ColumnDetailPanel.test.tsx that made the entire suite fail to load on 1.12.6.
  • The mock's styled implementation returned jest.fn().mockImplementation(...). Jest mock functions are non-extensible, so when @mui/x-tree-view/TreeItem (pulled in transitively via MUIAsyncTreeSelect -> MUIDomainSelect -> formUtils -> ... -> ColumnDetailPanel) assigned TreeItemCheckbox.displayName, it threw TypeError: Cannot add property displayName, object is not extensible.

Background

Test plan

  • yarn test --testPathPattern=ColumnDetailPanel.test.tsx → 16/16 pass locally
  • eslint on the modified file → clean
  • tsc --noEmit → no new errors
  • CI SonarCloud + Jest Coverage workflow passes

🤖 Generated with Claude Code

Drop the `@mui/material/styles` mock whose `styled` implementation returned
`jest.fn().mockImplementation(...)`. Jest mock functions are non-extensible,
so when `@mui/x-tree-view/TreeItem` (pulled transitively via
MUIAsyncTreeSelect -> MUIDomainSelect -> formUtils) assigned
`TreeItemCheckbox.displayName`, it threw
`TypeError: Cannot add property displayName, object is not extensible`
and the entire suite failed to load.

Verified: 16/16 tests pass after removal. The mock was introduced in #24268
and removed on main in #26396 during the MUI->UntitledUI migration; this
brings 1.12.6 in line.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@siddhant1 siddhant1 requested a review from a team as a code owner April 16, 2026 14:16
@github-actions
Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@siddhant1 siddhant1 added the safe to test Add this label to run secure Github workflows on PRs label Apr 16, 2026
@gitar-bot
Copy link
Copy Markdown

gitar-bot bot commented Apr 16, 2026

Code Review ✅ Approved

Restores the ColumnDetailPanel test suite compatibility for version 1.12.6. 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

@github-actions
Copy link
Copy Markdown
Contributor

❌ UI Checkstyle Failed

❌ ESLint + Prettier + Organise Imports (src)

One or more source files have linting or formatting issues.

❌ Core Components — ESLint + Prettier

One or more core-component files have linting or formatting issues.


Fix locally (fast — only checks files changed in this branch):

make ui-checkstyle-changed

@github-actions
Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 65%
66% (57588/87246) 45.69% (30524/66796) 48.47% (9145/18865)

@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant