Skip to content

feat(atomic): migrate commerce facet stories to MSW#7612

Draft
alexprudhomme wants to merge 1 commit into
msw-request-transformersfrom
msw-commerce-facets
Draft

feat(atomic): migrate commerce facet stories to MSW#7612
alexprudhomme wants to merge 1 commit into
msw-request-transformersfrom
msw-commerce-facets

Conversation

@alexprudhomme
Copy link
Copy Markdown
Contributor

Problem

Commerce storybook stories for facet components don't use MSW for API mocking, making them less reliable and harder to test in isolation.

Solution

Migrate atomic-commerce-facet, atomic-commerce-facets, atomic-commerce-numeric-facet, atomic-commerce-category-facet, and atomic-commerce-timeframe-facet stories to use MockCommerceApi MSW handlers.

Each story now:

  • Imports and instantiates MockCommerceApi
  • Adds msw: {handlers: [...commerceApiHarness.handlers]} to parameters
  • Adds beforeEach: () => { commerceApiHarness.clearAll(); } for test isolation

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 21, 2026

⚠️ No Changeset found

Latest commit: c5f8912

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@svcsnykcoveo
Copy link
Copy Markdown

svcsnykcoveo commented May 21, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 21, 2026

@coveo/atomic

npm i https://pkg.pr.new/@coveo/atomic@7612

@coveo/atomic-hosted-page

npm i https://pkg.pr.new/@coveo/atomic-hosted-page@7612

@coveo/atomic-legacy

npm i https://pkg.pr.new/@coveo/atomic-legacy@7612

@coveo/atomic-react

npm i https://pkg.pr.new/@coveo/atomic-react@7612

@coveo/auth

npm i https://pkg.pr.new/@coveo/auth@7612

@coveo/bueno

npm i https://pkg.pr.new/@coveo/bueno@7612

@coveo/create-atomic

npm i https://pkg.pr.new/@coveo/create-atomic@7612

@coveo/create-atomic-component

npm i https://pkg.pr.new/@coveo/create-atomic-component@7612

@coveo/create-atomic-component-project

npm i https://pkg.pr.new/@coveo/create-atomic-component-project@7612

@coveo/create-atomic-result-component

npm i https://pkg.pr.new/@coveo/create-atomic-result-component@7612

@coveo/create-atomic-rollup-plugin

npm i https://pkg.pr.new/@coveo/create-atomic-rollup-plugin@7612

@coveo/headless

npm i https://pkg.pr.new/@coveo/headless@7612

@coveo/headless-react

npm i https://pkg.pr.new/@coveo/headless-react@7612

@coveo/shopify

npm i https://pkg.pr.new/@coveo/shopify@7612

commit: c5f8912

@chromatic-com
Copy link
Copy Markdown

chromatic-com Bot commented May 21, 2026

Tip

All tests passed and all changes approved!

🟢 UI Tests: 367 tests unchanged
🟢 UI Review: 367 stories published -- no changes
Storybook icon Storybook Publish: 367 stories published

@alexprudhomme alexprudhomme force-pushed the msw-commerce-facets branch from c422b14 to 9df4533 Compare May 21, 2026 14:51
@alexprudhomme alexprudhomme force-pushed the msw-commerce-facets branch from b6bdd15 to ca260c1 Compare May 21, 2026 17:36
@alexprudhomme alexprudhomme force-pushed the msw-request-transformers branch 2 times, most recently from 2e27277 to 2edec45 Compare May 22, 2026 16:49
@alexprudhomme alexprudhomme force-pushed the msw-commerce-facets branch from 62f29ce to 43e289c Compare May 22, 2026 16:50
@alexprudhomme alexprudhomme force-pushed the msw-request-transformers branch from 2edec45 to f6e1ac9 Compare May 22, 2026 17:49
@alexprudhomme alexprudhomme force-pushed the msw-commerce-facets branch from 43e289c to 2b42b6e Compare May 22, 2026 17:49
@alexprudhomme alexprudhomme force-pushed the msw-request-transformers branch from f6e1ac9 to 8a0bd11 Compare May 22, 2026 18:50
@alexprudhomme alexprudhomme force-pushed the msw-commerce-facets branch from 2b42b6e to 8e1816a Compare May 22, 2026 18:51
@alexprudhomme alexprudhomme force-pushed the msw-request-transformers branch from 8a0bd11 to cee3997 Compare May 22, 2026 19:19
Migrate atomic-commerce-facet, atomic-commerce-facets,
atomic-commerce-numeric-facet, atomic-commerce-category-facet, and
atomic-commerce-timeframe-facet stories to use MockCommerceApi MSW
handlers for proper API mocking.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants