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

Not able to setup storyshot onto storybook with addon-storyshot for Vue app generated by vue cli 3 #4484

Closed
adamchenwei opened this issue Oct 18, 2018 · 7 comments

Comments

@adamchenwei
Copy link

adamchenwei commented Oct 18, 2018

If you are reporting a bug or requesting support, start here:

Bug or support request summary

Please provide issue details here - What did you expect to happen? What happened instead?
What expect
Build stories as snapshot test correctly

What happened
I encounter error when I start running the jest after completely setup

Steps to reproduce

git clone git@github.com:adamchenwei/vue-storybook-n-storyshots.git
(/~https://github.com/adamchenwei/vue-storybook-n-storyshots)
yarn jest

Please provide necessary steps for reproduction of this issue. Describe the exact steps a maintainer has to take to make the problem occur. If the problem is non-trivial to reproduce, please link a repository or provide some code snippets.

screen shot 2018-10-19 at 9 37 32 am

Please specify which version of Storybook and optionally any affected addons that you're running

    "@storybook/addon-storyshots": "^3.4.11",
    "@storybook/vue": "^3.4.11",
    "@vue/cli-plugin-babel": "^3.0.5",
    "@vue/cli-plugin-eslint": "^3.0.5",
    "@vue/cli-plugin-unit-jest": "^3.0.5",
    "@vue/cli-service": "^3.0.5",
    "@vue/test-utils": "^1.0.0-beta.20",
    "babel-core": "^6.26.3",
    "babel-jest": "^23.0.1",
    "jest-vue-preprocessor": "^1.4.0",
    "vue-template-compiler": "^2.5.17"

Affected platforms

  • If UI related, please indicate browser, OS, and version
    MacOS X
  • If dependency related, please include relevant version numbers
  • If developer tooling related, please include the platform information
    Vue with Storybook and Storyshot
@adamchenwei adamchenwei changed the title Not able to setup storyshot onto storybook with addon-storyshot Not able to setup storyshot onto storybook with addon-storyshot for Vue app generated by vue cli 3 Oct 18, 2018
@igor-dv
Copy link
Member

igor-dv commented Oct 18, 2018

yarn test doesn't run Jest for you.

@adamchenwei
Copy link
Author

adamchenwei commented Oct 19, 2018

@igor-dv sorry if my screenshot was confusing. I ran yarn jest updated the screenshot for clarity

@igor-dv
Copy link
Member

igor-dv commented Oct 19, 2018

Can you please share your test file and jest.config ?

@adamchenwei
Copy link
Author

@igor-dv everything is already in /~https://github.com/adamchenwei/vue-storybook-n-storyshots repo I shared in the question. Would you mean something else?

@igor-dv
Copy link
Member

igor-dv commented Oct 21, 2018

I've checked your repo, and couldn't find there any jest.config and test that contains Storyshot (in all 3 branches)

@adamchenwei
Copy link
Author

@igor-dv oh boy...my fault. I added new experiment I tried into this branch build/storyshot-trail-base-try-1 Would you check it out for me? Now its throwing new error:

screen shot 2018-10-22 at 10 22 11 am

@igor-dv
Copy link
Member

igor-dv commented Oct 23, 2018

Adding babel-preset-vue and setting it to .babelrc instead of @babel/app fixes the problem. I don't know though how it affects your app. There is some kind of versions mismatch between babel, vue, and storybook.

CC #4475

@igor-dv igor-dv closed this as completed Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants