Commit 7a1820e6873416b33cdca27a8af9632952f45b68
1 parent
db1f4354
Exists in
colab
and in
4 other branches
List hotspot metric configurations
* Also renamed some step definitions to explicitly use tree metric configurations or hotspot metric configurations * Also added translations for the cases when there are no metric configurations of each type * Showing name and code on the table for hotspot metric configurations * When adding a hotspot metric configuration, the weight will be Signed off by: Diego Araújo <diegoamc90@gmail.com>
Showing
17 changed files
with
97 additions
and
56 deletions
Show diff stats
app/views/kalibro_configurations/_metric_configurations.html.erb
| 1 | <tr> | 1 | <tr> |
| 2 | <td><%= metric_configuration.metric.name %></td> | 2 | <td><%= metric_configuration.metric.name %></td> |
| 3 | + <td><%= metric_configuration.metric.code %></td> | ||
| 3 | <% unless metric_configuration.metric.is_a? KalibroClient::Entities::Miscellaneous::HotspotMetric %> | 4 | <% unless metric_configuration.metric.is_a? KalibroClient::Entities::Miscellaneous::HotspotMetric %> |
| 4 | - <td><%= metric_configuration.metric.code %></td> | ||
| 5 | <td><%= metric_configuration.weight %></td> | 5 | <td><%= metric_configuration.weight %></td> |
| 6 | <% end %> | 6 | <% end %> |
| 7 | <td> | 7 | <td> |
app/views/kalibro_configurations/_no_metric_configurations.html.erb
| 1 | <tr> | 1 | <tr> |
| 2 | <% col_number = kalibro_configuration_owner?(@kalibro_configuration.id) ? 5 : 3 %> | 2 | <% col_number = kalibro_configuration_owner?(@kalibro_configuration.id) ? 5 : 3 %> |
| 3 | - <td colspan="<%= col_number %>"><%= t('no_metric_configurations') %></td> | ||
| 4 | -</tr> | ||
| 5 | \ No newline at end of file | 3 | \ No newline at end of file |
| 4 | + <td colspan="<%= col_number %>"> | ||
| 5 | + <%= t(message) %> | ||
| 6 | + </td> | ||
| 7 | +</tr> |
app/views/kalibro_configurations/show.html.erb
| @@ -25,7 +25,7 @@ | @@ -25,7 +25,7 @@ | ||
| 25 | </thead> | 25 | </thead> |
| 26 | <tbody> | 26 | <tbody> |
| 27 | <% if Rails.cache.read("#{@kalibro_configuration.id}_tree_metric_configurations").empty? %> | 27 | <% if Rails.cache.read("#{@kalibro_configuration.id}_tree_metric_configurations").empty? %> |
| 28 | - <%= render partial: 'no_metric_configurations' %> | 28 | + <%= render partial: 'no_metric_configurations', locals: { message: 'no_tree_metric_configurations' } %> |
| 29 | <% else %> | 29 | <% else %> |
| 30 | <%= render partial: 'metric_configurations', collection: Rails.cache.read("#{@kalibro_configuration.id}_tree_metric_configurations"), as: :metric_configuration %> | 30 | <%= render partial: 'metric_configurations', collection: Rails.cache.read("#{@kalibro_configuration.id}_tree_metric_configurations"), as: :metric_configuration %> |
| 31 | <% end %> | 31 | <% end %> |
| @@ -42,12 +42,13 @@ | @@ -42,12 +42,13 @@ | ||
| 42 | <thead> | 42 | <thead> |
| 43 | <tr> | 43 | <tr> |
| 44 | <th><%= t('metric') %></th> | 44 | <th><%= t('metric') %></th> |
| 45 | - <th colspan="1"></th> | 45 | + <th><%= t('code') %></th> |
| 46 | + <th colspan="2"></th> | ||
| 46 | </tr> | 47 | </tr> |
| 47 | </thead> | 48 | </thead> |
| 48 | <tbody> | 49 | <tbody> |
| 49 | <% if Rails.cache.read("#{@kalibro_configuration.id}_hotspot_metric_configurations").empty? %> | 50 | <% if Rails.cache.read("#{@kalibro_configuration.id}_hotspot_metric_configurations").empty? %> |
| 50 | - <%= render partial: 'no_metric_configurations' %> | 51 | + <%= render partial: 'no_metric_configurations', locals: { message: 'no_hotspot_metric_configurations' } %> |
| 51 | <% else %> | 52 | <% else %> |
| 52 | <%= render partial: 'metric_configurations', collection: Rails.cache.read("#{@kalibro_configuration.id}_hotspot_metric_configurations"), as: :metric_configuration %> | 53 | <%= render partial: 'metric_configurations', collection: Rails.cache.read("#{@kalibro_configuration.id}_hotspot_metric_configurations"), as: :metric_configuration %> |
| 53 | <% end %> | 54 | <% end %> |
config/locales/views/metric_configurations/en.yml
| @@ -23,7 +23,8 @@ en: | @@ -23,7 +23,8 @@ en: | ||
| 23 | metric_configurations_base_tool_name: "Base Tool Name:" | 23 | metric_configurations_base_tool_name: "Base Tool Name:" |
| 24 | metric_configurations_aggregation: "Aggregation Form" | 24 | metric_configurations_aggregation: "Aggregation Form" |
| 25 | metric_configurations_reading_group: "Reading Group Name" | 25 | metric_configurations_reading_group: "Reading Group Name" |
| 26 | - no_metric_configurations: "There are no Metric Configurations yet!" | 26 | + no_tree_metric_configurations: "There are no Tree Metric Configurations yet!" |
| 27 | + no_hotspot_metric_configurations: "There are no Hotspot Metric Configurations yet!" | ||
| 27 | destroy_metric_configuration: "Destroy Metric Configuration" | 28 | destroy_metric_configuration: "Destroy Metric Configuration" |
| 28 | want_destroy_metric_configuration: "Are you sure that you want to destroy this Metric Configuration?" | 29 | want_destroy_metric_configuration: "Are you sure that you want to destroy this Metric Configuration?" |
| 29 | metric_base_tool_name: "Base Tool Name" | 30 | metric_base_tool_name: "Base Tool Name" |
config/locales/views/metric_configurations/pt.yml
| @@ -27,7 +27,8 @@ pt: | @@ -27,7 +27,8 @@ pt: | ||
| 27 | metric_configurations_base_tool_name: "Nome da ferramenta base:" | 27 | metric_configurations_base_tool_name: "Nome da ferramenta base:" |
| 28 | metric_configurations_aggregation: "Forma de Agregação" | 28 | metric_configurations_aggregation: "Forma de Agregação" |
| 29 | metric_configurations_reading_group: "Nome do grupo" | 29 | metric_configurations_reading_group: "Nome do grupo" |
| 30 | - no_metric_configurations: "Não há configurações de métricas ainda!" | 30 | + no_tree_metric_configurations: "Não há configurações de métricas escalares ainda!" |
| 31 | + no_hotspot_metric_configurations: "Não há configurações de métricas de Hotspot ainda!" | ||
| 31 | destroy_metric_configuration: "Destruir Configuração de Métrica" | 32 | destroy_metric_configuration: "Destruir Configuração de Métrica" |
| 32 | want_destroy_metric_configuration: "Tem certeza que você quer destruir esta Configuração de Métrica?" | 33 | want_destroy_metric_configuration: "Tem certeza que você quer destruir esta Configuração de Métrica?" |
| 33 | metric_base_tool_name: "Coletor" | 34 | metric_base_tool_name: "Coletor" |
features/compound_metric_configuration/create.feature
| @@ -9,7 +9,7 @@ Feature: Compound Metric Configuration Creation | @@ -9,7 +9,7 @@ Feature: Compound Metric Configuration Creation | ||
| 9 | And I am signed in | 9 | And I am signed in |
| 10 | And I own a sample configuration | 10 | And I own a sample configuration |
| 11 | And I have a reading group named "Scholar" | 11 | And I have a reading group named "Scholar" |
| 12 | - And I have a sample metric configuration within the given mezuro configuration | 12 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 13 | And I am at the Sample Configuration page | 13 | And I am at the Sample Configuration page |
| 14 | And I click the Add Metric link | 14 | And I click the Add Metric link |
| 15 | And I click the Compound Metric link | 15 | And I click the Compound Metric link |
features/compound_metric_configuration/edition.feature
| @@ -9,7 +9,7 @@ Feature: Compound Metric Configuration edition | @@ -9,7 +9,7 @@ Feature: Compound Metric Configuration edition | ||
| 9 | And I am signed in | 9 | And I am signed in |
| 10 | And I have a sample configuration | 10 | And I have a sample configuration |
| 11 | And I have a sample reading group | 11 | And I have a sample reading group |
| 12 | - And I have a sample metric configuration within the given mezuro configuration | 12 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 13 | And I have a sample compound metric configuration within the given mezuro configuration | 13 | And I have a sample compound metric configuration within the given mezuro configuration |
| 14 | When I am at the Sample Configuration page | 14 | When I am at the Sample Configuration page |
| 15 | Then I should not find "Edit" within "table#tree_metric_configurations" | 15 | Then I should not find "Edit" within "table#tree_metric_configurations" |
| @@ -20,7 +20,7 @@ Feature: Compound Metric Configuration edition | @@ -20,7 +20,7 @@ Feature: Compound Metric Configuration edition | ||
| 20 | And I am signed in | 20 | And I am signed in |
| 21 | And I own a sample configuration | 21 | And I own a sample configuration |
| 22 | And I have a sample reading group | 22 | And I have a sample reading group |
| 23 | - And I have a sample metric configuration within the given mezuro configuration | 23 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 24 | And I have a sample compound metric configuration within the given mezuro configuration | 24 | And I have a sample compound metric configuration within the given mezuro configuration |
| 25 | And I am at the Sample Configuration page | 25 | And I am at the Sample Configuration page |
| 26 | When I click the edit link of the Coumpound Metric | 26 | When I click the edit link of the Coumpound Metric |
| @@ -36,7 +36,7 @@ Feature: Compound Metric Configuration edition | @@ -36,7 +36,7 @@ Feature: Compound Metric Configuration edition | ||
| 36 | And I am signed in | 36 | And I am signed in |
| 37 | And I own a sample configuration | 37 | And I own a sample configuration |
| 38 | And I have a sample reading group | 38 | And I have a sample reading group |
| 39 | - And I have a sample metric configuration within the given mezuro configuration | 39 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 40 | And I have a sample compound metric configuration within the given mezuro configuration | 40 | And I have a sample compound metric configuration within the given mezuro configuration |
| 41 | When I visit the sample compound metric configuration edit page | 41 | When I visit the sample compound metric configuration edit page |
| 42 | And I fill the Name field with " " | 42 | And I fill the Name field with " " |
| @@ -57,7 +57,7 @@ Feature: Compound Metric Configuration edition | @@ -57,7 +57,7 @@ Feature: Compound Metric Configuration edition | ||
| 57 | And I am signed in | 57 | And I am signed in |
| 58 | And I own a sample configuration | 58 | And I own a sample configuration |
| 59 | And I have a sample reading group | 59 | And I have a sample reading group |
| 60 | - And I have a sample metric configuration within the given mezuro configuration | 60 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 61 | And I have a sample compound metric configuration within the given mezuro configuration | 61 | And I have a sample compound metric configuration within the given mezuro configuration |
| 62 | And I have another compound metric configuration with code "Another_Code" within the given mezuro configuration | 62 | And I have another compound metric configuration with code "Another_Code" within the given mezuro configuration |
| 63 | When I visit the sample compound metric configuration edit page | 63 | When I visit the sample compound metric configuration edit page |
| @@ -0,0 +1,24 @@ | @@ -0,0 +1,24 @@ | ||
| 1 | +Feature: Hotspot Configuration listing | ||
| 2 | + In order to interact with hotspot metric configurations | ||
| 3 | + As a regular user | ||
| 4 | + I should see the hotspot metric configurations of a given kalibro configuration | ||
| 5 | + | ||
| 6 | + @kalibro_configuration_restart @javascript @wip | ||
| 7 | + Scenario: When there are hotspot metric configurations and no tree metric configurations | ||
| 8 | + Given I have a sample configuration | ||
| 9 | + And I have a sample hotspot metric configuration within the given mezuro configuration | ||
| 10 | + When I am at the Sample Configuration page | ||
| 11 | + Then I should see the sample hotspot metric configuration content | ||
| 12 | + And I take a picture of the page | ||
| 13 | + And I should see "There are no Tree Metric Configurations yet!" | ||
| 14 | + | ||
| 15 | + | ||
| 16 | + @kalibro_configuration_restart @wip | ||
| 17 | + Scenario: When there are hotspot metric configurations and tree metric configurations | ||
| 18 | + Given I have a sample configuration | ||
| 19 | + And I have a sample hotspot metric configuration within the given mezuro configuration | ||
| 20 | + And I have a sample reading group | ||
| 21 | + And I have a sample tree metric configuration within the given mezuro configuration | ||
| 22 | + When I am at the Sample Configuration page | ||
| 23 | + Then I should see the sample hotspot metric configuration content | ||
| 24 | + And I should not see "There are no Tree Metric Configurations yet!" |
features/kalibro_range/create.feature
| @@ -9,7 +9,7 @@ Feature: Create Kalibro Range | @@ -9,7 +9,7 @@ Feature: Create Kalibro Range | ||
| 9 | And I am signed in | 9 | And I am signed in |
| 10 | And I own a sample configuration | 10 | And I own a sample configuration |
| 11 | And I own a sample reading group | 11 | And I own a sample reading group |
| 12 | - And I have a sample metric configuration within the given mezuro configuration | 12 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 13 | And I have a sample reading within the sample reading group labeled "My Reading" | 13 | And I have a sample reading within the sample reading group labeled "My Reading" |
| 14 | And I am at the sample metric configuration page | 14 | And I am at the sample metric configuration page |
| 15 | When I click the Add Range link | 15 | When I click the Add Range link |
| @@ -25,7 +25,7 @@ Feature: Create Kalibro Range | @@ -25,7 +25,7 @@ Feature: Create Kalibro Range | ||
| 25 | And I am signed in | 25 | And I am signed in |
| 26 | And I own a sample configuration | 26 | And I own a sample configuration |
| 27 | And I have a reading group named "Scholar" | 27 | And I have a reading group named "Scholar" |
| 28 | - And I have a sample metric configuration within the given mezuro configuration | 28 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 29 | And I am at the sample metric configuration page | 29 | And I am at the sample metric configuration page |
| 30 | When I click the Add Range link | 30 | When I click the Add Range link |
| 31 | Then I should be at the New Range page | 31 | Then I should be at the New Range page |
| @@ -41,7 +41,7 @@ Feature: Create Kalibro Range | @@ -41,7 +41,7 @@ Feature: Create Kalibro Range | ||
| 41 | And I am signed in | 41 | And I am signed in |
| 42 | And I own a sample configuration | 42 | And I own a sample configuration |
| 43 | And I own a sample reading group | 43 | And I own a sample reading group |
| 44 | - And I have a sample metric configuration within the given mezuro configuration | 44 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 45 | And I am at the sample metric configuration page | 45 | And I am at the sample metric configuration page |
| 46 | When I click the Add Range link | 46 | When I click the Add Range link |
| 47 | Then I should be at the New Range page | 47 | Then I should be at the New Range page |
| @@ -61,7 +61,7 @@ Feature: Create Kalibro Range | @@ -61,7 +61,7 @@ Feature: Create Kalibro Range | ||
| 61 | And I am signed in | 61 | And I am signed in |
| 62 | And I own a sample configuration | 62 | And I own a sample configuration |
| 63 | And I own a sample reading group | 63 | And I own a sample reading group |
| 64 | - And I have a sample metric configuration within the given mezuro configuration | 64 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 65 | And I have a sample reading within the sample reading group labeled "My Reading" | 65 | And I have a sample reading within the sample reading group labeled "My Reading" |
| 66 | And I am at the New Range page | 66 | And I am at the New Range page |
| 67 | And I fill the Beginning field with "42" | 67 | And I fill the Beginning field with "42" |
| @@ -77,7 +77,7 @@ Feature: Create Kalibro Range | @@ -77,7 +77,7 @@ Feature: Create Kalibro Range | ||
| 77 | And I am signed in | 77 | And I am signed in |
| 78 | And I own a sample configuration | 78 | And I own a sample configuration |
| 79 | And I own a sample reading group | 79 | And I own a sample reading group |
| 80 | - And I have a sample metric configuration within the given mezuro configuration | 80 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 81 | And I have a sample reading within the sample reading group labeled "My Reading" | 81 | And I have a sample reading within the sample reading group labeled "My Reading" |
| 82 | And I am at the New Range page | 82 | And I am at the New Range page |
| 83 | And I fill the Beginning field with "666" | 83 | And I fill the Beginning field with "666" |
| @@ -95,7 +95,7 @@ Feature: Create Kalibro Range | @@ -95,7 +95,7 @@ Feature: Create Kalibro Range | ||
| 95 | And I am signed in | 95 | And I am signed in |
| 96 | And I own a sample configuration | 96 | And I own a sample configuration |
| 97 | And I own a sample reading group | 97 | And I own a sample reading group |
| 98 | - And I have a sample metric configuration within the given mezuro configuration | 98 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 99 | And I have a sample reading within the sample reading group labeled "My Reading" | 99 | And I have a sample reading within the sample reading group labeled "My Reading" |
| 100 | And I am at the New Range page | 100 | And I am at the New Range page |
| 101 | And I fill the Beginning field with "z" | 101 | And I fill the Beginning field with "z" |
| @@ -113,7 +113,7 @@ Feature: Create Kalibro Range | @@ -113,7 +113,7 @@ Feature: Create Kalibro Range | ||
| 113 | And I am signed in | 113 | And I am signed in |
| 114 | And I own a sample configuration | 114 | And I own a sample configuration |
| 115 | And I own a sample reading group | 115 | And I own a sample reading group |
| 116 | - And I have a sample metric configuration within the given mezuro configuration | 116 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 117 | And I have a sample reading within the sample reading group labeled "My Reading" | 117 | And I have a sample reading within the sample reading group labeled "My Reading" |
| 118 | And I am at the New Range page | 118 | And I am at the New Range page |
| 119 | And I fill the Beginning field with "-1" | 119 | And I fill the Beginning field with "-1" |
| @@ -131,9 +131,9 @@ Feature: Create Kalibro Range | @@ -131,9 +131,9 @@ Feature: Create Kalibro Range | ||
| 131 | And I am signed in | 131 | And I am signed in |
| 132 | And I own a sample configuration | 132 | And I own a sample configuration |
| 133 | And I own a sample reading group | 133 | And I own a sample reading group |
| 134 | - And I have a sample metric configuration within the given mezuro configuration | 134 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 135 | And I have a sample reading within the sample reading group labeled "My Reading" | 135 | And I have a sample reading within the sample reading group labeled "My Reading" |
| 136 | - And I have a sample range within the sample metric configuration with beginning "2" | 136 | + And I have a sample range within the sample tree metric configuration with beginning "2" |
| 137 | And I am at the New Range page | 137 | And I am at the New Range page |
| 138 | And I fill the Beginning field with "2" | 138 | And I fill the Beginning field with "2" |
| 139 | And I fill the End field with "666" | 139 | And I fill the End field with "666" |
| @@ -151,7 +151,7 @@ Feature: Create Kalibro Range | @@ -151,7 +151,7 @@ Feature: Create Kalibro Range | ||
| 151 | And I am signed in | 151 | And I am signed in |
| 152 | And I own a sample configuration | 152 | And I own a sample configuration |
| 153 | And I own a sample reading group | 153 | And I own a sample reading group |
| 154 | - And I have a sample metric configuration within the given mezuro configuration | 154 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 155 | And I have a sample reading within the sample reading group labeled "My Reading" | 155 | And I have a sample reading within the sample reading group labeled "My Reading" |
| 156 | And I am at the New Range page | 156 | And I am at the New Range page |
| 157 | And I click the -∞ link | 157 | And I click the -∞ link |
| @@ -169,7 +169,7 @@ Feature: Create Kalibro Range | @@ -169,7 +169,7 @@ Feature: Create Kalibro Range | ||
| 169 | And I am signed in | 169 | And I am signed in |
| 170 | And I own a sample configuration | 170 | And I own a sample configuration |
| 171 | And I own a sample reading group | 171 | And I own a sample reading group |
| 172 | - And I have a sample metric configuration within the given mezuro configuration | 172 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 173 | And I have a sample reading within the sample reading group labeled "My Reading" | 173 | And I have a sample reading within the sample reading group labeled "My Reading" |
| 174 | And I am at the New Range page | 174 | And I am at the New Range page |
| 175 | And I fill the Beginning field with "2" | 175 | And I fill the Beginning field with "2" |
| @@ -193,7 +193,7 @@ Feature: Create Kalibro Range | @@ -193,7 +193,7 @@ Feature: Create Kalibro Range | ||
| 193 | And I am signed in | 193 | And I am signed in |
| 194 | And I own a sample configuration | 194 | And I own a sample configuration |
| 195 | And I own a sample reading group | 195 | And I own a sample reading group |
| 196 | - And I have a sample metric configuration within the given mezuro configuration | 196 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 197 | And I have a sample compound metric configuration within the given mezuro configuration | 197 | And I have a sample compound metric configuration within the given mezuro configuration |
| 198 | And I have a sample reading within the sample reading group labeled "My Reading" | 198 | And I have a sample reading within the sample reading group labeled "My Reading" |
| 199 | And I am at the New Range page for the compound metric configuration | 199 | And I am at the New Range page for the compound metric configuration |
features/kalibro_range/deletion.feature
| @@ -9,9 +9,9 @@ Feature: Kalibro Range Deletion | @@ -9,9 +9,9 @@ Feature: Kalibro Range Deletion | ||
| 9 | And I am signed in | 9 | And I am signed in |
| 10 | And I own a sample configuration | 10 | And I own a sample configuration |
| 11 | And I have a sample reading group | 11 | And I have a sample reading group |
| 12 | - And I have a sample metric configuration within the given mezuro configuration | 12 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 13 | And I have a sample reading within the sample reading group labeled "My Reading" | 13 | And I have a sample reading within the sample reading group labeled "My Reading" |
| 14 | - And I have a sample range within the sample metric configuration | 14 | + And I have a sample range within the sample tree metric configuration |
| 15 | And I am at the sample metric configuration page | 15 | And I am at the sample metric configuration page |
| 16 | When I click the Destroy link | 16 | When I click the Destroy link |
| 17 | Then I should be at metric configuration sample page | 17 | Then I should be at metric configuration sample page |
| @@ -37,8 +37,8 @@ Feature: Kalibro Range Deletion | @@ -37,8 +37,8 @@ Feature: Kalibro Range Deletion | ||
| 37 | And I am signed in | 37 | And I am signed in |
| 38 | And I have a sample configuration | 38 | And I have a sample configuration |
| 39 | And I have a sample reading group | 39 | And I have a sample reading group |
| 40 | - And I have a sample metric configuration within the given mezuro configuration | 40 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 41 | And I have a sample reading within the sample reading group labeled "My Reading" | 41 | And I have a sample reading within the sample reading group labeled "My Reading" |
| 42 | - And I have a sample range within the sample metric configuration | 42 | + And I have a sample range within the sample tree metric configuration |
| 43 | When I am at the sample metric configuration page | 43 | When I am at the sample metric configuration page |
| 44 | Then I should not see "Destroy" | 44 | Then I should not see "Destroy" |
features/kalibro_range/edit.feature
| @@ -9,9 +9,9 @@ Feature: Kalibro Range Edit | @@ -9,9 +9,9 @@ Feature: Kalibro Range Edit | ||
| 9 | And I am signed in | 9 | And I am signed in |
| 10 | And I own a sample configuration | 10 | And I own a sample configuration |
| 11 | And I own a sample reading group | 11 | And I own a sample reading group |
| 12 | - And I have a sample metric configuration within the given mezuro configuration | 12 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 13 | And I have a sample reading within the sample reading group labeled "My Reading" | 13 | And I have a sample reading within the sample reading group labeled "My Reading" |
| 14 | - And I have a sample range within the sample metric configuration with beginning "1.1" | 14 | + And I have a sample range within the sample tree metric configuration with beginning "1.1" |
| 15 | And I am at the Edit Kalibro Range page | 15 | And I am at the Edit Kalibro Range page |
| 16 | And the select field "Reading" is set as "My Reading" | 16 | And the select field "Reading" is set as "My Reading" |
| 17 | And the field "Beginning" should be filled with "1.1" | 17 | And the field "Beginning" should be filled with "1.1" |
| @@ -45,9 +45,9 @@ Feature: Kalibro Range Edit | @@ -45,9 +45,9 @@ Feature: Kalibro Range Edit | ||
| 45 | And I am signed in | 45 | And I am signed in |
| 46 | And I own a sample configuration | 46 | And I own a sample configuration |
| 47 | And I own a sample reading group | 47 | And I own a sample reading group |
| 48 | - And I have a sample metric configuration within the given mezuro configuration | 48 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 49 | And I have a sample reading within the sample reading group labeled "My Reading" | 49 | And I have a sample reading within the sample reading group labeled "My Reading" |
| 50 | - And I have a sample range within the sample metric configuration with beginning "1" | 50 | + And I have a sample range within the sample tree metric configuration with beginning "1" |
| 51 | And I am at the Edit Kalibro Range page | 51 | And I am at the Edit Kalibro Range page |
| 52 | When I fill the Beginning field with " " | 52 | When I fill the Beginning field with " " |
| 53 | And I press the Save button | 53 | And I press the Save button |
features/step_definitions/kalibro_range_steps.rb
| 1 | -Given(/^I have a sample range within the sample metric configuration with beginning "(.*?)"$/) do |beginning| | 1 | +Given(/^I have a sample range within the sample tree metric configuration with beginning "(.*?)"$/) do |beginning| |
| 2 | @kalibro_range = FactoryGirl.create(:kalibro_range, {beginning: beginning, metric_configuration_id: @metric_configuration.id, | 2 | @kalibro_range = FactoryGirl.create(:kalibro_range, {beginning: beginning, metric_configuration_id: @metric_configuration.id, |
| 3 | reading_id: @reading.id}) | 3 | reading_id: @reading.id}) |
| 4 | end | 4 | end |
| @@ -20,7 +20,7 @@ Given(/^the select field "(.*?)" is set as "(.*?)"$/) do |field, text| | @@ -20,7 +20,7 @@ Given(/^the select field "(.*?)" is set as "(.*?)"$/) do |field, text| | ||
| 20 | select text, from: field | 20 | select text, from: field |
| 21 | end | 21 | end |
| 22 | 22 | ||
| 23 | -Given(/^I have a sample range within the sample metric configuration$/) do | 23 | +Given(/^I have a sample range within the sample tree metric configuration$/) do |
| 24 | @kalibro_range = FactoryGirl.create(:kalibro_range, {metric_configuration_id: @metric_configuration.id, | 24 | @kalibro_range = FactoryGirl.create(:kalibro_range, {metric_configuration_id: @metric_configuration.id, |
| 25 | reading_id: @reading.id}) | 25 | reading_id: @reading.id}) |
| 26 | end | 26 | end |
features/step_definitions/metric_configuration_steps.rb
| 1 | -Given(/^I have a sample metric configuration within the given mezuro configuration$/) do | 1 | +Given(/^I have a sample tree metric configuration within the given mezuro configuration$/) do |
| 2 | @metric_configuration = FactoryGirl.create(:metric_configuration_with_id, | 2 | @metric_configuration = FactoryGirl.create(:metric_configuration_with_id, |
| 3 | {kalibro_configuration_id: @kalibro_configuration.id, reading_group_id: @reading_group.id} ) | 3 | {kalibro_configuration_id: @kalibro_configuration.id, reading_group_id: @reading_group.id} ) |
| 4 | end | 4 | end |
| 5 | 5 | ||
| 6 | +Given(/^I have a sample hotspot metric configuration within the given mezuro configuration$/) do | ||
| 7 | + @metric_configuration = FactoryGirl.create(:hotspot_metric_configuration, | ||
| 8 | + kalibro_configuration_id: @kalibro_configuration.id) | ||
| 9 | +end | ||
| 10 | + | ||
| 11 | + | ||
| 6 | Given(/^I have a metric configuration with code "(.*?)" within the given mezuro configuration$/) do |code| | 12 | Given(/^I have a metric configuration with code "(.*?)" within the given mezuro configuration$/) do |code| |
| 7 | @metric_configuration = FactoryGirl.create(:metric_configuration_with_id, | 13 | @metric_configuration = FactoryGirl.create(:metric_configuration_with_id, |
| 8 | {kalibro_configuration_id: @kalibro_configuration.id, reading_group_id: @reading_group.id, metric: FactoryGirl.build(:metric, code: code)}) | 14 | {kalibro_configuration_id: @kalibro_configuration.id, reading_group_id: @reading_group.id, metric: FactoryGirl.build(:metric, code: code)}) |
| @@ -51,12 +57,17 @@ Then(/^I am at the sample metric configuration page$/) do | @@ -51,12 +57,17 @@ Then(/^I am at the sample metric configuration page$/) do | ||
| 51 | expect(page).to have_content("Ranges") | 57 | expect(page).to have_content("Ranges") |
| 52 | end | 58 | end |
| 53 | 59 | ||
| 54 | -Then(/^I should see the sample metric configuration content$/) do | 60 | +Then(/^I should see the sample tree metric configuration content$/) do |
| 55 | expect(page).to have_content(@metric_configuration.metric.name) | 61 | expect(page).to have_content(@metric_configuration.metric.name) |
| 56 | expect(page).to have_content(@metric_configuration.metric.code) | 62 | expect(page).to have_content(@metric_configuration.metric.code) |
| 57 | expect(page).to have_content(@metric_configuration.weight) | 63 | expect(page).to have_content(@metric_configuration.weight) |
| 58 | end | 64 | end |
| 59 | 65 | ||
| 66 | +Then(/^I should see the sample hotspot metric configuration content$/) do | ||
| 67 | + expect(page).to have_content(@metric_configuration.metric.name) | ||
| 68 | + expect(page).to have_content(@metric_configuration.metric.code) | ||
| 69 | +end | ||
| 70 | + | ||
| 60 | Then(/^I should be at metric configuration sample page$/) do | 71 | Then(/^I should be at metric configuration sample page$/) do |
| 61 | expect(page).to have_content(@metric_configuration.metric.name) | 72 | expect(page).to have_content(@metric_configuration.metric.name) |
| 62 | expect(page).to have_content("Ranges") | 73 | expect(page).to have_content("Ranges") |
features/tree_metric_configuration/delete.feature
| @@ -9,10 +9,10 @@ Feature: Metric Configuration Deletion | @@ -9,10 +9,10 @@ Feature: Metric Configuration Deletion | ||
| 9 | And I am signed in | 9 | And I am signed in |
| 10 | And I own a sample configuration | 10 | And I own a sample configuration |
| 11 | And I have a sample reading group | 11 | And I have a sample reading group |
| 12 | - And I have a sample metric configuration within the given mezuro configuration | 12 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 13 | When I am at the Sample Configuration page | 13 | When I am at the Sample Configuration page |
| 14 | And I click destroy Metric Configuration | 14 | And I click destroy Metric Configuration |
| 15 | - Then I should see "There are no Metric Configurations yet!" | 15 | + Then I should see "There are no Tree Metric Configurations yet!" |
| 16 | 16 | ||
| 17 | @kalibro_configuration_restart | 17 | @kalibro_configuration_restart |
| 18 | Scenario: Should not see the destroy metric configuration link in the mezuro configuration that I not own | 18 | Scenario: Should not see the destroy metric configuration link in the mezuro configuration that I not own |
| @@ -20,6 +20,6 @@ Feature: Metric Configuration Deletion | @@ -20,6 +20,6 @@ Feature: Metric Configuration Deletion | ||
| 20 | And I am signed in | 20 | And I am signed in |
| 21 | And I have a sample configuration | 21 | And I have a sample configuration |
| 22 | And I have a sample reading group | 22 | And I have a sample reading group |
| 23 | - And I have a sample metric configuration within the given mezuro configuration | 23 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 24 | When I am at the Sample Configuration page | 24 | When I am at the Sample Configuration page |
| 25 | Then I should not see "Destroy" | 25 | Then I should not see "Destroy" |
features/tree_metric_configuration/edition.feature
| @@ -9,9 +9,9 @@ Feature: Metric Configuration edition | @@ -9,9 +9,9 @@ Feature: Metric Configuration edition | ||
| 9 | And I am signed in | 9 | And I am signed in |
| 10 | And I have a sample configuration | 10 | And I have a sample configuration |
| 11 | And I have a sample reading group | 11 | And I have a sample reading group |
| 12 | - And I have a sample metric configuration within the given mezuro configuration | 12 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 13 | When I am at the Sample Configuration page | 13 | When I am at the Sample Configuration page |
| 14 | - Then I should not see Edit within table | 14 | + Then I should not see Edit within table#tree_metric_configurations |
| 15 | 15 | ||
| 16 | @kalibro_configuration_restart | 16 | @kalibro_configuration_restart |
| 17 | Scenario: editing a metric configuration successfully | 17 | Scenario: editing a metric configuration successfully |
| @@ -19,7 +19,7 @@ Feature: Metric Configuration edition | @@ -19,7 +19,7 @@ Feature: Metric Configuration edition | ||
| 19 | And I am signed in | 19 | And I am signed in |
| 20 | And I own a sample configuration | 20 | And I own a sample configuration |
| 21 | And I have a sample reading group | 21 | And I have a sample reading group |
| 22 | - And I have a sample metric configuration within the given mezuro configuration | 22 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 23 | And I am at the Sample Configuration page | 23 | And I am at the Sample Configuration page |
| 24 | When I click the Edit link | 24 | When I click the Edit link |
| 25 | And I fill the Weight field with "3.0" | 25 | And I fill the Weight field with "3.0" |
| @@ -32,7 +32,7 @@ Feature: Metric Configuration edition | @@ -32,7 +32,7 @@ Feature: Metric Configuration edition | ||
| 32 | And I am signed in | 32 | And I am signed in |
| 33 | And I own a sample configuration | 33 | And I own a sample configuration |
| 34 | And I have a sample reading group | 34 | And I have a sample reading group |
| 35 | - And I have a sample metric configuration within the given mezuro configuration | 35 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 36 | When I visit the sample metric configuration edit page | 36 | When I visit the sample metric configuration edit page |
| 37 | And I fill the Weight field with " " | 37 | And I fill the Weight field with " " |
| 38 | And I press the Save button | 38 | And I press the Save button |
| @@ -44,7 +44,7 @@ Feature: Metric Configuration edition | @@ -44,7 +44,7 @@ Feature: Metric Configuration edition | ||
| 44 | And I am signed in | 44 | And I am signed in |
| 45 | And I own a sample configuration | 45 | And I own a sample configuration |
| 46 | And I have a sample reading group | 46 | And I have a sample reading group |
| 47 | - And I have a sample metric configuration within the given mezuro configuration | 47 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 48 | When I visit the sample metric configuration edit page | 48 | When I visit the sample metric configuration edit page |
| 49 | And I fill the Weight field with "0" | 49 | And I fill the Weight field with "0" |
| 50 | And I set the select field "Aggregation Form" as "Median" | 50 | And I set the select field "Aggregation Form" as "Median" |
features/tree_metric_configuration/listing.feature
| 1 | -Feature: Configuration listing | 1 | +Feature: Metric Configuration listing |
| 2 | In order to interact with metric configurations | 2 | In order to interact with metric configurations |
| 3 | As a regular user | 3 | As a regular user |
| 4 | I should see the metric configurations of a given configuration | 4 | I should see the metric configurations of a given configuration |
| 5 | 5 | ||
| 6 | @kalibro_configuration_restart | 6 | @kalibro_configuration_restart |
| 7 | - Scenario: When there are no metric configurations | 7 | + Scenario: When there are no tree metric configurations |
| 8 | Given I have a sample configuration | 8 | Given I have a sample configuration |
| 9 | When I am at the Sample Configuration page | 9 | When I am at the Sample Configuration page |
| 10 | Then I should see "Metric" | 10 | Then I should see "Metric" |
| 11 | And I should see "Code" | 11 | And I should see "Code" |
| 12 | And I should see "Weight" | 12 | And I should see "Weight" |
| 13 | - And I should see "There are no Metric Configurations yet!" | 13 | + And I should see "There are no Tree Metric Configurations yet!" |
| 14 | 14 | ||
| 15 | - @kalibro_configuration_restart | ||
| 16 | - Scenario: When there are metric configurations | 15 | + @kalibro_configuration_restart @wip |
| 16 | + Scenario: When there are tree metric configurations and no hotspot metric configurations | ||
| 17 | Given I have a sample configuration | 17 | Given I have a sample configuration |
| 18 | And I have a sample reading group | 18 | And I have a sample reading group |
| 19 | - And I have a sample metric configuration within the given mezuro configuration | 19 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 20 | When I am at the Sample Configuration page | 20 | When I am at the Sample Configuration page |
| 21 | - Then I should see the sample metric configuration content | 21 | + Then I should see the sample tree metric configuration content |
| 22 | + And I should see "There are no Hotspot Metric Configurations yet!" | ||
| 22 | 23 | ||
| 23 | @kalibro_configuration_restart | 24 | @kalibro_configuration_restart |
| 24 | Scenario: I should see the add metric link when I am the owner of the given configuration | 25 | Scenario: I should see the add metric link when I am the owner of the given configuration |
features/tree_metric_configuration/show.feature
| @@ -8,8 +8,8 @@ Feature: Show Metric Configuration | @@ -8,8 +8,8 @@ Feature: Show Metric Configuration | ||
| 8 | Given I have a sample configuration | 8 | Given I have a sample configuration |
| 9 | And I have a sample reading group | 9 | And I have a sample reading group |
| 10 | And I have a sample reading within the sample reading group labeled "My Reading" | 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 | 11 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 12 | + And I have a sample range within the sample tree metric configuration | ||
| 13 | When I am at the Sample Configuration page | 13 | When I am at the Sample Configuration page |
| 14 | And I click the Show link | 14 | And I click the Show link |
| 15 | Then I should be at metric configuration sample page | 15 | Then I should be at metric configuration sample page |
| @@ -20,8 +20,8 @@ Feature: Show Metric Configuration | @@ -20,8 +20,8 @@ Feature: Show Metric Configuration | ||
| 20 | Given I have a sample configuration | 20 | Given I have a sample configuration |
| 21 | And I have a sample reading group | 21 | And I have a sample reading group |
| 22 | And I have a sample reading within the sample reading group labeled "My Reading" | 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 | 23 | + And I have a sample tree metric configuration within the given mezuro configuration |
| 24 | + And I have a sample range within the sample tree metric configuration | ||
| 25 | And I am at the sample metric configuration page | 25 | And I am at the sample metric configuration page |
| 26 | When I click the "comment-icon" icon | 26 | When I click the "comment-icon" icon |
| 27 | Then I should see "Comment" | 27 | Then I should see "Comment" |