THIS IS THE LEWEB CREATE ACCOUNT PAGE
Given I want to register an account with logentries
When I visit the registration page
Then the registration page should display correctly
Given I am registering for a new account
When I dont provide any details
Then my registration should fail
Given I am registering for a new account
When I provide correct and valid details
Then my registration should succeed
Given I am registering for an new account
When I leave the first name field blank
Then I should see the message "First name is required"
Given I am registering for an new account
When I try to enter a first name that is too long
Then the first name text should be limited to 30 characters
Given I am registering for an new account
When I leave the email field blank
Then I should see the message "Email is required"
Given I am registering for an new account
When I try to enter a email address that is too long
Then the email address text should be limited to 75 characters
Given I am registering for an new account
When I try to enter an invalid email address
Then I should see the message "Email address appears invalid"
Given I am registering for an new account
When I leave the password field blank
Then I should see the message "Password is required"
Given I am registering for an new account
When I try to enter a password that is too short
Then I should see the message "Must be eight or more characters"
Given I am registering for an new account
When I try to enter a password that is too long
Then the password text should be limited to 75 characters
Given I am registering for an new account
When I leave the confirm password field blank
Then I should see the message "Password must match"
Given I am registering for an new account
When I try to enter a confirmation password that is too long
Then the confirmation password text should be limited to 75 characters
Given I am registering for an new account
When I enter two different passwords
Then I should see the message "Password must match"
Given I am registering for an new account
When I leave the organization field blank
Then I should see the message "Organization name is required"
Given I am registering for an new account
When I try to enter an organisation name that is too long
Then the password text should be limited to 64 characters
Given I am registering for an new account
When I leave the telephone field blank
Then I should see the message "Telephone number is required"
Given I am registering for an new account
When I enter an invalid telephone number
Then the telephone entry box should be cleared
And I should see the message "Telephone number is required"
Depending on how the unit tests / code is laid out, you may never need to write them again
End to end tests are like a sledgehammer, big and heavy.
They should be used as sparingly as possible
For leweb, they should live with the application
Quick and easy to run, fast feedback
Should be the workhorse of test suite
For react, they should live with the components
UNIT
INTEGRATION
E2E
@endtoend
Given I want to register an account with logentries
When I visit the registration page
Then the registration page should display correctly
@endtoend
Given I am registering for a new account
When I dont provide any details
Then my registration should fail
@endtoend
Given I am registering for a new account
When I provide correct and valid details
Then my registration should succeed
@unit
Given I am registering for an new account
When I leave the first name field blank
Then I should see the message "First name is required"
@unit
Given I am registering for an new account
When I try to enter a first name that is too long
Then the first name text should be limited to 30 characters
@unit
Given I am registering for an new account
When I leave the email field blank
Then I should see the message "Email is required"
@unit
Given I am registering for an new account
When I try to enter a email address that is too long
Then the email address text should be limited to 75 characters
@unit
Given I am registering for an new account
When I try to enter an invalid email address
Then I should see the message "Email address appears invalid"
@unit
Given I am registering for an new account
When I leave the password field blank
Then I should see the message "Password is required"
@unit
Given I am registering for an new account
When I try to enter a password that is too short
Then I should see the message "Must be eight or more characters"
@unit
Given I am registering for an new account
When I try to enter a password that is too long
Then the password text should be limited to 75 characters
@unit
Given I am registering for an new account
When I leave the confirm password field blank
Then I should see the message "Password must match"
@unit
Given I am registering for an new account
When I try to enter a confirmation password that is too long
Then the confirmation password text should be limited to 75 characters
@unit
Given I am registering for an new account
When I enter two different passwords
Then I should see the message "Password must match"
@unit
Given I am registering for an new account
When I leave the organization field blank
Then I should see the message "Organization name is required"
@unit
Given I am registering for an new account
When I try to enter an organisation name that is too long
Then the password text should be limited to 64 characters
@unit
Given I am registering for an new account
When I leave the telephone field blank
Then I should see the message "Telephone number is required"
@unit
Given I am registering for an new account
When I enter an invalid telephone number
Then the telephone entry box should be cleared
And I should see the message "Telephone number is required"