Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ jobs:
- run: pnpm build
- name: Run tests in development
run: |
pnpx playwright install-deps
pnpx playwright install
pnpx playwright install --with-deps firefox chromium webkit
pnpx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"pnpm storybook" \
"pnpx wait-on tcp:6006 && pnpm test-storybook"
"pnpx wait-on tcp:6006 && pnpm test-storybook --browsers firefox chromium webkit"
- name: Run tests in production
run: pnpm test
run: pnpm test-storybook --browsers firefox chromium webkit
env:
TARGET_URL: "${{ github.event.deployment_status.target_url }}"
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"react": "^19.1.0",
"react-dom": "^19.1.0",
"storybook": "^8.6.12",
"playwright": "^1.52.0",
"tsup": "^8.4.0",
"typescript": "~5.8.3",
"vite": "^6.3.4"
Expand All @@ -64,8 +65,7 @@
"pnpm": {
"onlyBuiltDependencies": [
"@swc/core",
"esbuild",
"playwright"
"esbuild"
]
}
}
32 changes: 26 additions & 6 deletions pnpm-lock.yaml

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

21 changes: 14 additions & 7 deletions test-runner-jest.config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable no-undef */
import { getJestConfig } from '@storybook/test-runner';

// The default Jest configuration comes from @storybook/test-runner
const testRunnerConfig = getJestConfig();

/**
* @type {import('@jest/types').Config.InitialOptions}
*/
export default {
// The default configuration comes from @storybook/test-runner
...getJestConfig(),
/** Add your own overrides below
...testRunnerConfig,
/** Add your own overrides below, and make sure
* to merge testRunnerConfig properties with your own
* @see https://jestjs.io/docs/configuration
*/
testEnvironmentOptions: {
...testRunnerConfig.testEnvironmentOptions,
'jest-playwright': {
browser: 'chromium',
...testRunnerConfig.testEnvironmentOptions['jest-playwright'],
// eslint-disable-next-line no-undef
launchOptions: process.env.DEBUG ? {
...testRunnerConfig.testEnvironmentOptions['jest-playwright'].launchOptions,
headless: false,
devtools: true,
} : {}
}
}
},
};