Skip to content

Commit

Permalink
Closes issue mezuro#24. Joining some scenarios test
Browse files Browse the repository at this point in the history
  • Loading branch information
LarissaRodrigues committed Dec 10, 2014
1 parent 8862390 commit ba1e2b8
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 49 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_restart
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 can't be blank"

@kalibro_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 There is already a MetricConfiguration with code Another_Code! Please, choose another one."
Then I should see "Code There is already a MetricConfiguration with code Another_Code! Please, choose another one."


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 a sample project_image
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 a sample project_image
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,35 +20,24 @@ Feature: Reading Edit
Then I should see "Bad"

@kalibro_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_restart
Scenario: editing a reading with already taken name
Scenario: editing a reading with already taken name, editing a reading with non numerical value and 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"
And I am at the Edit Reading page
When I fill the Label field with "Average"
And I press the Save button
Then I should see "Label There is already a Reading with label Average! Please, choose another one."

@kalibro_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"

9 changes: 3 additions & 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_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,14 +68,11 @@ 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_restart
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"
When I press the Save button
Then I should see "1 error prohibited this Reading from being saved"
And I should be at the New Reading page


14 changes: 6 additions & 8 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_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 There is already a ReadingGroup with name A Reading!"
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_restart
Scenario: Editing just the description
Expand All @@ -62,10 +66,4 @@ Feature: Reading Group
When I press the Save button
Then I should see "New Reading Group"

@kalibro_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 ba1e2b8

Please sign in to comment.