Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stories.json support #31

Merged
merged 12 commits into from
Jan 28, 2022
Merged

Add stories.json support #31

merged 12 commits into from
Jan 28, 2022

Conversation

shilman
Copy link
Member

@shilman shilman commented Jan 24, 2022

Issue #23

What I did

  • Upgraded storybook to 6.4
  • Added --stories-json flag to CLI
  • Update documentation

How to test

# terminal 1
$ yarn storybook

# terminal 2
$ yarn test-storybook:playwright-json
📦 Published PR as canary version: 0.0.2-canary.31.64c411c.0

✨ Test out this PR locally via:

npm install @storybook/[email protected]
# or 
yarn add @storybook/[email protected]

Version

Published prerelease version: v0.0.2-next.2

Changelog

🐛 Bug Fix

📝 Documentation

  • docs(README): add section about jest #29 (@yannbf)

Authors: 2

@shilman shilman requested a review from yannbf January 24, 2022 14:26
Copy link
Member

@yannbf yannbf left a comment

Choose a reason for hiding this comment

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

Nice stuff!! I added a few QA comments

bin/test-storybook.js Outdated Show resolved Hide resolved
bin/test-storybook.js Outdated Show resolved Hide resolved
bin/test-storybook.js Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/playwright/transformPlaywrightJson.ts Show resolved Hide resolved
} catch (err) {
console.error(`[test-storybook] Failed to fetch stories.json from ${storiesJsonUrl}.`);
console.error(
'More info: https://github.com/storybookjs/test-runner/blob/main/README.md#storiesjson-mode'
Copy link
Member

Choose a reason for hiding this comment

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

Nice! Just FYI this is how it looks like when it errors out:

image

@yannbf
Copy link
Member

yannbf commented Jan 27, 2022

Nice stuff! In case it helps:

Mealdrop with play fn stories that will fail:

TARGET_URL=https://5f84c5baa35bdd0022a7684f-vxfequowbd.chromatic.com/ yarn test-storybook:playwright-json --stories-json --verbose

Mealdrop with all stories passing:

TARGET_URL=https://mealdrop.vercel.app/storybook/ yarn test-storybook:playwright-json --stories-json --verbose

README.md Outdated Show resolved Hide resolved
Copy link
Member

@yannbf yannbf left a comment

Choose a reason for hiding this comment

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

There are a couple of things to fix but I'm approving in case you want this merged after you fix them 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants