feat: add cucumber gherkin-style E2E test framework
- Install @cucumber/cucumber and cucumber-pretty dependencies - Create Cucumber configuration with tsx loader for TypeScript support - Add step definitions for common navigation, form interactions, and assertions - Add authentication step definitions for login/logout flows - Create feature files for user registration and authentication - Support multiple auth contexts (player, tournament admin, club admin) - Configure package.json scripts for running Cucumber tests Key features: - Gherkin syntax (Given/When/Then) for behavior-driven testing - Browser-only interactions (no direct database access) - Dev site testing (tests run against running dev server) - Happy path focus for acceptance testing - Integration with existing TypeScript project
This commit is contained in:
@@ -15,6 +15,9 @@
|
||||
"test:unit:sequential": "bun test src/__tests__/unit/ --max-concurrency=1",
|
||||
"test:acceptance": "bun x playwright test e2e/",
|
||||
"test:acceptance:headed": "bun x playwright test e2e/ --headed",
|
||||
"test:acceptance:cucumber": "bun cucumber-js --config e2e/cucumber/cucumber.config.ts",
|
||||
"test:acceptance:cucumber:pretty": "bun cucumber-js --config e2e/cucumber/cucumber.config.ts --format pretty:cucumber-pretty",
|
||||
"cucumber": "bun cucumber-js --config e2e/cucumber/cucumber.config.ts",
|
||||
"db:switch": "bun run scripts/switch-database.js",
|
||||
"db:setup-postgres": "bun run scripts/setup-postgres.js",
|
||||
"db:setup-dev": "bun run scripts/setup-postgres.js",
|
||||
@@ -59,6 +62,7 @@
|
||||
"zod": "^4.3.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cucumber/cucumber": "^12.8.2",
|
||||
"@playwright/test": "^1.58.2",
|
||||
"@tailwindcss/postcss": "^4",
|
||||
"@testing-library/jest-dom": "^6.9.1",
|
||||
@@ -74,10 +78,12 @@
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@vitejs/plugin-react": "^6.0.1",
|
||||
"argon2": "^0.44.0",
|
||||
"cucumber-pretty": "^6.0.1",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-next": "^16.2.1",
|
||||
"jsdom": "^29.0.1",
|
||||
"tailwindcss": "^4",
|
||||
"tsx": "^4.21.0",
|
||||
"typescript": "^5",
|
||||
"vitest": "^4.1.2"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user