Repository navigation
Commit f2ea524
committed
test(plugin-list): fold thirteen ListView pins that mock nothing onto one shared harness
Thirteen per-issue ListView pins render the real ListView with no vi.mock.
Each becomes a top-level describe in ListView.harness.test.tsx, named after
its former file, with its fixtures, hooks and assertions moved verbatim.
The five that register a stand-in renderer in ComponentRegistry sit after
the eight that register nothing. I18nProvider is imported once from
@object-ui/i18n, the binding @object-ui/react re-exports.
Each block opens with restoreAfterBlock(), which puts back after the
block's last test what a former file never handed on: ComponentRegistry
entries the block added, replaced or removed, a swapped-in localStorage,
the contents of both storages, and the lang / dir I18nProvider sets on
<html>. Without it three blocks left stand-in renderers registered or the
real object-grid unregistered, mutationRefresh left its localStorage
stand-in installed, and displayMenuClose's saved view preference reached
the four blocks after it. With it every block starts from the state its
former file started from, and the file passes in shuffled orders.
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgXNVxCQk1CCy55gFjQ1 parent e00bcc6 commit f2ea524
14 files changed
Lines changed: 1354 additions & 1375 deletions
File tree
- ui/packages/plugin-list/src/__tests__
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments