dox Executable Documentation

Update user

No change

Given the user 'Homer' with the email 'homer@simpson.com'
Given I am editing the user 'Homer'
When I save my changes
Then there should be no error message
Then the success message should be 'The user has been updated'
Then there should be 1 users
Then there should be a user with the name 'Homer' the email 'homer@simpson.com'

Change name and email

Given the user 'Homer' with the email 'homer@simpson.com'
Given I am editing the user 'Homer'
Given I have entered the name 'Bart'
Given I have entered the email 'EatMyShorts@burns.com'
When I save my changes
Then there should be no error message
Then the success message should be 'The user has been updated'
Then there should be 1 users
Then there should be a user with the name 'Bart' the email 'eatmyshorts@burns.com'

Missing data

Given the user 'Homer' with the email 'homer@simpson.com'
Given I am editing the user 'Homer'
Given I have entered the name ''
Given I have entered the email 'EatMyShorts@burns.com'
When I save my changes
Then there should be no success message
Then the error message should be 'Could not update user. Missing data.'
Then I should still be editing the user 'Homer'
Then the editing name field should contain ''
Then the editing email field should contain 'EatMyShorts@burns.com'

Change avatar

Given the user 'Homer' with the email 'homer@simpson.com'
Given I am editing the user 'Homer'
Given I have selected an avatar file 'avatar.JPG'
When I save my changes
Then there should be no error message
Then the success message should be 'The user has been updated'
Then there should be 1 users
Then 'Homer' should have an avatar

Wrong picture format

Given the user 'Homer' with the email 'homer@simpson.com'
Given I am editing the user 'Homer'
Given I have selected an avatar file 'avatar.png'
Given I have entered the email 'Some@mail.com'
Given I have entered the name 'Some Name'
When I save my changes
Then the error message should be 'Only jpg-files allowed.'
Then I should still be editing the user 'Homer'
Then the editing name field should contain 'Some Name'
Then the editing email field should contain 'Some@mail.com'