Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

chore: re-enable storybook, add support for mocking #1579

Merged
merged 3 commits into from
Mar 28, 2023

Conversation

kahboom
Copy link
Contributor

@kahboom kahboom commented Mar 28, 2023

This PR adds msw, sets up mocking for Storybook, and sets up an example call. It only mocks one endpoint as an example so that we can continue to work on this once 1.0 is released. It also re-enables Storybook, fixing an issue with private classes. Relates to #1100 and #1258 , but doesn't close them.

Please let me know if you'd rather calls be mocked using JS/TS instead of JSON. I chose JSON since it's what the API returns and is the fastest performance-wise, but I don't have a strong opinion about this.

Storybook Catalog story:

Screen Shot 2023-03-28 at 2 25 30 pm

kahboom and others added 3 commits March 28, 2023 14:09
chore(storybook): add msw for network mocking in stories

chore: update main.js
Considering that Storybook uses @babel + webpack by default, we need to
replace the @babel loader for the source code with ts-loader, as we're
using currently for dev and prod builds.

chore(test): add request matching for dsl endpoints
@kahboom kahboom requested a review from a team March 28, 2023 13:30
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
12.6% 12.6% Duplication

@codecov
Copy link

codecov bot commented Mar 28, 2023

Codecov Report

Merging #1579 (bcdbd9e) into main (1075505) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1579   +/-   ##
=======================================
  Coverage   57.00%   57.00%           
=======================================
  Files          68       68           
  Lines        2056     2056           
  Branches      470      470           
=======================================
  Hits         1172     1172           
  Misses        840      840           
  Partials       44       44           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@igarashitm igarashitm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@kahboom kahboom merged commit 618b08d into kaoto-archive:main Mar 28, 2023
@kahboom kahboom deleted the 1100-storybook branch March 28, 2023 17:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants