create.feature
7.96 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
Feature: Create range
In order to be able to create new ranges
As a metric specialist
I should be able to fill up a form with its informations and submit it
@kalibro_restart
Scenario: Visiting range creation page when the user own an 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_restart
Scenario: Visiting range creation page when the user don'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_restart
Scenario: Visiting range creation page when the user own 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_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_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 MezuroRange from being saved"
And I should see "[666.0, 42.0[ is not a valid range"
@kalibro_restart
Scenario: With an invalid beggining (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 MezuroRange from being saved"
And I should see "Beginning is not a number"
@kalibro_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 "42"
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 MezuroRange from being saved"
And I should be at the New Range page
@kalibro_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 "Beginning There is already a MezuroRange with beginning 2.0! Please, choose another one."
@kalibro_restart @javascript
Scenario: Should create 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_restart @javascript
Scenario: Two valid 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"