Skip to content

Commit

Permalink
Run snapshot tests based on storybook
Browse files Browse the repository at this point in the history
This provides some additional assurance that PRs don't break aspects
of the UI.
  • Loading branch information
wlach committed Dec 3, 2019
1 parent fa9bd61 commit 7c1a0b1
Show file tree
Hide file tree
Showing 7 changed files with 54,933 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"@babel/preset-react",
["@babel/preset-env", { "targets": { "node": "current" } }]
],
"plugins": ["@babel/plugin-proposal-class-properties", "emotion"],
"plugins": ["@babel/plugin-proposal-class-properties", "emotion", "macros"],
"env": {
"test": {
"plugins": ["@babel/plugin-transform-modules-commonjs", "emotion"]
Expand Down
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
- run: npm run build
- run: npm run test-coverage -- --runInBand
- run: bash <(curl -s https://codecov.io/bash) -f .coverage/coverage-final.json -Z
- run: npm run build-storybook

build:
docker:
Expand Down Expand Up @@ -92,8 +93,7 @@ jobs:
name: Build docs
command: mkdocs build
- add_ssh_keys:
fingerprints:
"e2:81:9f:89:ea:24:ed:8a:da:a9:38:3b:61:bc:03:c9"
fingerprints: "e2:81:9f:89:ea:24:ed:8a:da:a9:38:3b:61:bc:03:c9"
- deploy:
name: Deploy
command: |
Expand Down
3 changes: 2 additions & 1 deletion .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { configure, addParameters } from "@storybook/react";
import requireContext from 'require-context.macro';

addParameters({
options: {
Expand All @@ -11,7 +12,7 @@ addParameters({
});

// automatically import all files ending in *.stories.js
const req = require.context("../src", true, /\.stories\.js$/);
const req = requireContext("../src", true, /\.stories\.js$/);
function loadStories() {
req.keys().forEach(filename => req(filename));
}
Expand Down
175 changes: 144 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7c1a0b1

Please sign in to comment.