Logo: Relish

  1. Sign in

Project: Decent-authentication

User Registers

In order to provide account details
As a user on the register page
I want to register an account

  • An input for email is visible (required)
  • An input for email confirmation is visible (required)
  • An input for password is visible (required)
  • An input for password confirmation is visible (required)
  • A "Save" button is visible
  • Clicking "Save" creates a new user in the system
  • Validation errors are visible if user cannot be created
Scenarios
empty form submission
Given
I am on the register page
When
I press "Save"
Then
I should see "Email can't be blank"
And
I should see "Email confirmation can't be blank"
And
I should see "Password can't be blank"
And
I should see "Password confirmation can't be blank"
form submission with errors
Given
I am on the register page
When
I fill in "Email" with "[email protected]"
And
I fill in "Email confirmation" with "[email protected]"
And
I fill in "Password" with "welcome"
And
I fill in "Password confirmation" with "welco"
And
I press "Save"
Then
I should see "Email doesn't match confirmation"
And
I should see "Password doesn't match confirmation"
user already exists
Given
the following user:
email [email protected]
password welcome
password_confirmation welcome
And
I am on the register page
When
I fill in "Email" with "[email protected]"
And
I fill in "Email confirmation" with "[email protected]"
And
I fill in "Password" with "tommy"
And
I fill in "Password confirmation" with "tommy"
And
I press "Save"
Then
I should see "Email has already been taken"
valid form submission
Given
I am on the register page
When
I fill in "Email" with "[email protected]"
And
I fill in "Email confirmation" with "[email protected]"
And
I fill in "Password" with "welcome"
And
I fill in "Password confirmation" with "welcome"
And
I press "Save"
Then
I should see "Registration successful"

Last published almost 6 years ago by leesmith.