dox Executable Documentation

Login

Open page

When I open the page
Then there should be no error message

Login as admin successfully

Given I have entered the admin email 'admin@example.com'
Given I have entered the admin password 'password'
When I log in as admin
Then I should be logged in as admin
Then I should be redirected to '../order/list.html'

Wrong admin email

Given I have entered the admin email 'wrong@example.com'
Given I have entered the admin password 'password'
When I log in as admin
Then the error message should be 'Could not find group for given email and password'
Then the admin email field should contain 'wrong@example.com'

Wrong admin password

Given I have entered the admin email 'admin@example.com'
Given I have entered the admin password 'wrong'
When I log in as admin
Then the error message should be 'Could not find group for given email and password'
Then the admin email field should contain 'admin@example.com'

Already logged in

Given I am logged in as admin
When I open the page
Then I should be redirected to '../order/list.html'

Log out

Given I am logged in as admin
When I log out
Then I should be redirected to 'login.html'
Then I should be logged out

Log in user

Given the user 'Bart Simpson' with the email 'bart@simpson.com' and key 'myKey'
Given I have enter the key 'myKey'
When I log in as user
Then I should be logged in as 'Bart Simpson'
Then I should not be logged in as admin

Wrong key

Given the user 'Bart Simpson' with the email 'bart@simpson.com' and key 'myKey'
Given I have enter the key 'notMyKey'
When I log in as user
Then the error message should be 'You entered an invalid key'

background

Given the group 'Group' with the admin email 'admin@example.com' and password 'password'