forked from smudge/shifts
/
shift_admin.feature
143 lines (131 loc) · 5.75 KB
/
shift_admin.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
Feature: Shift admin manages shifts
In order to manage shifts
As a shifts admininistrator
I want to be able to create, assign, and destroy shifts
Scenario: Create a shift with power sign up
Given I am logged into CAS as "ad12"
And I am on the homepage
And I follow "Shifts"
Then I should see "Power sign up"
When I follow "Power sign up"
And I select "2010" from "shift_start_1i"
And I select "January" from "shift_start_2i"
And I select "18" from "shift_start_3i"
And I select "09" from "shift_start_4i"
And I select "00" from "shift_start_5i"
And I select "2010" from "shift_end_1i"
And I select "January" from "shift_end_2i"
And I select "18" from "shift_end_3i"
And I select "12" from "shift_end_4i"
And I select "00" from "shift_end_5i"
And I select "Harry Potter" from "shift_user_id"
And I select "Diagon Alley" from "shift_location_id"
When I press "Submit"
Then I should see "Successfully created shift."
Scenario: Destroy a shift
Given I am logged into CAS as "ad12"
And I am on the homepage
And I follow "Shifts"
Then I should see "Power sign up"
When I follow "Power sign up"
And I select "2010" from "shift_start_1i"
And I select "January" from "shift_start_2i"
And I select "18" from "shift_start_3i"
And I select "09" from "shift_start_4i"
And I select "00" from "shift_start_5i"
And I select "2010" from "shift_end_1i"
And I select "January" from "shift_end_2i"
And I select "18" from "shift_end_3i"
And I select "12" from "shift_end_4i"
And I select "00" from "shift_end_5i"
And I select "Harry Potter" from "shift_user_id"
And I select "Diagon Alley" from "shift_location_id"
When I press "Submit"
Then I should see "Successfully created shift."
When I follow "Shifts"
And I follow "Destroy"
Then I should see "Successfully destroyed shift."
@passed
Scenario Outline: See more choices when logged in as admin
Given I am logged into CAS as <user>
Given I am on the homepage
Then I <shouldornot> see <item>
Scenarios: Logged in as superuser
|user |shouldornot|item |
|"ad12"|should |"Dashboard"|
|"ad12"|should |"Hogwarts" |
|"ad12"|should |"Users" |
|"ad12"|should |"Shifts" |
|"ad12"|should |"Payforms" |
Scenarios: Logged in as normal user
|user |shouldornot|item |
|"em123"|should |"Dashboard" |
|"em123"|should |"Shifts" |
|"em123"|should |"Payforms" |
|"em123"|should not |"Departments"|
|"em123"|should not |"Users" |
@passed
Scenario Outline: See control panel on certain pages depending on how logged in
Given I am logged into CAS as <user>
Given I am on the homepage
When I follow <page>
Then I <shouldornot> see <item>
Scenarios: Logged in as admin
|user |page |shouldornot|item |
|"ad12"|"Shifts" |should |"Scheduling Options" |
|"ad12"|"Shifts" |should |"Schedule" |
|"ad12"|"Shifts" |should |"Time Slots" |
|"ad12"|"Shifts" |should |"Locations" |
|"ad12"|"Shifts" |should |"Location Groups" |
|"ad12"|"Shifts" |should |"Restrictions" |
|"ad12"|"Shifts" |should |"Notices" |
|"ad12"|"Shifts" |should |"Shift Report Links" |
|"ad12"|"Shifts" |should |"Export Schedule" |
|"ad12"|"Shifts" |should |"Templates" |
|"ad12"|"Shifts" |should |"Activate Templates" |
|"ad12"|"Shifts" |should |"View Options" |
|"ad12"|"Shifts" |should |"Unscheduled Shifts" |
|"ad12"|"Shifts" |should |"Active Shifts" |
|"ad12"|"Shifts" |should |"Data Objects" |
|"ad12"|"Payforms"|should |"Payform Admin" |
|"ad12"|"Payforms"|should |"View Payforms" |
|"ad12"|"Payforms"|should |"Submitted" |
|"ad12"|"Payforms"|should |"Approved" |
|"ad12"|"Payforms"|should |"Printed" |
|"ad12"|"Payforms"|should |"Print History" |
|"ad12"|"Payforms"|should |"Mass Add Jobs" |
|"ad12"|"Payforms"|should |"View Mass Jobs" |
|"ad12"|"Payforms"|should |"Punch Clocks" |
|"ad12"|"Payforms"|should |"Mass Punch Clocks" |
|"ad12"|"Payforms"|should |"E-mail Reminders" |
|"ad12"|"Payforms"|should |"Edit Categories" |
|"ad12"|"Payforms"|should |"Edit Configurations"|
Scenarios: Logged in as regular user
|user |page |shouldornot|item |
|"em123"|"Shifts" |should not |"Scheduling Options" |
|"em123"|"Shifts" |should not |"Time Slots" |
|"em123"|"Shifts" |should not |"Locations" |
|"em123"|"Shifts" |should not |"Location Groups" |
|"em123"|"Shifts" |should not |"Restrictions" |
|"em123"|"Shifts" |should not |"Notices" |
|"em123"|"Shifts" |should not |"Shift Report Links" |
|"em123"|"Shifts" |should not |"Export Schedule" |
|"em123"|"Shifts" |should not |"Templates" |
|"em123"|"Shifts" |should not |"Activate Templates" |
|"em123"|"Shifts" |should not |"View Options" |
|"em123"|"Shifts" |should not |"Unscheduled Shifts" |
|"em123"|"Shifts" |should not |"Active Shifts" |
|"em123"|"Shifts" |should not |"Data Objects" |
|"em123"|"Payforms"|should not |"Payform Admin" |
|"em123"|"Payforms"|should not |"View Payforms" |
|"em123"|"Payforms"|should not |"Submitted" |
|"em123"|"Payforms"|should not |"Approved" |
|"em123"|"Payforms"|should not |"Printed" |
|"em123"|"Payforms"|should not |"Print History" |
|"em123"|"Payforms"|should not |"Mass Add Jobs" |
|"em123"|"Payforms"|should not |"View Mass Jobs" |
|"em123"|"Payforms"|should not |"Punch Clocks" |
|"em123"|"Payforms"|should not |"Mass Punch Clocks" |
|"em123"|"Payforms"|should not |"E-mail Reminders" |
|"em123"|"Payforms"|should not |"Edit Categories" |
|"em123"|"Payforms"|should not |"Edit Configurations"|