From 45ea43ba6265258d1c2a15b81e67b18a51c39c10 Mon Sep 17 00:00:00 2001 From: larissa Date: Wed, 10 Dec 2014 12:13:17 -0200 Subject: [PATCH] Closes issue #24. Joining some scenarios test --- .../edition.feature | 13 +++------ features/project/edition.feature | 7 +---- features/reading/edit.feature | 29 ++++++------------- features/reading/new.feature | 7 +---- features/reading_group/edit.feature | 14 ++++----- 5 files changed, 20 insertions(+), 50 deletions(-) diff --git a/features/compound_metric_configuration/edition.feature b/features/compound_metric_configuration/edition.feature index f422baa2..746c1351 100644 --- a/features/compound_metric_configuration/edition.feature +++ b/features/compound_metric_configuration/edition.feature @@ -31,7 +31,7 @@ Scenario: editing a compound metric configuration successfully And I should see "Compound Metric Configuration was successfully updated." @kalibro_configuration_restart @javascript -Scenario: trying to edit with blank fields +Scenario: trying to edit with blank fields and to edit with an existing code 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 @@ -47,15 +47,10 @@ Scenario: trying to edit with blank fields 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 - 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" \ No newline at end of file + Then I should see "Code must be unique within a kalibro configuration" + + diff --git a/features/project/edition.feature b/features/project/edition.feature index d897bd93..c9743d5b 100644 --- a/features/project/edition.feature +++ b/features/project/edition.feature @@ -29,18 +29,13 @@ Feature: Project Then I should see "You're not allowed to do this operation" @kalibro_processor_restart - Scenario: Filling up the form + Scenario: Filling up the form and with valid attributes And I own a sample project And I have sample project_attributes And I am at the All Projects page When I click the Edit link Then The field "project[name]" should be filled with the sample project "name" And The field "project[description]" should be filled with the sample project "description" - - @kalibro_processor_restart - Scenario: With valid attributes - And I own a sample project - And I have sample project_attributes And I am at the sample project edit page And I fill the Name field with "Kalibro" And I fill the Description field with "Web Service to collect metrics" diff --git a/features/reading/edit.feature b/features/reading/edit.feature index ba726129..89f46120 100644 --- a/features/reading/edit.feature +++ b/features/reading/edit.feature @@ -20,20 +20,7 @@ Feature: Reading Edit Then I should see "Bad" @kalibro_configuration_restart - Scenario: editing a reading with blank fields and editing a reading with already taken name - And I own a sample reading group - And I have a sample reading within the sample reading group - And I am at the Edit Reading page - When I fill the Label field with " " - And I fill the Grade field with " " - And I fill the Color field with " " - And I press the Save button - Then I should see "Label can't be blank" - And I should see "Grade can't be blank" - And I should see "Color can't be blank" - - @kalibro_configuration_restart - Scenario: editing a reading with a name already taken + Scenario: editing a reading with already taken name, editing a reading with non numerical value, editing a reading with blank fields and editing a reading with already taken name And I own a sample reading group And I have a sample reading within the sample reading group labeled "Average" And I have a sample reading within the sample reading group labeled "Good" @@ -42,14 +29,16 @@ Feature: Reading Edit When I fill the Label field with "Average" And I press the Save button Then I should see "Label Should be unique within a Reading Group" - - @kalibro_configuration_restart - Scenario: editing a reading with non numerical value - And I own a sample reading group - And I have a sample reading within the sample reading group - And I am at the Edit Reading page When I fill the Label field with "macaco" And I fill the Grade field with "z" And I fill the Color field with "FFFFFF" And I press the Save button Then I should see "Grade is not a number" + When I fill the Label field with " " + And I fill the Grade field with " " + And I fill the Color field with " " + And I press the Save button + Then I should see "Label can't be blank" + And I should see "Grade can't be blank" + And I should see "Color can't be blank" + diff --git a/features/reading/new.feature b/features/reading/new.feature index c39f9928..ed4e628f 100644 --- a/features/reading/new.feature +++ b/features/reading/new.feature @@ -59,7 +59,7 @@ Feature: New reading And I should be at the New Reading page @kalibro_configuration_restart - Scenario: With an invalid grade + Scenario: With an invalid grade and invalid color And I own a sample reading group And I am at the New Reading page And I fill the Label field with "My Reading" @@ -68,11 +68,6 @@ Feature: New reading When I press the Save button Then I should see "Grade is not a number" And I should be at the New Reading page - - @kalibro_configuration_restart @javascript - Scenario: With an invalid color - And I own a sample reading group - And I am at the New Reading page And I fill the Label field with "My Reading" And I fill the Grade field with "1" And I fill the Color field with "z" diff --git a/features/reading_group/edit.feature b/features/reading_group/edit.feature index 48130282..ca25be5e 100644 --- a/features/reading_group/edit.feature +++ b/features/reading_group/edit.feature @@ -46,13 +46,17 @@ Feature: Reading Group And I should see "New Reading Group" @kalibro_configuration_restart - Scenario: With reading group name already taken + Scenario: With reading group name already taken and with blank reading group name And I have a reading group named "A Reading" And I own a reading group named "My reading" And I am at the sample reading group edit page And I fill the Name field with "A Reading" When I press the Save button Then I should see "Name has already been taken" + And I am at the sample reading group edit page + And I fill the Name field with " " + When I press the Save button + Then I should see "Name can't be blank" @kalibro_configuration_restart Scenario: Editing just the description @@ -61,11 +65,3 @@ Feature: Reading Group And I fill the Description field with "New Reading Group" When I press the Save button Then I should see "New Reading Group" - - @kalibro_configuration_restart - Scenario: With blank reading group name - And I own a sample reading group - And I am at the sample reading group edit page - And I fill the Name field with " " - When I press the Save button - Then I should see "Name can't be blank"