bb6be245b7
## Summary This PR implements the tournament schedule tab functionality and fixes all remaining E2E test failures. ### Changes Included 1. **Tournament Schedule Feature** - Added tournament schedule page at `/admin/tournaments/[id]/schedule` - Implemented "Generate Schedule" button functionality - Added schedule generation logic for round-robin tournaments 2. **E2E Test Fixes** - Fixed database connection issues in production builds - Improved test reliability with better error handling and debugging - Updated test infrastructure to use environment variables instead of hardcoded values 3. **CI/CD Updates** - Added E2E test job to PR workflow - Configured tests to run against development database - Moved database password to Gitea secrets 4. **Code Quality** - Removed hardcoded passwords from codebase - Improved Prisma client configuration - Enhanced authentication and navigation components ### Test Results All 16 E2E test scenarios are now passing: - Authentication tests: ✅ - Registration tests: ✅ - Tournament schedule tests: ✅ - Player schedule tests: ✅ - Admin navigation tests: ✅ ### Database Configuration - Tests run against `euchre_camp_dev` database - Production builds use environment variables for database configuration - Database password stored in Gitea secrets as `DB_PASSWORD` ### CI Pipeline The PR workflow now includes: 1. Unit tests 2. E2E tests (using production build) 3. Version bump analysis E2E tests must pass before PR can be merged. Reviewed-on: #27 Co-authored-by: David Gwilliam <dhgwilliam@gmail.com> Co-committed-by: David Gwilliam <dhgwilliam@gmail.com>
36 lines
1.1 KiB
Gherkin
36 lines
1.1 KiB
Gherkin
Feature: User Authentication
|
|
As a registered user
|
|
I want to log in and log out
|
|
So that I can access my account features
|
|
|
|
@happy-path @authentication
|
|
Scenario: Login with valid credentials
|
|
Given I am logged in as a player
|
|
When I go to the home page
|
|
Then I should see "Sign out"
|
|
|
|
@happy-path @authentication
|
|
Scenario: Logout successfully
|
|
Given I am logged in as a player
|
|
When I click the "Sign out" button
|
|
Then I should be redirected to the login page
|
|
|
|
@negative-test @authentication
|
|
Scenario: Login with invalid credentials
|
|
Given I am on the login page
|
|
When I log in with invalid credentials
|
|
Then I should see an error message
|
|
And I should remain on the login page
|
|
|
|
@happy-path @authentication
|
|
Scenario: Navigate to login page
|
|
Given I am on the home page
|
|
When I click the "Sign in" link
|
|
Then I should be on the login page
|
|
|
|
@happy-path @authentication
|
|
Scenario: Navigate to registration from login
|
|
Given I am on the login page
|
|
When I click the "Create an account" link
|
|
Then I should be on the registration page
|