Skip to content

[DXUI]: Improve MSW setup in Storybook #6676

@louis-bompart

Description

@louis-bompart

Task Description

Currently, we have set up MSW in a couple of stories, and it has replaced the alternative of targeting the API.
This is great for testing, and we want to reserve it for our own tests.

Now, what we would like is for an "opt-out" option or toggle for MSW for those stories (knowing we'll migrate the old ones to that too eventually).

Moreover, when we "build" the SB we deploy, it ought to be opt-out all the way.

Acceptance Criteria

  • When I load the production build of Storybook, no requests are mocked
  • As a Developer, I have an easy way to switch between the MSW-mocked and non-mocked version of a given Story
  • All tests based on MSWed story still use the MSWed version of the Story
  • Stories that do not use MSW remains unaffected.

Technical Notes

No response

Jira Ticket

No response

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions