Files
ocis/web/tests
Matteo e6a838708c fix(web): layer the test helpers instead of adding a package for them
Drops `@ownclouders/web-test-helpers-core` again and keeps the workspace
graph acyclic by layering the helpers onto the packages that already need
them:

  design-system/testing  mount/shallowMount, prop types, design system +
                         gettext + router-link stub plugins
  web-pkg/src/testing    the above, extended with casl abilities, mocked
                         pinia stores and component mocks
  web-test-helpers       re-export of web-pkg/src/testing

design-system sits at the bottom of the graph, so it cannot depend on a
package that installs it - hence the generic half lives there. web-pkg
composes those plugins rather than duplicating them, so every helper is
still defined exactly once, and no package depends on one above it.

The public API of `@ownclouders/web-test-helpers` is unchanged, so
external extensions are unaffected. This also removes the testing package
from web-pkg's runtime dependencies, the module-level plugin registry and
the two public-hoist entries in .npmrc.

Two fixes to the published artifacts, both verified by mounting through
the built bundles the way an external extension resolves them:

- keep `@ownclouders/design-system/testing` external in web-pkg's lib
  build. rollup matches `external` strings exactly, so the subpath was
  inlined, shipping a second copy of the design system and of
  @vue/test-utils - components and wrappers were then not identity-equal
  to the consumer's own, and gettext injection broke.
- name the web-test-helpers umd output `.cjs`. The package is ESM, so the
  `.js` file that publishConfig.exports pointed `require` at could not be
  required.
2026-09-21 17:45:49 +02:00
..