8 Commits

Author SHA1 Message Date
david b2876d1e49 feat: add feature summary documentation
- Add FEATURE_SUMMARY.md with coverage overview
- Fix TypeScript error in World class
- Document all feature files and scenarios
2026-04-25 21:16:57 -07:00
david a24782f4bb docs: update README with feature files and issue tracking 2026-04-25 21:16:12 -07:00
david 1bece10df2 feat: add tournament schedule feature test (issue #7)
- Add tournament-schedule.feature with 4 scenarios
- Add step definitions for tournament schedule navigation
- Tests viewing schedule, generating round-robin, bye rounds, and matchup navigation
- Note: Some @wip scenarios require data setup (tournament creation, team addition)
2026-04-25 21:15:54 -07:00
david b96932270b feat: add player schedule feature test (issue #9)
- Add player-schedule.feature with 3 scenarios
- Add step definitions for schedule navigation
- Tests empty schedule, upcoming matches, and match details navigation
- Note: Some @wip scenarios require data setup (tournament, participants)
2026-04-25 21:14:48 -07:00
david 58857af5ca feat: add password reset feature test (issue #10)
- Add password-reset.feature with 4 scenarios
- Add step definition for password reset page assertion
- Tests access page, valid email request, invalid email, and empty field
2026-04-25 21:14:09 -07:00
david 39d3250114 feat: add wordmark navigation feature test (issue #24)
- Add wordmark-navigation.feature with 3 scenarios
- Add step definitions for clicking wordmark and page assertions
- Test unauthenticated, player, and admin navigation paths
2026-04-25 21:13:35 -07:00
david 18418adf9e docs: add README for Cucumber test framework 2026-04-25 21:10:39 -07:00
david d2824695c0 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
2026-04-25 21:10:19 -07:00
4 changed files with 21 additions and 33 deletions
-20
View File
@@ -1,23 +1,3 @@
## [0.1.6] - 2026-04-26
### Patch Changes
- fix: update Cucumber config and hooks to properly load test infrastructure
- feat: add feature summary documentation
- docs: update README with feature files and issue tracking
- feat: add tournament schedule feature test (issue #7)
- feat: add player schedule feature test (issue #9)
- feat: add password reset feature test (issue #10)
- feat: add wordmark navigation feature test (issue #24)
- docs: add README for Cucumber test framework
- feat: add cucumber gherkin-style E2E test framework
## [0.1.5] - 2026-04-26
### Patch Changes
- ci: fix deployment directory path in release workflow
## [0.1.4] - 2026-04-02
### Patch Changes
-3
View File
@@ -9,9 +9,6 @@ module.exports = {
// Paths to step definitions
import: ['e2e/cucumber/step-definitions/**/*.ts'],
// Paths to support files (hooks, world)
require: ['e2e/cucumber/support/**/*.ts'],
// Use tsx loader for TypeScript with path aliases
requireModule: ['tsx'],
+20 -9
View File
@@ -2,8 +2,9 @@
* Cucumber hooks for EuchreCamp E2E tests
*/
import { Before, After, BeforeAll, AfterAll } from '@cucumber/cucumber';
import { chromium, Browser } from '@playwright/test';
import { Before, After, BeforeAll, AfterAll, IWorldOptions, World } from '@cucumber/cucumber';
import { chromium, Browser, type FullConfig } from '@playwright/test';
import { cleanupAllTestData } from '@/__tests__/test-utils';
import { world } from './world';
import path from 'path';
import fs from 'fs';
@@ -47,7 +48,7 @@ AfterAll(async function () {
/**
* Before each scenario: Create new page context
*/
Before(async function () {
Before(async function (this: World) {
// Create new context and page
world.context = await browser.newContext();
world.page = await world.context.newPage();
@@ -68,9 +69,9 @@ Before(async function () {
});
/**
* After each scenario: Close page
* After each scenario: Close page and cleanup test data
*/
After(async function () {
After(async function (this: World) {
console.log('🌍 Cleaning up after scenario...');
// Close page and context
@@ -80,29 +81,39 @@ After(async function () {
if (world.context) {
await world.context.close();
}
// Clean up test data
try {
await cleanupAllTestData();
console.log('🌍 Test data cleaned up');
} catch (error) {
console.error('🌍 Error cleaning up test data:', error);
}
});
/**
* Custom hook for navigating to a page
*/
Before({ tags: '@navigation' }, async function () {
Before({ tags: '@navigation' }, async function (this: World) {
console.log('🌍 Navigation hook triggered');
});
/**
* Custom hook for authenticated scenarios
*/
Before({ tags: '@authenticated' }, async function () {
Before({ tags: '@authenticated' }, async function (this: World) {
console.log('🌍 Authenticated hook triggered');
// This hook can be extended to load saved auth state
});
/**
* Tag hooks for specific scenarios
*/
Before({ tags: '@slow' }, async function () {
Before({ tags: '@slow' }, async function (this: World) {
console.log('🌍 Slow test - extending timeout');
// Note: Timeout extension happens at step definition level
});
Before({ tags: '@flaky' }, async function () {
Before({ tags: '@flaky' }, async function (this: World) {
console.log('🌍 Flaky test - retry enabled');
});
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "euchre_camp",
"version": "0.1.6",
"version": "0.1.4",
"private": true,
"scripts": {
"dev": "NEXT_PUBLIC_GIT_COMMIT=$(git rev-parse --short HEAD) next dev",