From 76ef9750a5a6f4c4e1f05b5f19517de3d1613db2 Mon Sep 17 00:00:00 2001 From: Daniel Alves Date: Mon, 1 Sep 2014 17:18:08 -0300 Subject: [PATCH] Fixing acceptance tests. --- app/views/projects/show.html.erb | 2 +- features/mezuro_range/create.feature | 14 +++++++------- features/mezuro_range/deletion.feature | 2 +- features/project/show.feature | 4 ++-- features/reading/delete.feature | 2 +- features/reading/edit.feature | 10 +++++----- features/reading/new.feature | 9 ++++----- features/reading_group/create.feature | 2 +- features/reading_group/edit.feature | 16 ++++++++-------- features/reading_group/show.feature | 6 +++--- features/repository/create.feature | 2 +- features/repository/delete.feature | 2 +- features/repository/edit.feature | 2 +- 13 files changed, 36 insertions(+), 37 deletions(-) diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 4845ecf..6e5834d 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -27,7 +27,7 @@ <% if @project_repositories.size == 0 %> <% col_number = project_owner?(@project.id) ? 4 : 3 %> - There are no repositories yet! + There are no Repositories yet! <% end %> <% @project_repositories.each do |repository| %> diff --git a/features/mezuro_range/create.feature b/features/mezuro_range/create.feature index 24361a6..28914b6 100644 --- a/features/mezuro_range/create.feature +++ b/features/mezuro_range/create.feature @@ -32,8 +32,8 @@ Feature: Create range And I should see "Beginning" And I should see "End" And I should see "Comments" - And I should see "You must have readings in your associated reading group to create a new range." - And I should see "Your metric configurations' reading group belongs to another user and you are not allowed to modify it." + And I should see "You must have Readings within your associated Reading Group to create a new Range." + And I should see "The Reading Group of your Metric Configuration belongs to another user and you are not allowed to modify it." @kalibro_restart Scenario: Visiting range creation page when the user own an empty reading group (testing link to New Reading) @@ -48,7 +48,7 @@ Feature: Create range And I should see "Beginning" And I should see "End" And I should see "Comments" - And I should see "You must have readings in your associated reading group to create a new range." + And I should see "You must have Readings within your associated Reading Group to create a new Range." When I click the Create New Reading link Then I should be at the New Reading page And I should see "Label" @@ -86,7 +86,7 @@ Feature: Create range And I set the select field "Reading" as "My Reading" When I press the Save button Then I should be at the New Range page - And I should see "1 error prohibited this MezuroRange from getting saved" + And I should see "1 error prohibited this MezuroRange from being saved" And I should see "[666.0, 42.0[ is not a valid range" @kalibro_restart @@ -104,7 +104,7 @@ Feature: Create range And I set the select field "Reading" as "My Reading" When I press the Save button Then I should be at the New Range page - And I should see "1 error prohibited this MezuroRange from getting saved" + And I should see "1 error prohibited this MezuroRange from being saved" And I should see "Beginning is not a number" @kalibro_restart @@ -121,7 +121,7 @@ Feature: Create range And I fill the Comments field with "My Comment" And I set the select field "Reading" as "My Reading" When I press the Save button - Then I should see "1 error prohibited this MezuroRange from getting saved" + Then I should see "1 error prohibited this MezuroRange from being saved" And I should be at the New Range page @kalibro_restart @@ -140,7 +140,7 @@ Feature: Create range And I set the select field "Reading" as "My Reading" When I press the Save button Then I should be at the New Range page - And I should see "Beginning There's already a MezuroRange with beginning 2.0! Please, choose another one." + And I should see "Beginning There is already a MezuroRange with beginning 2.0! Please, choose another one." @kalibro_restart @javascript Scenario: Should create range with [-INF, INF] threshold diff --git a/features/mezuro_range/deletion.feature b/features/mezuro_range/deletion.feature index f28d4f0..b60360c 100644 --- a/features/mezuro_range/deletion.feature +++ b/features/mezuro_range/deletion.feature @@ -15,7 +15,7 @@ Feature: Range Deletion And I am at the sample metric configuration page When I click the Destroy link Then I should be at metric configuration sample page - And I should see "There are no ranges yet!" + And I should see "There are no Ranges yet!" @kalibro_restart Scenario: Should not see the destroy range link in the range that I not own diff --git a/features/project/show.feature b/features/project/show.feature index 61e8820..47b29f7 100644 --- a/features/project/show.feature +++ b/features/project/show.feature @@ -27,7 +27,7 @@ Scenario: Should show the create repository link the project owner Scenario: Considering the project has no repositories Given I have a sample project When I am at the Sample Project page - Then I should see "There are no repositories yet!" + Then I should see "There are no Repositories yet!" @kalibro_restart @kalibro_processor_restart Scenario: Considering the project has repositories @@ -35,7 +35,7 @@ Scenario: Considering the project has repositories And I have a sample configuration with native metrics And I have a sample repository within the sample project When I am at the Sample Project page - Then I should not see There are no repositories yet! + Then I should not see There are no Repositories yet! @kalibro_processor_restart Scenario: Checking project contents diff --git a/features/reading/delete.feature b/features/reading/delete.feature index 32e92a4..be180d2 100644 --- a/features/reading/delete.feature +++ b/features/reading/delete.feature @@ -11,7 +11,7 @@ Feature: Reading Deletion And I have a sample reading within the sample reading group When I visit the Sample Reading Group page And I click the Destroy link - Then I should see "There are no readings yet!" + Then I should see "There are no Readings yet!" @kalibro_restart Scenario: Should not see the destroy reading link in the reading groups that I not own diff --git a/features/reading/edit.feature b/features/reading/edit.feature index ca5c86e..391fbef 100644 --- a/features/reading/edit.feature +++ b/features/reading/edit.feature @@ -12,11 +12,11 @@ Feature: Reading Edit And I am at the Edit Reading page Then the field "Label" should be filled with "Good" And the field "Grade" should be filled with "10.5" - And the field "Color" should be filled with "33dd33" + And the field "Color" should be filled with "33dd33" When I fill the Label field with "Bad" And I press the Save button Then I should see "Bad" - + @kalibro_restart Scenario: editing a reading with blank fields Given I am a regular user @@ -42,10 +42,10 @@ Feature: Reading Edit 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 "There's already" + 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 + @kalibro_restart + Scenario: editing a reading with non numerical value Given I am a regular user And I am signed in And I own a sample reading group diff --git a/features/reading/new.feature b/features/reading/new.feature index bbbf345..ae35c5b 100644 --- a/features/reading/new.feature +++ b/features/reading/new.feature @@ -27,7 +27,7 @@ Feature: New reading And I fill the Color field with "00000ff00" When I press the Save button Then I should be in the Sample Reading Group page - + @kalibro_restart @javascript Scenario: Checking color picker existence Given I am a regular user @@ -36,7 +36,7 @@ Feature: New reading And I am at the New Reading page When I press the Pick color button Then I should see a color picker Canvas - + @kalibro_restart @javascript Scenario: Selecting a valid color with color picker Given I am a regular user @@ -61,7 +61,7 @@ Feature: New reading And I fill the Grade field with "1" And I fill the Color field with "00000ff00" When I press the Save button - Then I should see "1 error prohibited this Reading from getting saved" + Then I should see "1 error prohibited this Reading from being saved" And I should be at the New Reading page # This test should get fixed with: https://github.com/mezuro/mezuro/issues/30 @@ -88,6 +88,5 @@ Feature: New 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 getting saved" + Then I should see "1 error prohibited this Reading from being saved" And I should be at the New Reading page - diff --git a/features/reading_group/create.feature b/features/reading_group/create.feature index a829d71..305db50 100644 --- a/features/reading_group/create.feature +++ b/features/reading_group/create.feature @@ -1,5 +1,5 @@ Feature: Reading Group Creation - In order to create new reading groups to make my own readings + In order to create new reading groups to make my own readings As a regular user I should be able to create reading groups diff --git a/features/reading_group/edit.feature b/features/reading_group/edit.feature index f144e6e..c050176 100644 --- a/features/reading_group/edit.feature +++ b/features/reading_group/edit.feature @@ -3,7 +3,7 @@ Feature: Reading Group As a regular user I should be able to edit my reading groups - @kalibro_restart + @kalibro_restart Scenario: Should go to the edit page from a reading group that I own Given I am a regular user And I am signed in @@ -12,7 +12,7 @@ Feature: Reading Group When I click the Edit link Then I should be in the Edit Reading Group page - @kalibro_restart + @kalibro_restart Scenario: Should not show edit links from reading groups that doesn't belongs to me Given I am a regular user And I am signed in @@ -20,7 +20,7 @@ Feature: Reading Group And I am at the All Reading Groups page Then I should not see "Edit" within "table tr td" - @kalibro_restart + @kalibro_restart Scenario: Should not render the edit page if the reading group doesn't belongs to the current user Given I am a regular user And I am signed in @@ -29,7 +29,7 @@ Feature: Reading Group When I visit the sample reading group edit page Then I should see "You're not allowed to do this operation" - @kalibro_restart + @kalibro_restart Scenario: Filling up the form Given I am a regular user And I am signed in @@ -39,7 +39,7 @@ Feature: Reading Group Then The field "reading_group[name]" should be filled with the sample reading group "name" And The field "reading_group[description]" should be filled with the sample reading group "description" - @kalibro_restart + @kalibro_restart Scenario: With valid attributes Given I am a regular user And I am signed in @@ -51,7 +51,7 @@ Feature: Reading Group Then I should see "My Reading Group" And I should see "New Reading Group" - @kalibro_restart + @kalibro_restart Scenario: With reading group name already taken Given I am a regular user And I am signed in @@ -62,7 +62,7 @@ Feature: Reading Group When I press the Save button Then I should see "There's already" - @kalibro_restart + @kalibro_restart Scenario: Editing just the description Given I am a regular user And I am signed in @@ -72,7 +72,7 @@ Feature: Reading Group When I press the Save button Then I should see "New Reading Group" - @kalibro_restart + @kalibro_restart Scenario: With blank reading group name Given I am a regular user And I am signed in diff --git a/features/reading_group/show.feature b/features/reading_group/show.feature index e15fcb3..a8fbec8 100644 --- a/features/reading_group/show.feature +++ b/features/reading_group/show.feature @@ -9,7 +9,7 @@ Scenario: Should not show the create, edit and destroy reading link to user that And I have a sample reading group And I have a sample reading within the sample reading group When I visit the Sample Reading Group page - Then I should be in the Sample Reading Group page + Then I should be in the Sample Reading Group page And I should not see New Reading And I should not see Edit And I should not see Destroy @@ -33,7 +33,7 @@ Scenario: Should show the information of the sample reading And I have a sample reading within the sample reading group When I visit the Sample Reading Group page Then I should be in the Sample Reading Group page - And I should not see There are no readings yet! + And I should not see There are no Readings yet! And I should see "Label" And I should see "Grade" And I should see "Color" @@ -44,4 +44,4 @@ Scenario: Should show a message when there is no readings Given I have a sample reading group When I visit the Sample Reading Group page Then I should be in the Sample Reading Group page - And I should see "There are no readings yet!" + And I should see "There are no Readings yet!" diff --git a/features/repository/create.feature b/features/repository/create.feature index e50c18a..63d0df2 100644 --- a/features/repository/create.feature +++ b/features/repository/create.feature @@ -51,4 +51,4 @@ Scenario: repository creation with name already taken And I set the select field "Process Period" as "1 day" And I set the select field "repository_configuration_id" as "Java" When I press the Save button - Then I should see "There's already" \ No newline at end of file + Then I should see "Name There is already a Repository with name KalibroEntities! Please, choose another one." \ No newline at end of file diff --git a/features/repository/delete.feature b/features/repository/delete.feature index a636292..b0f89c5 100644 --- a/features/repository/delete.feature +++ b/features/repository/delete.feature @@ -14,4 +14,4 @@ Feature: Project Deletion And I wait up for a ready processing When I visit the repository show page And I click the Destroy link - Then I should see "There are no repositories yet!" \ No newline at end of file + Then I should see "There are no Repositories yet!" \ No newline at end of file diff --git a/features/repository/edit.feature b/features/repository/edit.feature index 4efde7c..fbda9f4 100644 --- a/features/repository/edit.feature +++ b/features/repository/edit.feature @@ -50,4 +50,4 @@ Feature: Repository Edit And I am at repository edit page When I fill the Name field with "MedSquare" And I press the Save button - Then I should see "There's already" + Then I should see "Name There is already a Repository with name KalibroEntities! Please, choose another one." -- libgit2 0.21.2