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 integration test #2119

Merged
merged 7 commits into from
Oct 24, 2017
Merged

ADD integration test #2119

merged 7 commits into from
Oct 24, 2017

Conversation

ndelangen
Copy link
Member

@ndelangen ndelangen commented Oct 23, 2017

automatic screenshot of cra-kitchen-sink and vue-kitchen-sink examples

This integrates into the yarn test workflow, and in fact is a jest project you can toggle on and off.
As a developer it's possible to just run all test in watch-mode all at once.
In the CI it's possible run all test or projects separately to get fine-grained feedback what's broken without having to look into the logs.

What I did

  • Added a jest project for integration testing
  • Added a test for taking screenshots of a running example
  • Integrated this into CI task

How to test

  • yarn test --integration
  • change some implementation in cra or vue example that impacts welcome story significantly
  • yarn test --integration
  • should now fail and save diff screenshots
  • yarn test --integration --watch
  • press u to update, if implementation is correct

Todo:

  • Needs documentation in contributing.md or something

@ndelangen ndelangen added the maintenance User-facing maintenance tasks label Oct 23, 2017
@ndelangen ndelangen self-assigned this Oct 23, 2017
@ndelangen ndelangen force-pushed the screenshot-testing branch 3 times, most recently from 8ebbe58 to e0052c0 Compare October 23, 2017 23:38
@ndelangen
Copy link
Member Author

Something is wrong with the yml config, unsure what 😭

@ndelangen
Copy link
Member Author

It was a single misplaced space 😒

@codecov
Copy link

codecov bot commented Oct 24, 2017

Codecov Report

Merging #2119 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2119   +/-   ##
=======================================
  Coverage   21.41%   21.41%           
=======================================
  Files         263      263           
  Lines        5796     5796           
  Branches      695      691    -4     
=======================================
  Hits         1241     1241           
- Misses       4018     4037   +19     
+ Partials      537      518   -19
Impacted Files Coverage Δ
app/react/src/server/utils.js 0% <0%> (-53.58%) ⬇️
addons/info/src/components/Node.js 39.7% <0%> (ø) ⬆️
lib/ui/src/modules/api/configs/init_api.js 40.47% <0%> (ø) ⬆️
addons/knobs/src/components/types/Object.js 5.81% <0%> (ø) ⬆️
addons/knobs/src/react/WrapStory.js 19.54% <0%> (ø) ⬆️
addons/knobs/src/KnobStore.js 9.09% <0%> (ø) ⬆️
lib/ui/src/modules/ui/routes.js 0% <0%> (ø) ⬆️
...es__/update-addon-info/update-addon-info.output.js 0% <0%> (ø) ⬆️
...s/left_panel/stories_tree/tree_decorators_utils.js 45.23% <0%> (ø) ⬆️
addons/storyshots/src/require_context.js 0% <0%> (ø) ⬆️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 68ed7be...e49e4ef. Read the comment docs.

@ndelangen ndelangen requested a review from danielduan October 24, 2017 10:04
@ndelangen ndelangen merged commit da23479 into master Oct 24, 2017
@ndelangen ndelangen deleted the screenshot-testing branch October 24, 2017 21:11
@Tom910
Copy link

Tom910 commented Oct 31, 2017

Integration into storybook?

@ndelangen
Copy link
Member Author

@Tom910 Possibly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants