d2824695c0
- 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
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 "Log 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
|