edition.feature
2.98 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
Feature: Compound Metric Configuration edition
In order to interact with compound metric configurations
As a regular user
I should edit the informations of compound metric configurations
@kalibro_configuration_restart
Scenario: the configuration is not mine
Given I am a regular user
And I am signed in
And I have a sample configuration
And I have 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
When I am at the Sample Configuration page
Then I should not see Edit within table
@kalibro_configuration_restart
Scenario: editing a compound metric configuration successfully
Given I am a regular user
And I am signed in
And I own a sample configuration
And I have 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 am at the Sample Configuration page
When I click the edit link of the Coumpound Metric
And I fill the Script field with "Another javascript"
And I fill the Code field with "Another_code"
And I press the Save button
Then I should see "Another_code"
And I should see "Compound Metric Configuration was successfully updated."
@kalibro_configuration_restart@javascript
Scenario: trying to edit with blank fields
Given I am a regular user
And I am signed in
And I own a sample configuration
And I have 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
When I visit the sample compound metric configuration edit page
And I fill the Name field with " "
And I fill the Script field with " "
And I fill the Code field with " "
And I fill the Weight field with " "
And I press the Save button
Then I should see "Edit Compound Metric Configuration"
And I should see "Name can't be blank"
And I should see "Script can't be blank"
And I should see "Code can't be blank"
And I should see "Weight must be greater than 0"
@kalibro_configuration_restart
Scenario: trying to edit with an existing code
Given I am a regular user
And I am signed in
And I own a sample configuration
And I have 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 another compound metric configuration with code "Another_Code" within the given mezuro configuration
When I visit the sample compound metric configuration edit page
And I fill the Code field with "Another_Code"
And I press the Save button
Then I should see "Code must be unique within a kalibro configuration"