dox Executable Documentation

Selections of the day

No menu

When I open the selections of '2013-01-04' with token 'token'
Then the menu should be empty
Then there should be 0 selections
Then the error message should be 'No menu found for given date.'

Wrong date format

When I open the selections of 'not a date' with token 'token'
Then the error message should be 'Could not parse date.'

Wrong token

When I open the selections of '2013-01-04' with token 'not the token'
Then the error message should be 'Wrong token.'

No selections

Given an order 'Test Order' with 1 menus each 3 dishes starting on '2000-01-03'
Given dish 1 of menu 1 of this order is 'German Text / English Text'
Given dish 2 of menu 1 of this order is 'Only english Text'
Given dish 3 of menu 1 of this order is 'Something else'
When I open the selections of '2000-01-03' with token 'token'
Then the date should be '2000-01-03'
Then there should be 3 dishes
Then dish 1 should be 'English Text' in english
Then dish 1 should be 'German Text' in german
Then dish 2 should be 'Only english Text' in english
Then dish 2 should be 'Only english Text' in german
Then there should be 0 selections

All selections

Given an order 'Test Order' with 1 menus each 3 dishes starting on '2000-01-03'
Given dish 1 of menu 1 of this order is 'A'
Given dish 2 of menu 1 of this order is 'B'
Given dish 3 of menu 1 of this order is 'C'
Given the user 'Bart'
Given the user 'Lisa'
Given the user 'Maggie'
Given 'Bart' selected dish 'A' for menu 1 of order 'Test Order'
Given 'Lisa' selected dish 'B' for menu 1 of order 'Test Order'
Given 'Lisa' selected no dish for menu 1 of order 'Test Order'
When I open the selections of '2000-01-03' with token 'token'
Then there should be 2 selections
Then selection 1 should be of user 'Bart' for dish 'A'
Then selection 2 should be of user 'Lisa' for dish 'B'

Default date

Given an order 'Test Order' with 1 menus each 1 dishes starting on '2000-01-03'
Given dish 1 of menu 1 of this order is 'A'
Given now is '2000-01-03'
When I open the selections with toke 'token'
Then dish 1 should be 'A' in english

No selection

Given an order 'Test Order' with 1 menus each 1 dishes starting on '2000-01-03'
Given dish 1 of menu 1 of this order is 'A'
Given the user 'Bart'
Given the user 'Lisa'
Given 'Bart' selected dish 'A' for menu 1 of order 'Test Order'
When I open the selections of '2000-01-03' with token 'token'
Then there should be 1 selections

Avatars

Given an order 'Test Order' with 1 menus each 1 dishes starting on '2000-01-03'
Given dish 1 of menu 1 of this order is 'A'
Given the user 'Bart'
Given the user 'Lisa'
Given 'Bart' selected dish 'A' for menu 1 of order 'Test Order'
Given 'Lisa' selected dish 'A' for menu 1 of order 'Test Order'
Given 'Lisa' has an avatar
When I open the selections of '2000-01-03' with token 'token'
Then the avatar of the user of selection 1 should be 'http://lacarte/user/avatars/default.png'
Then the avatar of the user of selection 2 should be 'http://lacarte/user/avatars/2.jpg'

Yielded selection

Given an order 'Test Order' with 1 menus each 1 dishes starting on '2000-01-03'
Given dish 1 of menu 1 of this order is 'A'
Given the user 'Bart'
Given 'Bart' selected dish 'A' for menu 1 of order 'Test Order'
Given 'Bart' yielded his selection of menu 1 of order 'Test Order'
When I open the selections of '2000-01-03' with token 'token'
Then selection 1 should be yielded

background

Given the api token is 'token'