dox Executable Documentation

Show all selections

Not admin

Given an order 'Test Order' with 0 menus each 0 dishes
When I open the page for order 'Test Order'
Then I should be redirected to 'list.html'

No users

Given I am logged in as admin
Given an order 'Test Order' with 3 menus each 2 dishes starting on '2000-01-03'
When I open the page for order 'Test Order'
Then there should be no success message
Then there should be no error message
Then the edit action should go to 'edit.html?order=1'
Then the export by dish action should go to '../export/dishes.csv?order=1'
Then there should be no export by user action
Then name of the order should be 'Test Order'
Then the order should have 3 dates
Then date 1 should be 'Mon'
Then there should be 0 users

No selections

Given I am logged in as admin
Given an order 'Test Order' with 3 menus each 2 dishes
Given the user 'Bart Simpson'
Given the user 'Lisa Simpson'
Given the user 'Maggie Simpson'
When I open the page for order 'Test Order'
Then there should be 3 users
Then the name of user 1 should be 'Bart Simpson'
Then the selection link of user 1 should be 'select.html?order=1&user=1'
Then user 1 should have 3 selections
Then user 1 should have nothing selected for selection 1
Then user 1 should have nothing selected for selection 2
Then user 1 should have nothing selected for selection 3
Then the name of user 2 should be 'Lisa Simpson'
Then the name of user 3 should be 'Maggie Simpson'

Users with selections

Given I am logged in as admin
Given an order 'Test Order' with 1 menus each 2 dishes
Given dish 1 of menu 1 of this order is 'Dish One'
Given dish 2 of menu 1 of this order is 'Dish Two'
Given the user 'Bart'
Given the user 'Lisa'
Given the user 'Maggie'
Given 'Bart' selected dish 'Dish One' for menu 1 of order 'Test Order'
Given 'Lisa' selected dish 'Dish Two' for menu 1 of order 'Test Order'
Given 'Maggie' selected no dish for menu 1 of order 'Test Order'
When I open the page for order 'Test Order'
Then the selection of user 1 should be 'Dish...' with the title 'Dish One'
Then the selection of user 2 should be 'Dish...' with the title 'Dish Two'
Then the selection of user 3 should be '-' with the title 'nothing'