Commit 951bdbf5f47bfa583f7672ded8f836ccb7ffa42c
1 parent
fd1f7b2b
Exists in
master
and in
3 other branches
Fix all selenium broken tests
Showing
2 changed files
with
21 additions
and
15 deletions
Show diff stats
features/user_profile_edition.feature
| ... | ... | @@ -5,6 +5,9 @@ Feature: Institution Field |
| 5 | 5 | |
| 6 | 6 | Background: |
| 7 | 7 | Given "GovUserPlugin" plugin is enabled |
| 8 | + And the following users | |
| 9 | + | login | name | | |
| 10 | + | joao | Joao Silva | | |
| 8 | 11 | And I am logged in as admin |
| 9 | 12 | And I go to /admin/plugins |
| 10 | 13 | And I check "GovUserPlugin" |
| ... | ... | @@ -21,23 +24,26 @@ Feature: Institution Field |
| 21 | 24 | | Ministerio das Cidades | MC | BR | DF | Gama | 58.745.189/0001-21 | Autarquia | Executivo | Federal | Ministerio das Cidades | |
| 22 | 25 | | Governo do DF | GDF | BR | DF | Taguatinga | 12.645.166/0001-44 | Autarquia | Legislativo | Federal | Governo do DF | |
| 23 | 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 | 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 | 31 | When I follow "Complete your profile" |
| 30 | 32 | Then I should see "Profile settings for " |
| 31 | 33 | And I should see "Personal information" |
| 32 | 34 | |
| 33 | 35 | @selenium |
| 34 | 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 | 40 | Then I should see "If you work in a public agency use your government e-Mail" |
| 37 | 41 | |
| 38 | 42 | @selenium |
| 39 | 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 | 47 | And I follow "Add new institution" |
| 42 | 48 | And I type in "Minis" in autocomplete list "#input_institution" and I choose "Ministerio do Planejamento" |
| 43 | 49 | And I follow "Add new institution" |
| ... | ... | @@ -48,18 +54,24 @@ Feature: Institution Field |
| 48 | 54 | |
| 49 | 55 | @selenium |
| 50 | 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 | 60 | Then I should see "City" |
| 53 | 61 | |
| 54 | 62 | @selenium |
| 55 | 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 | 68 | Then I should not see "City" within ".type-text" |
| 59 | 69 | |
| 60 | 70 | @selenium |
| 61 | 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 | 75 | And I fill in "input_institution" with "Some Nonexistent Institution" |
| 64 | 76 | And I sleep for 1 seconds |
| 65 | 77 | Then I should see "No institution found" | ... | ... |