b7fcb94ccb
- 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
41 lines
849 B
TypeScript
41 lines
849 B
TypeScript
/**
|
|
* Cucumber configuration for EuchreCamp E2E tests
|
|
*/
|
|
|
|
module.exports = {
|
|
// Paths to feature files
|
|
paths: ['e2e/cucumber/features/**/*.feature'],
|
|
|
|
// Paths to step definitions
|
|
import: ['e2e/cucumber/step-definitions/**/*.ts'],
|
|
|
|
// Use tsx loader for TypeScript with path aliases
|
|
requireModule: ['tsx'],
|
|
|
|
// Format options
|
|
format: [
|
|
'progress-bar',
|
|
'pretty:cucumber-pretty'
|
|
],
|
|
|
|
// Output directory for reports
|
|
formatOptions: {
|
|
snippetInterface: 'async-await'
|
|
},
|
|
|
|
// Tags to run (can be overridden via command line)
|
|
tags: 'not @wip and not @skip',
|
|
|
|
// Fail fast on first error
|
|
failFast: false,
|
|
|
|
// Retry failed tests (useful in CI)
|
|
retry: process.env.CI ? 2 : 0,
|
|
|
|
// Dry run (just list scenarios without executing)
|
|
dryRun: false,
|
|
|
|
// Strict mode (fail on undefined steps)
|
|
strict: true,
|
|
};
|