From 951bdbf5f47bfa583f7672ded8f836ccb7ffa42c Mon Sep 17 00:00:00 2001 From: Arthur Del Esposte Date: Tue, 1 Sep 2015 15:20:34 -0300 Subject: [PATCH] Fix all selenium broken tests --- features/user_profile_edition.feature | 30 +++++++++++++++++++++--------- lib/ext/create_community_rating_comment.rb | 6 ------ 2 files changed, 21 insertions(+), 15 deletions(-) delete mode 100644 lib/ext/create_community_rating_comment.rb diff --git a/features/user_profile_edition.feature b/features/user_profile_edition.feature index 3866734..be7ecfa 100644 --- a/features/user_profile_edition.feature +++ b/features/user_profile_edition.feature @@ -5,6 +5,9 @@ Feature: Institution Field Background: Given "GovUserPlugin" plugin is enabled + And the following users + | login | name | + | joao | Joao Silva | And I am logged in as admin And I go to /admin/plugins And I check "GovUserPlugin" @@ -21,23 +24,26 @@ Feature: Institution Field | Ministerio das Cidades | MC | BR | DF | Gama | 58.745.189/0001-21 | Autarquia | Executivo | Federal | Ministerio das Cidades | | Governo do DF | GDF | BR | DF | Taguatinga | 12.645.166/0001-44 | Autarquia | Legislativo | Federal | Governo do DF | | Ministerio do Planejamento | MP | BR | DF | Brasilia | 41.769.591/0001-43 | Autarquia | Judiciario | Federal | Ministerio do Planejamento | - And I am logged in as mpog_admin - - And I am logged in as mpog_admin Scenario: Go to control panel when clicked on 'Complete your profile' link + Given I am logged in as "joao" + And I am on joao's control panel When I follow "Complete your profile" Then I should see "Profile settings for " And I should see "Personal information" @selenium Scenario: Verify text information to use governmental e-mail - Given I follow "Edit Profile" + Given I am logged in as "joao" + And I am on joao's control panel + When I follow "Edit Profile" Then I should see "If you work in a public agency use your government e-Mail" @selenium Scenario: Add more then one instituion on profile editor - Given I follow "Edit Profile" + Given I am logged in as "joao" + And I am on joao's control panel + When I follow "Edit Profile" And I follow "Add new institution" And I type in "Minis" in autocomplete list "#input_institution" and I choose "Ministerio do Planejamento" And I follow "Add new institution" @@ -48,18 +54,24 @@ Feature: Institution Field @selenium Scenario: Verify if field 'city' is shown when Brazil is selected - Given I follow "Edit Profile" + Given I am logged in as "joao" + And I am on joao's control panel + When I follow "Edit Profile" Then I should see "City" @selenium Scenario: Verify if field 'city' does not appear when Brazil is not selected as country - Given I follow "Edit Profile" - When I select "United States" from "profile_data_country" + Given I am logged in as "joao" + And I am on joao's control panel + When I follow "Edit Profile" + And I select "United States" from "profile_data_country" Then I should not see "City" within ".type-text" @selenium Scenario: Show message of institution not found - Given I follow "Edit Profile" + Given I am logged in as "joao" + And I am on joao's control panel + When I follow "Edit Profile" And I fill in "input_institution" with "Some Nonexistent Institution" And I sleep for 1 seconds Then I should see "No institution found" diff --git a/lib/ext/create_community_rating_comment.rb b/lib/ext/create_community_rating_comment.rb deleted file mode 100644 index cb7f9d5..0000000 --- a/lib/ext/create_community_rating_comment.rb +++ /dev/null @@ -1,6 +0,0 @@ -require_dependency "create_community_rating_comment" - -CreateCommunityRatingComment.class_eval do - attr_accessible :institution_id -end - -- libgit2 0.21.2