60 lines
2.3 KiB
Gherkin
60 lines
2.3 KiB
Gherkin
Feature: User Registration
|
|
As a new user
|
|
I want to register for an account
|
|
So that I can participate in Euchre tournaments and track my games
|
|
|
|
Background:
|
|
Given I am on the registration page
|
|
|
|
@happy-path @authentication
|
|
Scenario: Successful registration with valid data
|
|
When I fill in "name" with "Test User"
|
|
And I fill in "email" with the generated unique email
|
|
And I fill in "password" with "TestPassword1234!"
|
|
And I click the "Create Account" button
|
|
Then I should be redirected to my profile page
|
|
And my user account should exist
|
|
|
|
@happy-path @authentication
|
|
Scenario: Auto-created player profile is linked to user
|
|
When I fill in "name" with "Profile Test User"
|
|
And I fill in "email" with the generated unique email
|
|
And I fill in "password" with "ProfilePass1234!"
|
|
And I click the "Create Account" button
|
|
Then I should be redirected to my profile page
|
|
And I should see "Welcome, Profile Test User"
|
|
|
|
@negative-test @authentication
|
|
Scenario: Registration with duplicate email fails
|
|
Given I am logged in as a player
|
|
When I navigate to the registration page
|
|
And I fill in "name" with "Duplicate User"
|
|
And I fill in "email" with the same email
|
|
And I fill in "password" with "TestPassword1234!"
|
|
And I click the "Create Account" button
|
|
Then I should see a registration error
|
|
|
|
@negative-test @authentication
|
|
Scenario: Registration with weak password fails
|
|
When I fill in "name" with "Weak Password User"
|
|
And I fill in "email" with the generated unique email
|
|
And I fill in "password" with "weak"
|
|
And I click the "Create Account" button
|
|
Then I should see "password" validation error
|
|
And I should remain on the registration page
|
|
|
|
@happy-path @authentication
|
|
Scenario: Registration form validation
|
|
When I click the "Create Account" button
|
|
Then I should see "name is required" error
|
|
And I should see "email is required" error
|
|
And I should see "password is required" error
|
|
|
|
@wip
|
|
Scenario: Registration with email verification (placeholder)
|
|
When I fill in "name" with "Email Verify User"
|
|
And I fill in "email" with "verify@example.com"
|
|
And I fill in "password" with "TestPassword1234!"
|
|
And I click the "Create Account" button
|
|
Then I should see "Please check your email to verify your account"
|