create.feature
9.3 KB
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
Feature: Create Kalibro Range
In order to be able to create new kalibro ranges
As a metric specialist
I should be able to fill up a form with its informations and submit it
@kalibro_configuration_restart
Scenario: Visiting kalibro range creation page when the user owns a non-empty reading group
Given I am a regular user
And I am signed in
And I own a sample configuration
And I own a sample reading group
And I have a sample metric configuration within the given mezuro configuration
And I have a sample reading within the sample reading group labeled "My Reading"
And I am at the sample metric configuration page
When I click the Add Range link
Then I should be at the New Range page
And I should see "Beginning"
And I should see "End"
And I should see "Comments"
And I should see "Reading"
@kalibro_configuration_restart
Scenario: Visiting kalibro range creation page when the user doesn't own the reading group and this reading group is empty
Given I am a regular user
And I am signed in
And I own a sample configuration
And I have a reading group named "Scholar"
And I have a sample metric configuration within the given mezuro configuration
And I am at the sample metric configuration page
When I click the Add Range link
Then I should be at the New Range page
And I should see "Beginning"
And I should see "End"
And I should see "Comments"
And I should see "You must have Readings within your associated Reading Group to create a new Range."
And I should see "The Reading Group of your Metric Configuration belongs to another user and you are not allowed to modify it."
@kalibro_configuration_restart
Scenario: Visiting kalibro range creation page when the user owns an empty reading group (testing link to New Reading)
Given I am a regular user
And I am signed in
And I own a sample configuration
And I own a sample reading group
And I have a sample metric configuration within the given mezuro configuration
And I am at the sample metric configuration page
When I click the Add Range link
Then I should be at the New Range page
And I should see "Beginning"
And I should see "End"
And I should see "Comments"
And I should see "You must have Readings within your associated Reading Group to create a new Range."
When I click the Create New Reading link
Then I should be at the New Reading page
And I should see "Label"
And I should see "Grade"
And I should see "Color"
@kalibro_configuration_restart
Scenario: With valid fields and owning a non-empty reading group
Given I am a regular user
And I am signed in
And I own a sample configuration
And I own a sample reading group
And I have a sample metric configuration within the given mezuro configuration
And I have a sample reading within the sample reading group labeled "My Reading"
And I am at the New Range page
And I fill the Beginning field with "42"
And I fill the End field with "666"
And I fill the Comments field with "My Comment"
And I set the select field "Reading" as "My Reading"
When I press the Save button
Then I should be at metric configuration sample page
@kalibro_configuration_restart
Scenario: With invalid fields and owning a non-empty reading group (Beginning > End)
Given I am a regular user
And I am signed in
And I own a sample configuration
And I own a sample reading group
And I have a sample metric configuration within the given mezuro configuration
And I have a sample reading within the sample reading group labeled "My Reading"
And I am at the New Range page
And I fill the Beginning field with "666"
And I fill the End field with "42"
And I fill the Comments field with "My Comment"
And I set the select field "Reading" as "My Reading"
When I press the Save button
Then I should be at the New Range page
And I should see "1 error prohibited this KalibroRange from being saved"
And I should see "End The End value should be greater than the Beginning value."
@kalibro_configuration_restart
Scenario: With an invalid beginning (not a number)
Given I am a regular user
And I am signed in
And I own a sample configuration
And I own a sample reading group
And I have a sample metric configuration within the given mezuro configuration
And I have a sample reading within the sample reading group labeled "My Reading"
And I am at the New Range page
And I fill the Beginning field with "z"
And I fill the End field with "42"
And I fill the Comments field with "My Comment"
And I set the select field "Reading" as "My Reading"
When I press the Save button
Then I should be at the New Range page
And I should see "1 error prohibited this KalibroRange from being saved"
And I should see "Beginning is not a number"
@kalibro_configuration_restart
Scenario: With an invalid end (not a number)
Given I am a regular user
And I am signed in
And I own a sample configuration
And I own a sample reading group
And I have a sample metric configuration within the given mezuro configuration
And I have a sample reading within the sample reading group labeled "My Reading"
And I am at the New Range page
And I fill the Beginning field with "-1"
And I fill the End field with "z"
And I fill the Comments field with "My Comment"
And I set the select field "Reading" as "My Reading"
When I press the Save button
Then I should see "1 error prohibited this KalibroRange from being saved"
And I should see "End is not a number"
And I should be at the New Range page
@kalibro_configuration_restart
Scenario: With an already taken beginning
Given I am a regular user
And I am signed in
And I own a sample configuration
And I own a sample reading group
And I have a sample metric configuration within the given mezuro configuration
And I have a sample reading within the sample reading group labeled "My Reading"
And I have a sample range within the sample metric configuration with beginning "2"
And I am at the New Range page
And I fill the Beginning field with "2"
And I fill the End field with "666"
And I fill the Comments field with "My Comment"
And I set the select field "Reading" as "My Reading"
When I press the Save button
Then I should be at the New Range page
And I should see "2 errors prohibited this KalibroRange from being saved"
And I should see "Beginning Should be unique within a Metric Configuration"
And I should see "Beginning There is already a KalibroRange within these boundaries! Please, choose another interval."
@kalibro_configuration_restart @javascript
Scenario: Should create a kalibro range with [-INF, INF] threshold
Given I am a regular user
And I am signed in
And I own a sample configuration
And I own a sample reading group
And I have a sample metric configuration within the given mezuro configuration
And I have a sample reading within the sample reading group labeled "My Reading"
And I am at the New Range page
And I click the -∞ link
And I click the ∞ link
And I fill the Comments field with "My Comment"
And I set the select field "Reading" as "My Reading"
When I press the Save button
Then I should be at metric configuration sample page
And I should see "-INF"
And I should see "INF"
@kalibro_configuration_restart @javascript
Scenario: Two valid kalibro ranges (one with INF)
Given I am a regular user
And I am signed in
And I own a sample configuration
And I own a sample reading group
And I have a sample metric configuration within the given mezuro configuration
And I have a sample reading within the sample reading group labeled "My Reading"
And I am at the New Range page
And I fill the Beginning field with "2"
And I fill the End field with "666"
And I fill the Comments field with "My Comment"
And I set the select field "Reading" as "My Reading"
And I press the Save button
And I am at the New Range page
And I fill the Beginning field with "666"
And I click the ∞ link
And I fill the Comments field with "My Comment"
And I set the select field "Reading" as "My Reading"
When I press the Save button
Then I should be at metric configuration sample page
And I should see "666"
And I should see "INF"
@kalibro_configuration_restart @javascript
Scenario: Should create a kalibro range and redirect to the compound metric configuration page
Given I am a regular user
And I am signed in
And I own a sample configuration
And I own a sample reading group
And I have a sample metric configuration within the given mezuro configuration
And I have a sample compound metric configuration within the given mezuro configuration
And I have a sample reading within the sample reading group labeled "My Reading"
And I am at the New Range page for the compound metric configuration
And I click the -∞ link
And I click the ∞ link
And I fill the Comments field with "My Comment"
And I set the select field "Reading" as "My Reading"
When I press the Save button
Then I should be at compound metric configuration sample page
And I should see "-INF"
And I should see "INF"