Commit 951bdbf5f47bfa583f7672ded8f836ccb7ffa42c

Authored by Arthur Esposte
1 parent fd1f7b2b

Fix all selenium broken tests

features/user_profile_edition.feature
@@ -5,6 +5,9 @@ Feature: Institution Field @@ -5,6 +5,9 @@ Feature: Institution Field
5 5
6 Background: 6 Background:
7 Given "GovUserPlugin" plugin is enabled 7 Given "GovUserPlugin" plugin is enabled
  8 + And the following users
  9 + | login | name |
  10 + | joao | Joao Silva |
8 And I am logged in as admin 11 And I am logged in as admin
9 And I go to /admin/plugins 12 And I go to /admin/plugins
10 And I check "GovUserPlugin" 13 And I check "GovUserPlugin"
@@ -21,23 +24,26 @@ Feature: Institution Field @@ -21,23 +24,26 @@ Feature: Institution Field
21 | Ministerio das Cidades | MC | BR | DF | Gama | 58.745.189/0001-21 | Autarquia | Executivo | Federal | Ministerio das Cidades | 24 | Ministerio das Cidades | MC | BR | DF | Gama | 58.745.189/0001-21 | Autarquia | Executivo | Federal | Ministerio das Cidades |
22 | Governo do DF | GDF | BR | DF | Taguatinga | 12.645.166/0001-44 | Autarquia | Legislativo | Federal | Governo do DF | 25 | Governo do DF | GDF | BR | DF | Taguatinga | 12.645.166/0001-44 | Autarquia | Legislativo | Federal | Governo do DF |
23 | Ministerio do Planejamento | MP | BR | DF | Brasilia | 41.769.591/0001-43 | Autarquia | Judiciario | Federal | Ministerio do Planejamento | 26 | Ministerio do Planejamento | MP | BR | DF | Brasilia | 41.769.591/0001-43 | Autarquia | Judiciario | Federal | Ministerio do Planejamento |
24 - And I am logged in as mpog_admin  
25 -  
26 - And I am logged in as mpog_admin  
27 27
28 Scenario: Go to control panel when clicked on 'Complete your profile' link 28 Scenario: Go to control panel when clicked on 'Complete your profile' link
  29 + Given I am logged in as "joao"
  30 + And I am on joao's control panel
29 When I follow "Complete your profile" 31 When I follow "Complete your profile"
30 Then I should see "Profile settings for " 32 Then I should see "Profile settings for "
31 And I should see "Personal information" 33 And I should see "Personal information"
32 34
33 @selenium 35 @selenium
34 Scenario: Verify text information to use governmental e-mail 36 Scenario: Verify text information to use governmental e-mail
35 - Given I follow "Edit Profile" 37 + Given I am logged in as "joao"
  38 + And I am on joao's control panel
  39 + When I follow "Edit Profile"
36 Then I should see "If you work in a public agency use your government e-Mail" 40 Then I should see "If you work in a public agency use your government e-Mail"
37 41
38 @selenium 42 @selenium
39 Scenario: Add more then one instituion on profile editor 43 Scenario: Add more then one instituion on profile editor
40 - Given I follow "Edit Profile" 44 + Given I am logged in as "joao"
  45 + And I am on joao's control panel
  46 + When I follow "Edit Profile"
41 And I follow "Add new institution" 47 And I follow "Add new institution"
42 And I type in "Minis" in autocomplete list "#input_institution" and I choose "Ministerio do Planejamento" 48 And I type in "Minis" in autocomplete list "#input_institution" and I choose "Ministerio do Planejamento"
43 And I follow "Add new institution" 49 And I follow "Add new institution"
@@ -48,18 +54,24 @@ Feature: Institution Field @@ -48,18 +54,24 @@ Feature: Institution Field
48 54
49 @selenium 55 @selenium
50 Scenario: Verify if field 'city' is shown when Brazil is selected 56 Scenario: Verify if field 'city' is shown when Brazil is selected
51 - Given I follow "Edit Profile" 57 + Given I am logged in as "joao"
  58 + And I am on joao's control panel
  59 + When I follow "Edit Profile"
52 Then I should see "City" 60 Then I should see "City"
53 61
54 @selenium 62 @selenium
55 Scenario: Verify if field 'city' does not appear when Brazil is not selected as country 63 Scenario: Verify if field 'city' does not appear when Brazil is not selected as country
56 - Given I follow "Edit Profile"  
57 - When I select "United States" from "profile_data_country" 64 + Given I am logged in as "joao"
  65 + And I am on joao's control panel
  66 + When I follow "Edit Profile"
  67 + And I select "United States" from "profile_data_country"
58 Then I should not see "City" within ".type-text" 68 Then I should not see "City" within ".type-text"
59 69
60 @selenium 70 @selenium
61 Scenario: Show message of institution not found 71 Scenario: Show message of institution not found
62 - Given I follow "Edit Profile" 72 + Given I am logged in as "joao"
  73 + And I am on joao's control panel
  74 + When I follow "Edit Profile"
63 And I fill in "input_institution" with "Some Nonexistent Institution" 75 And I fill in "input_institution" with "Some Nonexistent Institution"
64 And I sleep for 1 seconds 76 And I sleep for 1 seconds
65 Then I should see "No institution found" 77 Then I should see "No institution found"
lib/ext/create_community_rating_comment.rb
@@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
1 -require_dependency "create_community_rating_comment"  
2 -  
3 -CreateCommunityRatingComment.class_eval do  
4 - attr_accessible :institution_id  
5 -end  
6 -