Commit 075a83989a39ec290d228d49c112be1b7c2a0ae0
Committed by
Rafael Manzo
1 parent
c10013d0
Exists in
colab
and in
4 other branches
Adding a creation feature to test for duplicated codes
Signed off by: Diego Araújo <diegoamc90@gmail.com> Signed off by: Daniel Alves <danpaulalves@gmail.com>
Showing
2 changed files
with
21 additions
and
3 deletions
Show diff stats
features/compound_metric_configuration/create.feature
@@ -24,9 +24,28 @@ Feature: Compound Metric Configuration Creation | @@ -24,9 +24,28 @@ Feature: Compound Metric Configuration Creation | ||
24 | And I set the select field "Scope" as "Class" | 24 | And I set the select field "Scope" as "Class" |
25 | And I set the select field "Reading Group" as "Scholar" | 25 | And I set the select field "Reading Group" as "Scholar" |
26 | And I press the Save button | 26 | And I press the Save button |
27 | - And I take a picture of the page | ||
28 | When I click the show link of "My Compound Metric" | 27 | When I click the show link of "My Compound Metric" |
29 | Then I should see "My Compound Metric" | 28 | Then I should see "My Compound Metric" |
30 | And I should see "mcm" | 29 | And I should see "mcm" |
31 | And I should see "8" | 30 | And I should see "8" |
32 | 31 | ||
32 | + @kalibro_configuration_restart @javascript | ||
33 | + Scenario: compound metric configuration creation with same code | ||
34 | + Given I am a regular user | ||
35 | + And I am signed in | ||
36 | + And I own a sample configuration | ||
37 | + And I have a reading group named "Scholar" | ||
38 | + And I have another compound metric configuration with code "Another_Code" within the given mezuro configuration | ||
39 | + And I am at the Sample Configuration page | ||
40 | + And I click the Add Metric link | ||
41 | + And I click the Compound Metric link | ||
42 | + When I fill the Name field with "My Compound Metric" | ||
43 | + And I fill the Description field with "Some description" | ||
44 | + And I fill the Code field with "Another_Code" | ||
45 | + And I fill the Script field with "8*8;" | ||
46 | + And I fill the Weight field with "8" | ||
47 | + And I set the select field "Scope" as "Class" | ||
48 | + And I set the select field "Reading Group" as "Scholar" | ||
49 | + When I press the Save button | ||
50 | + Then I should see "Code must be unique within a kalibro configuration" | ||
51 | + |
features/compound_metric_configuration/edition.feature
@@ -63,5 +63,4 @@ Feature: Compound Metric Configuration edition | @@ -63,5 +63,4 @@ Feature: Compound Metric Configuration edition | ||
63 | When I visit the sample compound metric configuration edit page | 63 | When I visit the sample compound metric configuration edit page |
64 | And I fill the Code field with "Another_Code" | 64 | And I fill the Code field with "Another_Code" |
65 | And I press the Save button | 65 | And I press the Save button |
66 | - And I take a picture of the page | ||
67 | - Then I should see "Code There is already a MetricConfiguration with code Another_Code! Please, choose another one." | 66 | + Then I should see "Code must be unique within a kalibro configuration" |