Commit c6b019cf254397450f99f21b7616dc5ba6383cb0

Authored by Heitor
1 parent 344d4a82

Rename metric conf. features to tree metric conf.

Signed off by: Diego Araújo <diegoamc90@gmail.com>
features/metric_configuration/create.feature
... ... @@ -1,91 +0,0 @@
1   -Feature: Metric Configuration Creation
2   - In order to register my metric configurations
3   - As a regular user
4   - I should be able to create metric configurations
5   -
6   - @kalibro_configuration_restart
7   - Scenario: Should not create metric configurations without login
8   - Given I have a sample configuration
9   - And I am at the Sample Configuration page
10   - Then I should not see "New Metric Configuration"
11   -
12   - @kalibro_configuration_restart @javascript
13   - Scenario: metric configuration creation
14   - Given I am a regular user
15   - And I am signed in
16   - And I own a sample configuration
17   - And I have a reading group named "Scholar"
18   - And I am at the Sample Configuration page
19   - And I click the Add Metric link
20   - And I click the "Analizo" h3
21   - And I click the Total Lines of Code link
22   - And I fill the Weight field with "2"
23   - And I set the select field "Aggregation Form" as "Average"
24   - And I set the select field "Reading Group" as "Scholar"
25   - When I press the Save button
26   - Then I should see "Total Lines of Code"
27   - Then I should see "2"
28   -
29   - @kalibro_configuration_restart @javascript
30   - Scenario: ruby metric configuration creation
31   - Given I am a regular user
32   - And I am signed in
33   - And I own a sample configuration
34   - And I have a reading group named "Scholar"
35   - And I am at the Sample Configuration page
36   - And I click the Add Metric link
37   - And I click the "MetricFu" h3
38   - And I click the Pain link
39   - And I fill the Weight field with "2"
40   - And I set the select field "Aggregation Form" as "Average"
41   - And I set the select field "Reading Group" as "Scholar"
42   - When I press the Save button
43   - Then I should see "Pain"
44   - Then I should see "2"
45   -
46   - @kalibro_configuration_restart @javascript
47   - Scenario: metric configuration creation
48   - Given I am a regular user
49   - And I am signed in
50   - And I own a sample configuration
51   - And I have a reading group named "Scholar"
52   - And I am at the Sample Configuration page
53   - And I click the Add Metric link
54   - And I click the "Analizo" h3
55   - And I click the Total Lines of Code link
56   - When I click the Back link
57   - Then I should be at the choose metric page
58   -
59   - @kalibro_configuration_restart @javascript
60   - Scenario: compound metric configuration creation with same code
61   - Given I am a regular user
62   - And I am signed in
63   - And I own a sample configuration
64   - And I have a reading group named "Scholar"
65   - And I have a metric configuration with code "total_abstract_classes" within the given mezuro configuration
66   - And I am at the Sample Configuration page
67   - And I click the Add Metric link
68   - And I click the "Analizo" h3
69   - And I click the Total Abstract Classes link
70   - And I fill the Weight field with "2"
71   - And I set the select field "Aggregation Form" as "Average"
72   - And I set the select field "Reading Group" as "Scholar"
73   - When I press the Save button
74   - Then I should see "Code must be unique within a kalibro configuration"
75   -
76   - @kalibro_configuration_restart @javascript
77   - Scenario: metric configuration creation with count aggregation form
78   - Given I am a regular user
79   - And I am signed in
80   - And I own a sample configuration
81   - And I have a reading group named "Scholar"
82   - And I am at the Sample Configuration page
83   - And I click the Add Metric link
84   - And I click the "Analizo" h3
85   - And I click the Lines of Code link
86   - And I fill the Weight field with "100"
87   - And I set the select field "Aggregation Form" as "Count"
88   - And I set the select field "Reading Group" as "Scholar"
89   - When I press the Save button
90   - Then I should see "Lines of Code"
91   - Then I should see "100"
features/metric_configuration/delete.feature
... ... @@ -1,25 +0,0 @@
1   -Feature: Metric Configuration Deletion
2   - In order to be able to remove metric configuration
3   - As a regular user
4   - The system should have an interface to it
5   -
6   - @kalibro_configuration_restart
7   - Scenario: Should delete a metric configuration that I own
8   - Given I am a regular user
9   - And I am signed in
10   - And I own a sample configuration
11   - And I have a sample reading group
12   - And I have a sample metric configuration within the given mezuro configuration
13   - When I am at the Sample Configuration page
14   - And I click destroy Metric Configuration
15   - Then I should see "There are no Metric Configurations yet!"
16   -
17   - @kalibro_configuration_restart
18   - Scenario: Should not see the destroy metric configuration link in the mezuro configuration that I not own
19   - Given I am a regular user
20   - And I am signed in
21   - And I have a sample configuration
22   - And I have a sample reading group
23   - And I have a sample metric configuration within the given mezuro configuration
24   - When I am at the Sample Configuration page
25   - Then I should not see "Destroy"
features/metric_configuration/edition.feature
... ... @@ -1,52 +0,0 @@
1   -Feature: Metric Configuration edition
2   - In order to interact with metric configurations
3   - As a regular user
4   - I should edit the informations of metric configurations
5   -
6   - @kalibro_configuration_restart
7   - Scenario: the configuration is not mine
8   - Given I am a regular user
9   - And I am signed in
10   - And I have a sample configuration
11   - And I have a sample reading group
12   - And I have a sample metric configuration within the given mezuro configuration
13   - When I am at the Sample Configuration page
14   - Then I should not find "Edit" within "table#tree_metric_configurations"
15   -
16   - @kalibro_configuration_restart
17   - Scenario: editing a metric configuration successfully
18   - Given I am a regular user
19   - And I am signed in
20   - And I own a sample configuration
21   - And I have a sample reading group
22   - And I have a sample metric configuration within the given mezuro configuration
23   - And I am at the Sample Configuration page
24   - When I click the Edit link
25   - And I fill the Weight field with "3.0"
26   - And I press the Save button
27   - Then I should see "3.0"
28   -
29   - @kalibro_configuration_restart
30   - Scenario: trying to edit with blank fields
31   - Given I am a regular user
32   - And I am signed in
33   - And I own a sample configuration
34   - And I have a sample reading group
35   - And I have a sample metric configuration within the given mezuro configuration
36   - When I visit the sample metric configuration edit page
37   - And I fill the Weight field with " "
38   - And I press the Save button
39   - Then I should see "Weight must be greater than 0"
40   -
41   - @kalibro_configuration_restart
42   - Scenario: Should not edit a metric configuration with invalid weight
43   - Given I am a regular user
44   - And I am signed in
45   - And I own a sample configuration
46   - And I have a sample reading group
47   - And I have a sample metric configuration within the given mezuro configuration
48   - When I visit the sample metric configuration edit page
49   - And I fill the Weight field with "0"
50   - And I set the select field "Aggregation Form" as "Median"
51   - When I press the Save button
52   - Then I should see "Weight must be greater than 0"
features/metric_configuration/listing.feature
... ... @@ -1,37 +0,0 @@
1   -Feature: Configuration listing
2   - In order to interact with metric configurations
3   - As a regular user
4   - I should see the metric configurations of a given configuration
5   -
6   - @kalibro_configuration_restart
7   - Scenario: When there are no metric configurations
8   - Given I have a sample configuration
9   - When I am at the Sample Configuration page
10   - Then I should see "Metric"
11   - And I should see "Code"
12   - And I should see "Weight"
13   - And I should see "There are no Metric Configurations yet!"
14   -
15   - @kalibro_configuration_restart
16   - Scenario: When there are metric configurations
17   - Given I have a sample configuration
18   - And I have a sample reading group
19   - And I have a sample metric configuration within the given mezuro configuration
20   - When I am at the Sample Configuration page
21   - Then I should see the sample metric configuration content
22   -
23   - @kalibro_configuration_restart
24   - Scenario: I should see the add metric link when I am the owner of the given configuration
25   - Given I am a regular user
26   - And I am signed in
27   - And I own a sample configuration
28   - When I am at the Sample Configuration page
29   - Then I should see "Add Metric"
30   -
31   - @kalibro_configuration_restart
32   - Scenario: I should not see the add metric link when I am at a given configuration page
33   - Given I am a regular user
34   - And I am signed in
35   - And I have a sample configuration
36   - When I am at the Sample Configuration page
37   - Then I should not see "Add Metric"
features/metric_configuration/show.feature
... ... @@ -1,28 +0,0 @@
1   -Feature: Show Metric Configuration
2   - In order to know all the metric configurations of the given configuration and its contents
3   - As a regular user
4   - I should be able to see each of them
5   -
6   - @kalibro_configuration_restart
7   - Scenario: Checking metric configuration show link
8   - Given I have a sample configuration
9   - And I have a sample reading group
10   - And I have a sample reading within the sample reading group labeled "My Reading"
11   - And I have a sample metric configuration within the given mezuro configuration
12   - And I have a sample range within the sample metric configuration
13   - When I am at the Sample Configuration page
14   - And I click the Show link
15   - Then I should be at metric configuration sample page
16   - And I should see the sample range
17   -
18   - @kalibro_configuration_restart @javascript
19   - Scenario: When there's a range created and I want to see its comments
20   - Given I have a sample configuration
21   - And I have a sample reading group
22   - And I have a sample reading within the sample reading group labeled "My Reading"
23   - And I have a sample metric configuration within the given mezuro configuration
24   - And I have a sample range within the sample metric configuration
25   - And I am at the sample metric configuration page
26   - When I click the "comment-icon" icon
27   - Then I should see "Comment"
28   -
features/tree_metric_configuration/create.feature 0 → 100644
... ... @@ -0,0 +1,91 @@
  1 +Feature: Tree Metric Configuration Creation
  2 + In order to register my metric configurations
  3 + As a regular user
  4 + I should be able to create metric configurations
  5 +
  6 + @kalibro_configuration_restart
  7 + Scenario: Should not create metric configurations without login
  8 + Given I have a sample configuration
  9 + And I am at the Sample Configuration page
  10 + Then I should not see "New Metric Configuration"
  11 +
  12 + @kalibro_configuration_restart @javascript
  13 + Scenario: metric configuration creation
  14 + Given I am a regular user
  15 + And I am signed in
  16 + And I own a sample configuration
  17 + And I have a reading group named "Scholar"
  18 + And I am at the Sample Configuration page
  19 + And I click the Add Metric link
  20 + And I click the "Analizo" h3
  21 + And I click the Total Lines of Code link
  22 + And I fill the Weight field with "2"
  23 + And I set the select field "Aggregation Form" as "Average"
  24 + And I set the select field "Reading Group" as "Scholar"
  25 + When I press the Save button
  26 + Then I should see "Total Lines of Code"
  27 + Then I should see "2"
  28 +
  29 + @kalibro_configuration_restart @javascript
  30 + Scenario: ruby metric configuration creation
  31 + Given I am a regular user
  32 + And I am signed in
  33 + And I own a sample configuration
  34 + And I have a reading group named "Scholar"
  35 + And I am at the Sample Configuration page
  36 + And I click the Add Metric link
  37 + And I click the "MetricFu" h3
  38 + And I click the Pain link
  39 + And I fill the Weight field with "2"
  40 + And I set the select field "Aggregation Form" as "Average"
  41 + And I set the select field "Reading Group" as "Scholar"
  42 + When I press the Save button
  43 + Then I should see "Pain"
  44 + Then I should see "2"
  45 +
  46 + @kalibro_configuration_restart @javascript
  47 + Scenario: metric configuration creation
  48 + Given I am a regular user
  49 + And I am signed in
  50 + And I own a sample configuration
  51 + And I have a reading group named "Scholar"
  52 + And I am at the Sample Configuration page
  53 + And I click the Add Metric link
  54 + And I click the "Analizo" h3
  55 + And I click the Total Lines of Code link
  56 + When I click the Back link
  57 + Then I should be at the choose metric page
  58 +
  59 + @kalibro_configuration_restart @javascript
  60 + Scenario: compound metric configuration creation with same code
  61 + Given I am a regular user
  62 + And I am signed in
  63 + And I own a sample configuration
  64 + And I have a reading group named "Scholar"
  65 + And I have a metric configuration with code "total_abstract_classes" within the given mezuro configuration
  66 + And I am at the Sample Configuration page
  67 + And I click the Add Metric link
  68 + And I click the "Analizo" h3
  69 + And I click the Total Abstract Classes link
  70 + And I fill the Weight field with "2"
  71 + And I set the select field "Aggregation Form" as "Average"
  72 + And I set the select field "Reading Group" as "Scholar"
  73 + When I press the Save button
  74 + Then I should see "Code must be unique within a kalibro configuration"
  75 +
  76 + @kalibro_configuration_restart @javascript
  77 + Scenario: metric configuration creation with count aggregation form
  78 + Given I am a regular user
  79 + And I am signed in
  80 + And I own a sample configuration
  81 + And I have a reading group named "Scholar"
  82 + And I am at the Sample Configuration page
  83 + And I click the Add Metric link
  84 + And I click the "Analizo" h3
  85 + And I click the Lines of Code link
  86 + And I fill the Weight field with "100"
  87 + And I set the select field "Aggregation Form" as "Count"
  88 + And I set the select field "Reading Group" as "Scholar"
  89 + When I press the Save button
  90 + Then I should see "Lines of Code"
  91 + Then I should see "100"
... ...
features/tree_metric_configuration/delete.feature 0 → 100644
... ... @@ -0,0 +1,25 @@
  1 +Feature: Metric Configuration Deletion
  2 + In order to be able to remove metric configuration
  3 + As a regular user
  4 + The system should have an interface to it
  5 +
  6 + @kalibro_configuration_restart
  7 + Scenario: Should delete a metric configuration that I own
  8 + Given I am a regular user
  9 + And I am signed in
  10 + And I own a sample configuration
  11 + And I have a sample reading group
  12 + And I have a sample metric configuration within the given mezuro configuration
  13 + When I am at the Sample Configuration page
  14 + And I click destroy Metric Configuration
  15 + Then I should see "There are no Metric Configurations yet!"
  16 +
  17 + @kalibro_configuration_restart
  18 + Scenario: Should not see the destroy metric configuration link in the mezuro configuration that I not own
  19 + Given I am a regular user
  20 + And I am signed in
  21 + And I have a sample configuration
  22 + And I have a sample reading group
  23 + And I have a sample metric configuration within the given mezuro configuration
  24 + When I am at the Sample Configuration page
  25 + Then I should not see "Destroy"
... ...
features/tree_metric_configuration/edition.feature 0 → 100644
... ... @@ -0,0 +1,52 @@
  1 +Feature: Metric Configuration edition
  2 + In order to interact with metric configurations
  3 + As a regular user
  4 + I should edit the informations of metric configurations
  5 +
  6 + @kalibro_configuration_restart
  7 + Scenario: the configuration is not mine
  8 + Given I am a regular user
  9 + And I am signed in
  10 + And I have a sample configuration
  11 + And I have a sample reading group
  12 + And I have a sample metric configuration within the given mezuro configuration
  13 + When I am at the Sample Configuration page
  14 + Then I should not see Edit within table
  15 +
  16 + @kalibro_configuration_restart
  17 + Scenario: editing a metric configuration successfully
  18 + Given I am a regular user
  19 + And I am signed in
  20 + And I own a sample configuration
  21 + And I have a sample reading group
  22 + And I have a sample metric configuration within the given mezuro configuration
  23 + And I am at the Sample Configuration page
  24 + When I click the Edit link
  25 + And I fill the Weight field with "3.0"
  26 + And I press the Save button
  27 + Then I should see "3.0"
  28 +
  29 + @kalibro_configuration_restart
  30 + Scenario: trying to edit with blank fields
  31 + Given I am a regular user
  32 + And I am signed in
  33 + And I own a sample configuration
  34 + And I have a sample reading group
  35 + And I have a sample metric configuration within the given mezuro configuration
  36 + When I visit the sample metric configuration edit page
  37 + And I fill the Weight field with " "
  38 + And I press the Save button
  39 + Then I should see "Weight must be greater than 0"
  40 +
  41 + @kalibro_configuration_restart
  42 + Scenario: Should not edit a metric configuration with invalid weight
  43 + Given I am a regular user
  44 + And I am signed in
  45 + And I own a sample configuration
  46 + And I have a sample reading group
  47 + And I have a sample metric configuration within the given mezuro configuration
  48 + When I visit the sample metric configuration edit page
  49 + And I fill the Weight field with "0"
  50 + And I set the select field "Aggregation Form" as "Median"
  51 + When I press the Save button
  52 + Then I should see "Weight must be greater than 0"
... ...
features/tree_metric_configuration/listing.feature 0 → 100644
... ... @@ -0,0 +1,37 @@
  1 +Feature: Configuration listing
  2 + In order to interact with metric configurations
  3 + As a regular user
  4 + I should see the metric configurations of a given configuration
  5 +
  6 + @kalibro_configuration_restart
  7 + Scenario: When there are no metric configurations
  8 + Given I have a sample configuration
  9 + When I am at the Sample Configuration page
  10 + Then I should see "Metric"
  11 + And I should see "Code"
  12 + And I should see "Weight"
  13 + And I should see "There are no Metric Configurations yet!"
  14 +
  15 + @kalibro_configuration_restart
  16 + Scenario: When there are metric configurations
  17 + Given I have a sample configuration
  18 + And I have a sample reading group
  19 + And I have a sample metric configuration within the given mezuro configuration
  20 + When I am at the Sample Configuration page
  21 + Then I should see the sample metric configuration content
  22 +
  23 + @kalibro_configuration_restart
  24 + Scenario: I should see the add metric link when I am the owner of the given configuration
  25 + Given I am a regular user
  26 + And I am signed in
  27 + And I own a sample configuration
  28 + When I am at the Sample Configuration page
  29 + Then I should see "Add Metric"
  30 +
  31 + @kalibro_configuration_restart
  32 + Scenario: I should not see the add metric link when I am at a given configuration page
  33 + Given I am a regular user
  34 + And I am signed in
  35 + And I have a sample configuration
  36 + When I am at the Sample Configuration page
  37 + Then I should not see "Add Metric"
... ...
features/tree_metric_configuration/show.feature 0 → 100644
... ... @@ -0,0 +1,28 @@
  1 +Feature: Show Metric Configuration
  2 + In order to know all the metric configurations of the given configuration and its contents
  3 + As a regular user
  4 + I should be able to see each of them
  5 +
  6 + @kalibro_configuration_restart
  7 + Scenario: Checking metric configuration show link
  8 + Given I have a sample configuration
  9 + And I have a sample reading group
  10 + And I have a sample reading within the sample reading group labeled "My Reading"
  11 + And I have a sample metric configuration within the given mezuro configuration
  12 + And I have a sample range within the sample metric configuration
  13 + When I am at the Sample Configuration page
  14 + And I click the Show link
  15 + Then I should be at metric configuration sample page
  16 + And I should see the sample range
  17 +
  18 + @kalibro_configuration_restart @javascript
  19 + Scenario: When there's a range created and I want to see its comments
  20 + Given I have a sample configuration
  21 + And I have a sample reading group
  22 + And I have a sample reading within the sample reading group labeled "My Reading"
  23 + And I have a sample metric configuration within the given mezuro configuration
  24 + And I have a sample range within the sample metric configuration
  25 + And I am at the sample metric configuration page
  26 + When I click the "comment-icon" icon
  27 + Then I should see "Comment"
  28 +
... ...