From c6b019cf254397450f99f21b7616dc5ba6383cb0 Mon Sep 17 00:00:00 2001 From: Heitor Reis Date: Thu, 22 Oct 2015 13:38:08 -0200 Subject: [PATCH] Rename metric conf. features to tree metric conf. --- features/metric_configuration/create.feature | 91 ------------------------------------------------------------------------------------------- features/metric_configuration/delete.feature | 25 ------------------------- features/metric_configuration/edition.feature | 52 ---------------------------------------------------- features/metric_configuration/listing.feature | 37 ------------------------------------- features/metric_configuration/show.feature | 28 ---------------------------- features/tree_metric_configuration/create.feature | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ features/tree_metric_configuration/delete.feature | 25 +++++++++++++++++++++++++ features/tree_metric_configuration/edition.feature | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ features/tree_metric_configuration/listing.feature | 37 +++++++++++++++++++++++++++++++++++++ features/tree_metric_configuration/show.feature | 28 ++++++++++++++++++++++++++++ 10 files changed, 233 insertions(+), 233 deletions(-) delete mode 100644 features/metric_configuration/create.feature delete mode 100644 features/metric_configuration/delete.feature delete mode 100644 features/metric_configuration/edition.feature delete mode 100644 features/metric_configuration/listing.feature delete mode 100644 features/metric_configuration/show.feature create mode 100644 features/tree_metric_configuration/create.feature create mode 100644 features/tree_metric_configuration/delete.feature create mode 100644 features/tree_metric_configuration/edition.feature create mode 100644 features/tree_metric_configuration/listing.feature create mode 100644 features/tree_metric_configuration/show.feature diff --git a/features/metric_configuration/create.feature b/features/metric_configuration/create.feature deleted file mode 100644 index cfd76de..0000000 --- a/features/metric_configuration/create.feature +++ /dev/null @@ -1,91 +0,0 @@ -Feature: Metric Configuration Creation - In order to register my metric configurations - As a regular user - I should be able to create metric configurations - - @kalibro_configuration_restart - Scenario: Should not create metric configurations without login - Given I have a sample configuration - And I am at the Sample Configuration page - Then I should not see "New Metric Configuration" - - @kalibro_configuration_restart @javascript - Scenario: metric configuration creation - 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 am at the Sample Configuration page - And I click the Add Metric link - And I click the "Analizo" h3 - And I click the Total Lines of Code link - And I fill the Weight field with "2" - And I set the select field "Aggregation Form" as "Average" - And I set the select field "Reading Group" as "Scholar" - When I press the Save button - Then I should see "Total Lines of Code" - Then I should see "2" - - @kalibro_configuration_restart @javascript - Scenario: ruby metric configuration creation - 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 am at the Sample Configuration page - And I click the Add Metric link - And I click the "MetricFu" h3 - And I click the Pain link - And I fill the Weight field with "2" - And I set the select field "Aggregation Form" as "Average" - And I set the select field "Reading Group" as "Scholar" - When I press the Save button - Then I should see "Pain" - Then I should see "2" - - @kalibro_configuration_restart @javascript - Scenario: metric configuration creation - 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 am at the Sample Configuration page - And I click the Add Metric link - And I click the "Analizo" h3 - And I click the Total Lines of Code link - When I click the Back link - Then I should be at the choose metric page - - @kalibro_configuration_restart @javascript - Scenario: compound metric configuration creation with same code - 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 metric configuration with code "total_abstract_classes" within the given mezuro configuration - And I am at the Sample Configuration page - And I click the Add Metric link - And I click the "Analizo" h3 - And I click the Total Abstract Classes link - And I fill the Weight field with "2" - And I set the select field "Aggregation Form" as "Average" - And I set the select field "Reading Group" as "Scholar" - When I press the Save button - Then I should see "Code must be unique within a kalibro configuration" - - @kalibro_configuration_restart @javascript - Scenario: metric configuration creation with count aggregation form - 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 am at the Sample Configuration page - And I click the Add Metric link - And I click the "Analizo" h3 - And I click the Lines of Code link - And I fill the Weight field with "100" - And I set the select field "Aggregation Form" as "Count" - And I set the select field "Reading Group" as "Scholar" - When I press the Save button - Then I should see "Lines of Code" - Then I should see "100" diff --git a/features/metric_configuration/delete.feature b/features/metric_configuration/delete.feature deleted file mode 100644 index 039e98a..0000000 --- a/features/metric_configuration/delete.feature +++ /dev/null @@ -1,25 +0,0 @@ -Feature: Metric Configuration Deletion - In order to be able to remove metric configuration - As a regular user - The system should have an interface to it - - @kalibro_configuration_restart - Scenario: Should delete a metric configuration that I own - 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 - When I am at the Sample Configuration page - And I click destroy Metric Configuration - Then I should see "There are no Metric Configurations yet!" - - @kalibro_configuration_restart - Scenario: Should not see the destroy metric configuration link in the mezuro configuration that I not own - 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 - When I am at the Sample Configuration page - Then I should not see "Destroy" diff --git a/features/metric_configuration/edition.feature b/features/metric_configuration/edition.feature deleted file mode 100644 index 243f2b4..0000000 --- a/features/metric_configuration/edition.feature +++ /dev/null @@ -1,52 +0,0 @@ -Feature: Metric Configuration edition - In order to interact with metric configurations - As a regular user - I should edit the informations of 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 - When I am at the Sample Configuration page - Then I should not find "Edit" within "table#tree_metric_configurations" - - @kalibro_configuration_restart - Scenario: editing a 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 am at the Sample Configuration page - When I click the Edit link - And I fill the Weight field with "3.0" - And I press the Save button - Then I should see "3.0" - - @kalibro_configuration_restart - 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 - When I visit the sample metric configuration edit page - And I fill the Weight field with " " - And I press the Save button - Then I should see "Weight must be greater than 0" - - @kalibro_configuration_restart - Scenario: Should not edit a metric configuration with invalid weight - 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 - When I visit the sample metric configuration edit page - And I fill the Weight field with "0" - And I set the select field "Aggregation Form" as "Median" - When I press the Save button - Then I should see "Weight must be greater than 0" diff --git a/features/metric_configuration/listing.feature b/features/metric_configuration/listing.feature deleted file mode 100644 index 53d43db..0000000 --- a/features/metric_configuration/listing.feature +++ /dev/null @@ -1,37 +0,0 @@ -Feature: Configuration listing - In order to interact with metric configurations - As a regular user - I should see the metric configurations of a given configuration - - @kalibro_configuration_restart - Scenario: When there are no metric configurations - Given I have a sample configuration - When I am at the Sample Configuration page - Then I should see "Metric" - And I should see "Code" - And I should see "Weight" - And I should see "There are no Metric Configurations yet!" - - @kalibro_configuration_restart - Scenario: When there are metric configurations - Given I have a sample configuration - And I have a sample reading group - And I have a sample metric configuration within the given mezuro configuration - When I am at the Sample Configuration page - Then I should see the sample metric configuration content - - @kalibro_configuration_restart - Scenario: I should see the add metric link when I am the owner of the given configuration - Given I am a regular user - And I am signed in - And I own a sample configuration - When I am at the Sample Configuration page - Then I should see "Add Metric" - - @kalibro_configuration_restart - Scenario: I should not see the add metric link when I am at a given configuration page - Given I am a regular user - And I am signed in - And I have a sample configuration - When I am at the Sample Configuration page - Then I should not see "Add Metric" diff --git a/features/metric_configuration/show.feature b/features/metric_configuration/show.feature deleted file mode 100644 index 40efda1..0000000 --- a/features/metric_configuration/show.feature +++ /dev/null @@ -1,28 +0,0 @@ -Feature: Show Metric Configuration - In order to know all the metric configurations of the given configuration and its contents - As a regular user - I should be able to see each of them - - @kalibro_configuration_restart - Scenario: Checking metric configuration show link - Given I have a sample configuration - And I have a sample reading group - And I have a sample reading within the sample reading group labeled "My Reading" - And I have a sample metric configuration within the given mezuro configuration - And I have a sample range within the sample metric configuration - When I am at the Sample Configuration page - And I click the Show link - Then I should be at metric configuration sample page - And I should see the sample range - - @kalibro_configuration_restart @javascript - Scenario: When there's a range created and I want to see its comments - Given I have a sample configuration - And I have a sample reading group - And I have a sample reading within the sample reading group labeled "My Reading" - And I have a sample metric configuration within the given mezuro configuration - And I have a sample range within the sample metric configuration - And I am at the sample metric configuration page - When I click the "comment-icon" icon - Then I should see "Comment" - diff --git a/features/tree_metric_configuration/create.feature b/features/tree_metric_configuration/create.feature new file mode 100644 index 0000000..63154fc --- /dev/null +++ b/features/tree_metric_configuration/create.feature @@ -0,0 +1,91 @@ +Feature: Tree Metric Configuration Creation + In order to register my metric configurations + As a regular user + I should be able to create metric configurations + + @kalibro_configuration_restart + Scenario: Should not create metric configurations without login + Given I have a sample configuration + And I am at the Sample Configuration page + Then I should not see "New Metric Configuration" + + @kalibro_configuration_restart @javascript + Scenario: metric configuration creation + 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 am at the Sample Configuration page + And I click the Add Metric link + And I click the "Analizo" h3 + And I click the Total Lines of Code link + And I fill the Weight field with "2" + And I set the select field "Aggregation Form" as "Average" + And I set the select field "Reading Group" as "Scholar" + When I press the Save button + Then I should see "Total Lines of Code" + Then I should see "2" + + @kalibro_configuration_restart @javascript + Scenario: ruby metric configuration creation + 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 am at the Sample Configuration page + And I click the Add Metric link + And I click the "MetricFu" h3 + And I click the Pain link + And I fill the Weight field with "2" + And I set the select field "Aggregation Form" as "Average" + And I set the select field "Reading Group" as "Scholar" + When I press the Save button + Then I should see "Pain" + Then I should see "2" + + @kalibro_configuration_restart @javascript + Scenario: metric configuration creation + 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 am at the Sample Configuration page + And I click the Add Metric link + And I click the "Analizo" h3 + And I click the Total Lines of Code link + When I click the Back link + Then I should be at the choose metric page + + @kalibro_configuration_restart @javascript + Scenario: compound metric configuration creation with same code + 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 metric configuration with code "total_abstract_classes" within the given mezuro configuration + And I am at the Sample Configuration page + And I click the Add Metric link + And I click the "Analizo" h3 + And I click the Total Abstract Classes link + And I fill the Weight field with "2" + And I set the select field "Aggregation Form" as "Average" + And I set the select field "Reading Group" as "Scholar" + When I press the Save button + Then I should see "Code must be unique within a kalibro configuration" + + @kalibro_configuration_restart @javascript + Scenario: metric configuration creation with count aggregation form + 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 am at the Sample Configuration page + And I click the Add Metric link + And I click the "Analizo" h3 + And I click the Lines of Code link + And I fill the Weight field with "100" + And I set the select field "Aggregation Form" as "Count" + And I set the select field "Reading Group" as "Scholar" + When I press the Save button + Then I should see "Lines of Code" + Then I should see "100" diff --git a/features/tree_metric_configuration/delete.feature b/features/tree_metric_configuration/delete.feature new file mode 100644 index 0000000..039e98a --- /dev/null +++ b/features/tree_metric_configuration/delete.feature @@ -0,0 +1,25 @@ +Feature: Metric Configuration Deletion + In order to be able to remove metric configuration + As a regular user + The system should have an interface to it + + @kalibro_configuration_restart + Scenario: Should delete a metric configuration that I own + 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 + When I am at the Sample Configuration page + And I click destroy Metric Configuration + Then I should see "There are no Metric Configurations yet!" + + @kalibro_configuration_restart + Scenario: Should not see the destroy metric configuration link in the mezuro configuration that I not own + 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 + When I am at the Sample Configuration page + Then I should not see "Destroy" diff --git a/features/tree_metric_configuration/edition.feature b/features/tree_metric_configuration/edition.feature new file mode 100644 index 0000000..17eb9ad --- /dev/null +++ b/features/tree_metric_configuration/edition.feature @@ -0,0 +1,52 @@ +Feature: Metric Configuration edition + In order to interact with metric configurations + As a regular user + I should edit the informations of 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 + When I am at the Sample Configuration page + Then I should not see Edit within table + + @kalibro_configuration_restart + Scenario: editing a 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 am at the Sample Configuration page + When I click the Edit link + And I fill the Weight field with "3.0" + And I press the Save button + Then I should see "3.0" + + @kalibro_configuration_restart + 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 + When I visit the sample metric configuration edit page + And I fill the Weight field with " " + And I press the Save button + Then I should see "Weight must be greater than 0" + + @kalibro_configuration_restart + Scenario: Should not edit a metric configuration with invalid weight + 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 + When I visit the sample metric configuration edit page + And I fill the Weight field with "0" + And I set the select field "Aggregation Form" as "Median" + When I press the Save button + Then I should see "Weight must be greater than 0" diff --git a/features/tree_metric_configuration/listing.feature b/features/tree_metric_configuration/listing.feature new file mode 100644 index 0000000..53d43db --- /dev/null +++ b/features/tree_metric_configuration/listing.feature @@ -0,0 +1,37 @@ +Feature: Configuration listing + In order to interact with metric configurations + As a regular user + I should see the metric configurations of a given configuration + + @kalibro_configuration_restart + Scenario: When there are no metric configurations + Given I have a sample configuration + When I am at the Sample Configuration page + Then I should see "Metric" + And I should see "Code" + And I should see "Weight" + And I should see "There are no Metric Configurations yet!" + + @kalibro_configuration_restart + Scenario: When there are metric configurations + Given I have a sample configuration + And I have a sample reading group + And I have a sample metric configuration within the given mezuro configuration + When I am at the Sample Configuration page + Then I should see the sample metric configuration content + + @kalibro_configuration_restart + Scenario: I should see the add metric link when I am the owner of the given configuration + Given I am a regular user + And I am signed in + And I own a sample configuration + When I am at the Sample Configuration page + Then I should see "Add Metric" + + @kalibro_configuration_restart + Scenario: I should not see the add metric link when I am at a given configuration page + Given I am a regular user + And I am signed in + And I have a sample configuration + When I am at the Sample Configuration page + Then I should not see "Add Metric" diff --git a/features/tree_metric_configuration/show.feature b/features/tree_metric_configuration/show.feature new file mode 100644 index 0000000..40efda1 --- /dev/null +++ b/features/tree_metric_configuration/show.feature @@ -0,0 +1,28 @@ +Feature: Show Metric Configuration + In order to know all the metric configurations of the given configuration and its contents + As a regular user + I should be able to see each of them + + @kalibro_configuration_restart + Scenario: Checking metric configuration show link + Given I have a sample configuration + And I have a sample reading group + And I have a sample reading within the sample reading group labeled "My Reading" + And I have a sample metric configuration within the given mezuro configuration + And I have a sample range within the sample metric configuration + When I am at the Sample Configuration page + And I click the Show link + Then I should be at metric configuration sample page + And I should see the sample range + + @kalibro_configuration_restart @javascript + Scenario: When there's a range created and I want to see its comments + Given I have a sample configuration + And I have a sample reading group + And I have a sample reading within the sample reading group labeled "My Reading" + And I have a sample metric configuration within the given mezuro configuration + And I have a sample range within the sample metric configuration + And I am at the sample metric configuration page + When I click the "comment-icon" icon + Then I should see "Comment" + -- libgit2 0.21.2