diff --git a/.github/workflows/storybook-tests.yml b/.github/workflows/storybook-tests.yml index 2f8149870..6d63e9111 100644 --- a/.github/workflows/storybook-tests.yml +++ b/.github/workflows/storybook-tests.yml @@ -32,7 +32,15 @@ jobs: run: | npx concurrently --kill-others --success first -n "SB,TEST" \ "npx http-server storybook-static --port 6006 --silent" \ - "npx wait-on tcp:6006 && yarn test-storybook" + "npx wait-on tcp:6006 && yarn test-storybook -u" + - name: Push updated screenshots + uses: actions/checkout@v4 + - run: | + git config user.name github-actions + git config user.email github-actions@github.com + git add \*.png + git commit -m "update screenshots [skip ci]" + git push - uses: actions/upload-artifact@v4 name: 'Upload test report' if: ${{ failure() }} diff --git a/ui/.storybook/preview.tsx b/ui/.storybook/preview.tsx index 3f1bcfa45..e4a80e83d 100644 --- a/ui/.storybook/preview.tsx +++ b/ui/.storybook/preview.tsx @@ -11,7 +11,12 @@ initialize({ }, onUnhandledRequest(req) { const url = req.url; - const skipList = ['bundle.js', 'hot-update.js', 'http://localhost:6006/index.json']; + const skipList = [ + 'bundle.js', + 'hot-update.js', + 'http://localhost:6006/index.json', + '.woff', + ]; const shouldRequestBeBypassed = skipList.some((passItem) => url.includes(passItem)); if (!shouldRequestBeBypassed) { console.warn('Found an unhandled %s request to %s', req.method, url); diff --git a/ui/.storybook/test-runner.ts b/ui/.storybook/test-runner.ts index 946d33775..fac1ad5b5 100644 --- a/ui/.storybook/test-runner.ts +++ b/ui/.storybook/test-runner.ts @@ -50,11 +50,6 @@ const config: TestRunnerConfig = { customSnapshotIdentifier, storeReceivedOnFailure: true, customReceivedDir, - customDiffConfig: { - threshold: 0.3, - }, - failureThreshold: 0.01, - failureThresholdType: 'percent', }); }, };