Skip to content

Commit

Permalink
Closes issue #24. Joining some scenarios test
Browse files Browse the repository at this point in the history
  • Loading branch information
LarissaRodrigues authored and rafamanzo committed Aug 14, 2015
1 parent 0c83e98 commit 45ea43b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 50 deletions.
13 changes: 4 additions & 9 deletions features/compound_metric_configuration/edition.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Then I should see "Code must be unique within a kalibro configuration"


7 changes: 1 addition & 6 deletions features/project/edition.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
29 changes: 9 additions & 20 deletions features/reading/edit.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"

7 changes: 1 addition & 6 deletions features/reading/new.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
14 changes: 5 additions & 9 deletions features/reading_group/edit.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"

0 comments on commit 45ea43b

Please sign in to comment.