Skip to content

Commit dcbba5e

Browse files
authored
Script for updating storybook screenshots (#30340)
* Script for updating storybook screenshots Requires element-hq/element-modules#43 * Prettier
1 parent 6b40da5 commit dcbba5e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.storybook/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ const config: StorybookConfig = {
3131
},
3232
// Needed for counterpart to work
3333
plugins: [nodePolyfills({ include: ["process", "util"] })],
34+
server: {
35+
allowedHosts: ["localhost", ".docker.internal"],
36+
},
3437
});
3538
},
3639
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
"storybook": "storybook dev -p 6007",
7070
"build-storybook": "storybook build",
7171
"test:storybook": "test-storybook --url http://localhost:6007/",
72-
"test:storybook:ci": "concurrently -k -s first -n \"SB,TEST\" \"yarn storybook\" \"wait-on tcp:6007 && yarn test-storybook --url http://localhost:6007/ --ci --maxWorkers=2\""
72+
"test:storybook:ci": "concurrently -k -s first -n \"SB,TEST\" \"yarn storybook --no-open\" \"wait-on tcp:6007 && yarn test-storybook --url http://localhost:6007/ --ci --maxWorkers=2\"",
73+
"test:storybook:update": "playwright-screenshots --entrypoint yarn --with-node-modules && playwright-screenshots --entrypoint /work/node_modules/.bin/test-storybook --with-node-modules --url http://host.docker.internal:6007/ --updateSnapshot"
7374
},
7475
"resolutions": {
7576
"**/pretty-format/react-is": "19.1.0",

0 commit comments

Comments
 (0)