Skip to content

test(web): remove Base UI component mocks - #39877

Merged
lyzno1 merged 1 commit into
mainfrom
codex/remove-base-ui-test-mocks
Aug 2, 2026
Merged

test(web): remove Base UI component mocks#39877
lyzno1 merged 1 commit into
mainfrom
codex/remove-base-ui-test-mocks

Conversation

@lyzno1

@lyzno1 lyzno1 commented Aug 1, 2026

Copy link
Copy Markdown
Member

Summary

  • remove the shared fake Popover, DropdownMenu, Select, and Tooltip implementations and their self-test
  • keep Dify UI primitives and feature-owned BlockSelector, PluginVersionPicker, and TimePicker wrappers real across Web tests
  • rewrite consumers around semantic roles, real portals/state attributes, and user interactions; delete mock-only and unreachable-input tests
  • add a source boundary test and testing guidance to prevent interactive component mocks from returning

This is the test-governance follow-up to #39864. It changes no runtime source files.

Scope

  • removed 144 direct interactive @langgenius/dify-ui/* mocks
  • removed 17 feature-wrapper mocks (11 BlockSelector, 3 PluginVersionPicker, 3 TimePicker)
  • net removed 10,063 lines across 130 files

Validation

  • 120 affected test files: 1,618 tests passed
  • pnpm type-check --pretty false in web/
  • pnpm check (0 errors; existing warnings remain)
  • git diff --check
  • governance scan: 0 target primitive mocks, 0 target wrapper mocks

@github-actions github-actions Bot added the web This relates to changes on the web. label Aug 1, 2026
@lyzno1
lyzno1 marked this pull request as ready for review August 1, 2026 14:49
@dosubot dosubot Bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Aug 1, 2026
@lyzno1
lyzno1 enabled auto-merge August 1, 2026 14:49
@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.18%. Comparing base (b682433) to head (d5f2a8f).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #39877      +/-   ##
==========================================
- Coverage   86.20%   86.18%   -0.02%     
==========================================
  Files        5088     5088              
  Lines      287759   287759              
  Branches    57329    57329              
==========================================
- Hits       248061   248017      -44     
- Misses      34888    34932      +44     
  Partials     4810     4810              
Flag Coverage Δ
dify-ui 93.07% <ø> (ø)
web 85.88% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lyzno1
lyzno1 added this pull request to the merge queue Aug 2, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Aug 2, 2026
Merged via the queue into main with commit 802fe70 Aug 2, 2026
42 checks passed
@lyzno1
lyzno1 deleted the codex/remove-base-ui-test-mocks branch August 2, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants