Repository navigation
test(themes): add an MSW mock backend for the store API - #62
Merged
salahmyn merged 4 commits intoOct 27, 2026
Conversation
Handlers, typed factories and scenarios shared by unit tests, with a node server and a browser worker. ProductsSlider test now uses them. Made-with: agent Co-authored-by: mc-agents[bot] <298817976+mc-agents[bot]@users.noreply.github.com>
Member
Author
|
@greptileai please review this pull request. |
Member
Author
|
This branch conflicts with the base branch |
Assert the offers source returns a product, and derive a cart item's total from its overridden price. Made-with: agent Co-authored-by: mc-agents[bot] <298817976+mc-agents[bot]@users.noreply.github.com>
Made-with: agent Co-authored-by: mc-agents[bot] <298817976+mc-agents[bot]@users.noreply.github.com>
Member
Author
|
@greptile-apps please review |
Member
Author
|
@greptileai review |
Made-with: agent Co-authored-by: mc-agents[bot] <298817976+mc-agents[bot]@users.noreply.github.com>
salahmyn
marked this pull request as ready for review
October 27, 2026 10:48
|
Automatic reviews are disabled for this repository. |
salahmyn
merged commit Oct 27, 2026
c8bf519
into
feature/quality-gates-twig-parity-audit
4 checks passed
salahmyn
deleted the
feature/SAL-3521-add-msw-mock-backend-for-store-api
branch
October 27, 2026 10:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a shared MSW mock backend for the store API (
tests/mocks/), so unit tests, and later Storybook and Playwright, stop hand-rolling per-file mocks.server.ts(node, for vitest/jsdom, opt in withinstallMockServer()) andbrowser.ts(worker for Storybook/Playwright).tests/components/home/ProductsSlider.test.tsxnow uses the shared handlers and the real engine api client instead of mocking the engine module.tests/mocks/handlers.test.tsexercises the handlers through the engine client.tests/mocks/.Not confirmed
sortvalues and the realcursor.nextformat were not confirmed either.createStorefills the fields the theme reads, cast to the engine'sStore.Verification
lint, format:check, typecheck, check:manifest and build exit 0.
pnpm testhas 4 failures inProductDetails.test.tsx(localStorageundefined) that also fail on the base branch under Node 26 here; CI pins Node 22. Because of themtest:coverageexited 1 locally.Closes SAL-3521


Confidence Score: 5/5
The PR appears safe to merge; the previous tag-filter issue is fixed and no new blocking issues were found.Summary
Adds a shared MSW backend with store API handlers, typed factories, and reusable scenarios.
Reviews (4) · Last reviewed commit: "test(themes): filter the tags source in ..." · Reviewed by Greptile