Remove and cleanup storybook testing
This commit is contained in:
@@ -486,10 +486,8 @@ jobs:
|
|||||||
with: { node-version: 20 }
|
with: { node-version: 20 }
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run storybook:build:github
|
- run: npm run storybook:build:github
|
||||||
# Temporarily disabled - test-runner needs updates for Storybook 10.x compatibility
|
# Storybook is used for component documentation only.
|
||||||
# Will be re-enabled once test-runner compatibility issues are resolved
|
# Component tests (tests/components/*.test.tsx) provide all test coverage.
|
||||||
# - run: npm run test:sb
|
|
||||||
# env: { CI: true }
|
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
runs-on: [self-hosted, macos-latest]
|
runs-on: [self-hosted, macos-latest]
|
||||||
|
|||||||
+3
-3
@@ -23,6 +23,7 @@ npm-cache/
|
|||||||
|
|
||||||
# Lighthouse CI results
|
# Lighthouse CI results
|
||||||
/lhci-results/
|
/lhci-results/
|
||||||
|
/.lighthouseci/
|
||||||
|
|
||||||
# Ignore other image files (but not visual regression snapshots)
|
# Ignore other image files (but not visual regression snapshots)
|
||||||
*.png
|
*.png
|
||||||
@@ -76,9 +77,8 @@ next-env.d.ts
|
|||||||
*storybook.log
|
*storybook.log
|
||||||
storybook-static
|
storybook-static
|
||||||
|
|
||||||
# storybook config files (to avoid git changes when switching between local and production)
|
# Storybook build output (config files should be committed)
|
||||||
.storybook/main.js
|
storybook-static
|
||||||
.storybook/preview.js
|
|
||||||
|
|
||||||
# Gitea runner runtime files
|
# Gitea runner runtime files
|
||||||
.runner
|
.runner
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
// Test runner configuration
|
|
||||||
testMatch: ["**/*.stories.@(js|jsx|ts|tsx)"],
|
|
||||||
testTimeout: 30000,
|
|
||||||
retries: 2,
|
|
||||||
// Fix for the StorybookTestRunnerError initialization issue
|
|
||||||
setupFilesAfterEnv: [
|
|
||||||
"<rootDir>/node_modules/@storybook/test-runner/jest-setup.js",
|
|
||||||
],
|
|
||||||
// Ensure proper module resolution
|
|
||||||
moduleNameMapping: {
|
|
||||||
"^@/(.*)$": "<rootDir>/app/$1",
|
|
||||||
},
|
|
||||||
// Test environment configuration
|
|
||||||
testEnvironment: "jsdom",
|
|
||||||
// Transform configuration
|
|
||||||
transform: {
|
|
||||||
"^.+\\.(js|jsx|ts|tsx)$": [
|
|
||||||
"babel-jest",
|
|
||||||
{ presets: ["@babel/preset-env", "@babel/preset-react"] },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
// Module file extensions
|
|
||||||
moduleFileExtensions: ["js", "jsx", "ts", "tsx", "json"],
|
|
||||||
// Ignore patterns
|
|
||||||
testPathIgnorePatterns: ["/node_modules/", "/.next/"],
|
|
||||||
// Coverage configuration
|
|
||||||
collectCoverageFrom: [
|
|
||||||
"app/**/*.{js,jsx,ts,tsx}",
|
|
||||||
"!app/**/*.d.ts",
|
|
||||||
"!app/**/*.stories.{js,jsx,ts,tsx}",
|
|
||||||
],
|
|
||||||
};
|
|
||||||
@@ -147,7 +147,6 @@ The Storybook configuration automatically detects the environment:
|
|||||||
- `npm run e2e:ui` - Run E2E tests with UI
|
- `npm run e2e:ui` - Run E2E tests with UI
|
||||||
- `npm run e2e:serve` - Start dev server and run E2E tests
|
- `npm run e2e:serve` - Start dev server and run E2E tests
|
||||||
- `npm run lhci` - Run performance tests
|
- `npm run lhci` - Run performance tests
|
||||||
- `npm run test:sb` - Run Storybook tests
|
|
||||||
|
|
||||||
### Storybook
|
### Storybook
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
// Mock CSS imports for tests
|
|
||||||
// This prevents jsdom from trying to parse Tailwind CSS v4 syntax
|
|
||||||
export default {};
|
|
||||||
@@ -190,6 +190,15 @@ describe("Input – behaviour specifics", () => {
|
|||||||
npm run visual:test
|
npm run visual:test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Storybook
|
||||||
|
|
||||||
|
**Storybook is used for component documentation and visual review only.** It is not used for automated testing.
|
||||||
|
|
||||||
|
- Component tests (`tests/components/*.test.tsx`) provide all test coverage previously handled by Storybook test-runner
|
||||||
|
- Storybook stories (`stories/*.stories.js`) serve as living documentation and visual examples
|
||||||
|
- Interaction functions are inlined in story files for demonstration purposes
|
||||||
|
- Run Storybook locally with `npm run storybook` for component development and review
|
||||||
|
|
||||||
### Accessibility Testing
|
### Accessibility Testing
|
||||||
|
|
||||||
Accessibility is tested at two levels:
|
Accessibility is tested at two levels:
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
"test:watch": "vitest",
|
"test:watch": "vitest",
|
||||||
"test:ui": "vitest --ui",
|
"test:ui": "vitest --ui",
|
||||||
"test:component": "vitest run tests/components",
|
"test:component": "vitest run tests/components",
|
||||||
"test:sb": "storybook dev -p 6006 & wait-on http://localhost:6006 && test-storybook --url http://localhost:6006",
|
|
||||||
"e2e": "playwright test",
|
"e2e": "playwright test",
|
||||||
"test:e2e": "playwright test",
|
"test:e2e": "playwright test",
|
||||||
"e2e:ui": "playwright test --ui",
|
"e2e:ui": "playwright test --ui",
|
||||||
@@ -64,7 +63,6 @@
|
|||||||
"@storybook/addon-a11y": "^10.2.0",
|
"@storybook/addon-a11y": "^10.2.0",
|
||||||
"@storybook/addon-interactions": "^8.6.14",
|
"@storybook/addon-interactions": "^8.6.14",
|
||||||
"@storybook/nextjs": "^10.2.0",
|
"@storybook/nextjs": "^10.2.0",
|
||||||
"@storybook/test-runner": "^0.24.2",
|
|
||||||
"@svgr/webpack": "^8.1.0",
|
"@svgr/webpack": "^8.1.0",
|
||||||
"@tailwindcss/postcss": "^4.1.11",
|
"@tailwindcss/postcss": "^4.1.11",
|
||||||
"@testing-library/jest-dom": "^6.8.0",
|
"@testing-library/jest-dom": "^6.8.0",
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ export default defineConfig({
|
|||||||
"tests/e2e/**/*.e2e.test.{js,jsx,ts,tsx}",
|
"tests/e2e/**/*.e2e.test.{js,jsx,ts,tsx}",
|
||||||
],
|
],
|
||||||
exclude: [
|
exclude: [
|
||||||
"tests/e2e/**/*.storybook.test.{js,jsx,ts,tsx}",
|
|
||||||
"tests/e2e/**/*.spec.{js,jsx,ts,tsx}",
|
"tests/e2e/**/*.spec.{js,jsx,ts,tsx}",
|
||||||
],
|
],
|
||||||
// Disable CSS processing in tests to avoid jsdom parsing errors with Tailwind v4
|
// Disable CSS processing in tests to avoid jsdom parsing errors with Tailwind v4
|
||||||
|
|||||||
Reference in New Issue
Block a user