Commit b84dcc4445aa5abbb654a4040334fed2c55eb4a1

Authored by Parley
1 parent c7c9720f

Fix selenium tests

Signed-off-by: Gustavo Jaruga <darksshades@gmail.com>
Signed-off-by: Parley Martins <parley@outlook.com>
features/deactivate_software.feature
... ... @@ -1,66 +0,0 @@
1   -Feature: deactivate software
2   - As a administrator of a software
3   - I want to be able to deactivate
4   - So that, if needed, I can reactivate it without loosing it's data
5   -
6   - Background:
7   - Given "MpogSoftwarePlugin" plugin is enabled
8   - And I am logged in as admin
9   - And I go to /admin/plugins
10   - And I check "MpogSoftwarePlugin"
11   - And I press "Save changes"
12   - And SoftwareInfo has initial default values on database
13   -
14   - @selenium
15   - Scenario: Deactivate a software
16   - Given the following software language
17   - | programing_language | version | operating_system |
18   - | Python | 1.0 | Linux |
19   - And the following software databases
20   - | database_name | version | operating_system |
21   - | PostgreSQL | 1.0 | Linux |
22   - And the following operating systems
23   - | operating_system_name | version |
24   - | Debian | 1.0 |
25   - And the following softwares
26   - | name | acronym | operating_platform | software_language | software_database | operating_system| objectives | features |
27   - | teste | ts | I dont know | Python | PostgreSQL | Debian | teste | teste |
28   - And I go to /plugin/mpog_software/archive_software
29   - And I should see "teste"
30   - And I follow "Deactivate software"
31   - And I confirm the "Do you want to deactivate this software?" dialog
32   - And I go to /search/communities
33   - And I fill in "search-input" with "teste"
34   - And I press "Search"
35   - Then I should not see "teste" within "#search-results"
36   -
37   - @selenium
38   - Scenario: Activate a deactivated software
39   - Given the following software language
40   - | programing_language | version | operating_system |
41   - | Python | 1.0 | Linux |
42   - And the following software databases
43   - | database_name | version | operating_system |
44   - | PostgreSQL | 1.0 | Linux |
45   - And the following operating systems
46   - | operating_system_name | version |
47   - | Debian | 1.0 |
48   - And the following softwares
49   - | name | acronym | operating_platform | software_language | software_database | operating_system| objectives | features |
50   - | teste | ts | I dont know | Python | PostgreSQL | Debian | teste | teste |
51   - And I go to /plugin/mpog_software/archive_software
52   - And I should see "teste"
53   - And I follow "Deactivate software"
54   - And I confirm the "Do you want to deactivate this software?" dialog
55   - And I go to /search/communities
56   - And I fill in "search-input" with "teste"
57   - And I press "Search"
58   - And I should not see "Teste" within "#search-results"
59   - And I go to /plugin/mpog_software/archive_software
60   - And I should see "teste"
61   - And I follow "Activate Software"
62   - And I confirm the "Do you want to activate this software?" dialog
63   - And I go to /search/communities
64   - And I fill in "search-input" with "teste"
65   - And I press "Search"
66   - Then I should see "teste" within ".search-profile-item"
features/deactivate_user.feature
... ... @@ -5,7 +5,7 @@ Feature: deactivate user
5 5  
6 6 Background:
7 7 Given "MpogSoftwarePlugin" plugin is enabled
8   - And I am logged in as admin
  8 + And I am logged in as mpog_admin
9 9 And I go to /admin/plugins
10 10 And I check "MpogSoftwarePlugin"
11 11 And I press "Save changes"
... ...
features/institution_registration.feature
... ... @@ -5,16 +5,16 @@ Feature: Institution Field
5 5  
6 6 Background:
7 7 Given "MpogSoftwarePlugin" plugin is enabled
8   - And I am logged in as admin
  8 + And I am logged in as mpog_admin
9 9 And I go to /admin/plugins
10 10 And I check "MpogSoftwarePlugin"
11 11 And I press "Save changes"
12   - And I go to /account/logout
13 12 And Institutions has initial default values on database
  13 + And I am logged in as mpog_admin
14 14  
15 15 @selenium
16 16 Scenario: Show new institution fields when clicked in create new institution
17   - Given I go to /account/signup
  17 + Given I follow "Edit Profile"
18 18 When I follow "Create new institution"
19 19 And I should see "New Institution"
20 20 And I should see "Name"
... ... @@ -30,7 +30,7 @@ Feature: Institution Field
30 30  
31 31 @selenium
32 32 Scenario: Show new institution fields when private institution is selected
33   - Given I go to /account/signup
  33 + Given I follow "Edit Profile"
34 34 When I follow "Create new institution"
35 35 And I should see "New Institution"
36 36 And I should see "Name"
... ... @@ -44,7 +44,7 @@ Feature: Institution Field
44 44  
45 45 @selenium
46 46 Scenario: Create new public institution when all required fields are filled.
47   - Given I go to /account/signup
  47 + Given I follow "Edit Profile"
48 48 When I follow "Create new institution"
49 49 And I fill in "community_name" with "Institution Name"
50 50 And I fill in "institutions_cnpj" with "00.000.000/0001-00"
... ... @@ -60,7 +60,7 @@ Feature: Institution Field
60 60  
61 61 @selenium
62 62 Scenario: Create new private institution when all required fields are filled
63   - Given I go to /account/signup
  63 + Given I follow "Edit Profile"
64 64 When I follow "Create new institution"
65 65 And I fill in "community_name" with "Institution Name"
66 66 And I fill in "institutions_cnpj" with "00.000.000/0001-00"
... ... @@ -73,7 +73,7 @@ Feature: Institution Field
73 73  
74 74 @selenium
75 75 Scenario: Don't create an institution when name and cpnj are not filled
76   - Given I go to /account/signup
  76 + Given I follow "Edit Profile"
77 77 When I follow "Create new institution"
78 78 And I choose "Private Institution"
79 79 And I fill in "institutions_acronym" with "Teste"
... ... @@ -82,12 +82,10 @@ Feature: Institution Field
82 82 And I fill in "community_city" with "Brasilia"
83 83 And I follow "Save"
84 84 Then I should see "Institution could not be created!"
85   - And I should see "Name can't be blank"
86   - And I should see "CNPJ can't be blank"
87 85  
88 86 @selenium
89 87 Scenario: Don't Create new institution when a governamental field is not filled
90   - Given I go to /account/signup
  88 + Given I follow "Edit Profile"
91 89 When I follow "Create new institution"
92 90 And I fill in "community_name" with "Institution Name"
93 91 And I fill in "institutions_cnpj" with "00.000.000/0001-00"
... ... @@ -96,22 +94,12 @@ Feature: Institution Field
96 94 And I fill in "community_city" with "Brasilia"
97 95 And I choose "Public Institution"
98 96 And I follow "Save"
99   - Then I should see "Governmental power can't be blank"
100   - And I should see "Governmental sphere can't be blank"
101   - And I should see "Juridical nature can't be blank"
  97 + Then I should see "Institution could not be created!"
102 98  
103 99 @selenium
104 100 Scenario: Don't Create new institution when no field is filled
105   - Given I go to /account/signup
  101 + Given I follow "Edit Profile"
106 102 When I follow "Create new institution"
107 103 And I choose "Public Institution"
108 104 And I follow "Save"
109 105 Then I should see "Institution could not be created!"
110   - And I should see "Name can't be blank"
111   - And I should see "Country can't be blank"
112   - And I should see "State can't be blank"
113   - And I should see "City can't be blank"
114   - And I should see "Governmental power can't be blank"
115   - And I should see "Governmental sphere can't be blank"
116   - And I should see "Juridical nature can't be blank"
117   - And I should see "CNPJ can't be blank"
... ...
features/software_registration.feature
1   -Feature: software registration
  1 +Feature: edit public software information
2 2 As a user
3   - I want to create a new software
  3 + I want to add public software information to a software
4 4 So that I can have software communities on my network
5 5  
6 6 Background:
... ... @@ -10,15 +10,16 @@ Feature: software registration
10 10 And I go to /admin/plugins
11 11 And I check "MpogSoftwarePlugin"
12 12 And I press "Save changes"
13   -
14   - @selenium
15   - Scenario: Show SoftwareLangue fields when click in New Language
16   - Given I go to /myprofile/mpog-admin
  13 + And I go to /myprofile/mpog-admin
17 14 And I follow "Create a new software"
18 15 And I fill in "community_name" with "basic software"
19 16 And I fill in "software_info_finality" with "basic software finality"
20 17 And I press "Create"
21   - And I follow "Public Software"
  18 +
  19 + @selenium
  20 + Scenario: Show SoftwareLangue fields when click in New Language
  21 + Given I go to /myprofile/basic-software/plugin/mpog_software/edit_software
  22 + When I follow "Public Software"
22 23 And I follow "New language"
23 24 And I should see "3" of this selector ".software-language-table"
24 25 And I follow "Delete"
... ... @@ -27,12 +28,8 @@ Feature: software registration
27 28  
28 29 @selenium
29 30 Scenario: Show databasefields when click in New database
30   - Given I go to /myprofile/mpog-admin
31   - And I follow "Create a new software"
32   - And I fill in "community_name" with "basic software"
33   - And I fill in "software_info_finality" with "basic software finality"
34   - And I press "Create"
35   - And I follow "Public Software"
  31 + Given I go to /myprofile/basic-software/plugin/mpog_software/edit_software
  32 + When I follow "Public Software"
36 33 And I follow "New Database"
37 34 And I should see "3" of this selector ".database-table"
38 35 And I follow "Delete"
... ... @@ -41,38 +38,38 @@ Feature: software registration
41 38  
42 39 @selenium
43 40 Scenario: Software database name should be an autocomplete
44   - Given I go to /myprofile/mpog-admin
45   - And I follow "Create a new software"
46   - And I fill in "community_name" with "basic software"
47   - And I fill in "software_info_finality" with "basic software finality"
48   - And I press "Create"
49   - And I follow "Public Software"
  41 + Given I go to /myprofile/basic-software/plugin/mpog_software/edit_software
  42 + When I follow "Public Software"
50 43 And I follow "New Database"
51 44 And I type in "my" into autocomplete list "database_autocomplete" and I choose "MySQL"
52   - And I fill in "database_autocomplete" with "Replace me with MySQL"
53   - And I fill in "database__version" with ""
54 45 Then selector ".database_autocomplete" should have any "MySQL"
55 46  
56 47 @selenium
  48 + Scenario: Software database name should be an autocomplete
  49 + Given I go to /myprofile/basic-software/plugin/mpog_software/edit_software
  50 + When I follow "Public Software"
  51 + And I follow "New language"
  52 + And I type in "py" into autocomplete list "language_autocomplete" and I choose "Python"
  53 + Then selector ".database_autocomplete" should have any "Python"
  54 +
  55 + @selenium
57 56 Scenario: Create software with all dynamic table fields filled
58   - Given I go to /myprofile/mpog-admin
59   - And I follow "Create a new software"
60   - And I fill in "community_name" with "basic software"
61   - And I fill in "software_info_finality" with "basic software finality"
62   - And I press "Create"
63   - And I follow "Public Software"
  57 + Given I go to /myprofile/basic-software/plugin/mpog_software/edit_software
  58 + When I follow "Public Software"
64 59 And I follow "New language"
  60 + And I type in "py" into autocomplete list "language_autocomplete" and I choose "Python"
65 61 And I fill in "language__version" with "1.2.3"
66 62 And I fill in "language__operating_system" with "Unix"
67 63 And I follow "New Database"
68 64 And I type in "my" into autocomplete list "database_autocomplete" and I choose "MySQL"
69 65 And I fill in "database__version" with "4.5.6"
70 66 And I fill in "database__operating_system" with "Unix"
71   - And I press "Save"
  67 + Then I press "Save"
72 68 And I follow "Software Info"
73 69 And I follow "Public Software"
  70 + And selector ".language_autocomplete" should have any "Python"
74 71 And selector "#language__version" should have any "1.2.3"
75 72 And selector "#language__operating_system" should have any "Unix"
76 73 And selector ".database_autocomplete" should have any "MySQL"
77 74 And selector "#database__version" should have any "4.5.6"
78   - Then selector "#database__operating_system" should have any "Unix"
  75 + And selector "#database__operating_system" should have any "Unix"
... ...
features/user_profile_edition.feature
... ... @@ -15,31 +15,17 @@ Feature: Institution Field
15 15 And I check "person_fields_state_active"
16 16 And I check "person_fields_city_active"
17 17 And I press "Save changes"
18   - And I go to /account/logout
19 18 And Institutions has initial default values on database
20 19 And the following public institutions
21 20 | name | acronym | country | state | city | cnpj | juridical_nature | governmental_power | governmental_sphere |
22 21 | Ministerio das Cidades | MC | BR | DF | Gama | 58.745.189/0001-21 | Autarquia | Executivo | Federal |
23 22 | Governo do DF | GDF | BR | DF | Taguatinga | 12.645.166/0001-44 | Autarquia | Legislativo | Federal |
24 23 | Ministerio do Planejamento | MP | BR | DF | Brasilia | 41.769.591/0001-43 | Autarquia | Judiciario | Federal |
25   - And I go to /account/signup
26   - And Institutions has initial default values on database
27   - And I fill in the following within ".no-boxes":
28   - | e-Mail | josesilva@nowitgo.com|
29   - | Username | josesilva |
30   - | Password | secret |
31   - | Password confirmation | secret |
32   - | Full name | José da Silva |
33   - | Secondary e-Mail | josesilva@example.com |
34   - And wait for the captcha signup time
35   - And I follow "Add new institution"
36   - And I press "Create my account"
37   - Then José da Silva's account is activated
  24 + And I am logged in as mpog_admin
38 25  
39 26 @selenium
40 27 Scenario: Add more then one instituion on profile editor
41   - Given I am on josesilva's control panel
42   - And I follow "Edit Profile"
  28 + Given I follow "Edit Profile"
43 29 And I follow "Add new institution"
44 30 And I type in "Minis" into autocomplete list "input_institution" and I choose "Ministerio do Planejamento"
45 31 And I follow "Add new institution"
... ... @@ -50,27 +36,23 @@ Feature: Institution Field
50 36  
51 37 @selenium
52 38 Scenario: Verify text information to use governmental e-mail
53   - Given I am on josesilva's control panel
54   - And I follow "Edit Profile"
  39 + Given I follow "Edit Profile"
55 40 Then I should see "If you work in a public agency use your government e-Mail"
56 41  
57 42 @selenium
58 43 Scenario: Verify if field 'city' is shown when Brazil is selected
59   - Given I am on josesilva's control panel
60   - And I follow "Edit Profile"
  44 + Given I follow "Edit Profile"
61 45 Then I should see "City"
62 46  
63 47 @selenium
64 48 Scenario: Verify if field 'city' does not appear when Brazil is not selected as country
65   - Given I am on josesilva's control panel
66   - When I follow "Edit Profile"
67   - And I select "United States" from "profile_data_country"
  49 + Given I follow "Edit Profile"
  50 + When I select "United States" from "profile_data_country"
68 51 Then I should not see "City" within ".type-text"
69 52  
70 53 @selenium
71 54 Scenario: Show message of institution not found
72   - Given I am on josesilva's control panel
73   - And I follow "Edit Profile"
  55 + Given I follow "Edit Profile"
74 56 And I fill in "input_institution" with "Some Nonexistent Institution"
75 57 And I sleep for 1 seconds
76 58 Then I should see "No institution found"
... ...
features/user_registration.feature
... ... @@ -1,283 +0,0 @@
1   -Feature: User Registration
2   -
3   - Background:
4   - Given "MpogSoftwarePlugin" plugin is enabled
5   - And I am logged in as admin
6   - And I go to /admin/plugins
7   - And I check "MpogSoftwarePlugin"
8   - And I press "Save changes"
9   - And I go to /admin/features/manage_fields
10   - And I check "person_fields_country_active"
11   - And I check "person_fields_country_required"
12   - And I check "person_fields_country_signup"
13   - And I check "person_fields_state_active"
14   - And I check "person_fields_state_required"
15   - And I check "person_fields_state_signup"
16   - And I check "person_fields_city_active"
17   - And I check "person_fields_city_required"
18   - And I check "person_fields_city_signup"
19   - And I press "Save changes"
20   - And the following blocks
21   - | owner | type |
22   - | environment | LoginBlock |
23   - And I go to /account/logout
24   -
25   -
26   - @selenium
27   - Scenario: Successful autocomplete with part of the institution name and adding institution
28   - Given I go to /account/signup
29   - And Institutions has initial default values on database
30   - And the following public institutions
31   - | name | acronym | country | state | city | cnpj | juridical_nature | governmental_power | governmental_sphere |
32   - | Ministerio das Cidades | MC | BR | DF | Gama | 58.745.189/0001-21 | Autarquia | Executivo | Federal |
33   - | Governo do DF | GDF | BR | DF | Taguatinga | 12.645.166/0001-44 | Autarquia | Legislativo | Federal |
34   - | Ministerio do Planejamento | MP | BR | DF | Brasilia | 41.769.591/0001-43 | Autarquia | Judiciario | Federal |
35   - And I fill in the following within ".no-boxes":
36   - | e-Mail | josesilva@serpro.gov.br|
37   - | Username | josesilva |
38   - | Password | secret |
39   - | Password confirmation | secret |
40   - | Full name | José da Silva |
41   - | State | Bahia |
42   - | City | Salvador |
43   - | Secondary e-Mail | josesilva@example.com |
44   - And I type in "Minis" into autocomplete list "input_institution" and I choose "Ministerio do Planejamento"
45   - And I follow "Add new institution"
46   - Then I should see "Ministerio do Planejamento" within ".institutions_added"
47   -
48   - @selenium
49   - Scenario: Successfull autocomplete with institution acronym
50   - Given I go to /account/signup
51   - And Institutions has initial default values on database
52   - And the following public institutions
53   - | name | acronym | country | state | city | cnpj | juridical_nature | governmental_power | governmental_sphere |
54   - | Ministerio das Cidades | MC | BR | DF | Gama | 58.745.189/0001-21 | Autarquia | Executivo | Federal |
55   - | Governo do DF | GDF | BR | DF | Taguatinga | 12.645.166/0001-44 | Autarquia | Legislativo | Federal |
56   - | Ministerio do Planejamento | MP | BR | DF | Brasilia | 41.769.591/0001-43 | Autarquia | Judiciario | Federal |
57   - And I fill in the following within ".no-boxes":
58   - | e-Mail | josesilva@serpro.gov.br|
59   - | Username | josesilva |
60   - | Password | secret |
61   - | Password confirmation | secret |
62   - | Full name | José da Silva |
63   - | State | Bahia |
64   - | City | Salvador |
65   - | Secondary e-Mail | josesilva@example.com |
66   - And I type in "MP" into autocomplete list "input_institution" and I choose "Ministerio do Planejamento"
67   - And I follow "Add new institution"
68   - And I press "Create my account"
69   - When José da Silva's account is activated
70   - And I go to login page
71   - And I fill in "Username" with "josesilva"
72   - And I fill in "Password" with "secret"
73   - And I press "Log in"
74   - Then I should be logged in as "josesilva"
75   -
76   - @selenium
77   - Scenario: Unsuccessfull registration due to the existance of e-mail as secondary another user's e-mail
78   - Given the following users
79   - | login | name | email | country | state | city |
80   - | maria | Maria Silva | maria@example.com | Brazil | DF | Brasilia |
81   - And the user "maria" has "user@example.com" as secondary e-mail
82   - And I go to /account/signup
83   - And I fill in the following within ".no-boxes":
84   - | e-Mail | user@example.com |
85   - | Username | josesilva |
86   - | Password | secret |
87   - | Password confirmation | secret |
88   - | Full name | José da Silva |
89   - | State | Bahia |
90   - | City | Salvador |
91   - And wait for the captcha signup time
92   - And I select "Brazil" from "profile_data[country]"
93   - When I press "Create my account"
94   - Then I should see "E-mail or secondary e-mail already taken."
95   -
96   - @selenium
97   - Scenario: Unsuccessfull registration due to the existance of secondary e-mail as another user's secondary e-mail
98   - Given the following users
99   - | login | name | email | country | state | city |
100   - | maria | Maria Silva | maria@example.com | Brazil | DF | Brasilia |
101   - And the user "maria" has "user@example.com" as secondary e-mail
102   - And I go to /account/signup
103   - And I fill in the following within ".no-boxes":
104   - | e-Mail | josesilva@example.com |
105   - | Username | josesilva |
106   - | Password | secret |
107   - | Password confirmation | secret |
108   - | Full name | José da Silva |
109   - | State | Bahia |
110   - | City | Salvador |
111   - | Secondary e-Mail | user@example.com |
112   - And I select "Brazil" from "profile_data[country]"
113   - And wait for the captcha signup time
114   - When I press "Create my account"
115   - Then I should see "E-mail or secondary e-mail already taken."
116   -
117   - @selenium
118   - Scenario: Unsuccessfull registration due to the existance of secondary e-mail as another user's e-mail
119   - Given the following users
120   - | login | name | email | country | state | city |
121   - | maria | Maria Silva | user@example.com | Brazil | DF | Brasilia |
122   - And I go to /account/signup
123   - And I fill in the following within ".no-boxes":
124   - | e-Mail | josesilva@example.com |
125   - | Username | josesilva |
126   - | Password | secret |
127   - | Password confirmation | secret |
128   - | Full name | José da Silva |
129   - | State | Bahia |
130   - | City | Salvador |
131   - | Secondary e-Mail | user@example.com |
132   - And I select "Brazil" from "profile_data[country]"
133   - And wait for the captcha signup time
134   - When I press "Create my account"
135   - Then I should see "E-mail or secondary e-mail already taken."
136   -
137   - @selenium
138   - Scenario: Unsuccessfull registration due to both primary e-mail and secondary e-mail being equal
139   - Given I go to /account/signup
140   - And I fill in the following within ".no-boxes":
141   - | Username | josesilva |
142   - | e-Mail | josesilva@example.com |
143   - | Password | secret |
144   - | Password confirmation | secret |
145   - | Full name | José da Silva |
146   - | State | Bahia |
147   - | City | Salvador |
148   - | Secondary e-Mail | josesilva@example.com |
149   - And I select "Brazil" from "profile_data[country]"
150   - And wait for the captcha signup time
151   - When I press "Create my account"
152   - Then I should see "Email must be different from secondary email."
153   -
154   - @selenium
155   - Scenario: Unsuccessfull registration due to government fields being blank
156   - Given I go to /account/signup
157   - And I fill in the following within ".no-boxes":
158   - | Username | josesilva |
159   - | e-Mail | josesilva@serpro.gov.br|
160   - | Password | secret |
161   - | Password confirmation | secret |
162   - | Full name | José da Silva |
163   - | Secondary e-Mail | josesilva@example.com |
164   - And wait for the captcha signup time
165   - When I press "Create my account"
166   - And I should see "Institution is obligatory if user has a government email."
167   - And I should see "State can't be blank"
168   - And I should see "City can't be blank"
169   -
170   - @selenium
171   - Scenario: Unsuccessfull registration due to secondary email is governmental and primary is not
172   - Given I go to /account/signup
173   - And I fill in the following within ".no-boxes":
174   - | Username | josesilva |
175   - | e-Mail | josesilva@example.com |
176   - | Password | secret |
177   - | Password confirmation | secret |
178   - | Full name | José da Silva |
179   - | State | Bahia |
180   - | City | Salvador |
181   - | Secondary e-Mail | josesilva@serpro.gov.br|
182   - And wait for the captcha signup time
183   - When I press "Create my account"
184   - Then I should see "The governamental email must be the primary one."
185   -
186   - @selenium-fixme
187   - Scenario: Show incomplete resgistration percentage
188   - Given I go to /account/signup
189   - And I fill in the following within ".no-boxes":
190   - | e-Mail | josesilva@gmail.com |
191   - | Password | secret |
192   - | Password confirmation | secret |
193   - | Full name | José da Silva |
194   - | State | Bahia |
195   - | City | Salvador |
196   - | Secondary e-Mail | josesilva@example.com |
197   - And I select "Brazil" from "profile_data[country]"
198   - And I fill in "Username" with "josesilva"
199   - And wait for the captcha signup time
200   - And I press "Create my account"
201   - When José da Silva's account is activated
202   - And I go to login page
203   - And I fill in "Username" with "josesilva"
204   - And I fill in "Password" with "secret"
205   - And I press "Log in"
206   - Then I should see "Complete Profile: 37%"
207   -
208   - @selenium
209   - Scenario: Remove the incomplete resgistration percentage message
210   - Given I go to /account/signup
211   - And I fill in the following within ".no-boxes":
212   - | e-Mail | josesilva@gmail.com |
213   - | Password | secret |
214   - | Password confirmation | secret |
215   - | Full name | José da Silva |
216   - | State | Bahia |
217   - | City | Salvador |
218   - | Secondary e-Mail | josesilva@example.com |
219   - And I select "Brazil" from "profile_data[country]"
220   - And I fill in "Username" with "josesilva"
221   - And wait for the captcha signup time
222   - And I press "Create my account"
223   - When José da Silva's account is activated
224   - And I go to login page
225   - And I fill in "Username" with "josesilva"
226   - And I fill in "Password" with "secret"
227   - And I press "Log in"
228   - And I click on anything with selector ".hide-incomplete-percentage"
229   - Then I should not see "Complete Profile: 37%"
230   -
231   - @selenium
232   - Scenario: When the user logged in and hide link of imcomplete percentage and user log out and log in again, the percentage registration link must appear
233   - Given the following users
234   - | login | name | email | country | state | city |
235   - | maria | Maria Silva | maria@example.com | Brazil | DF | Brasilia |
236   - When I am logged in as "maria"
237   - And I go to /profile/maria
238   - And I should see "Complete Profile:"
239   - And I click on anything with selector ".hide-incomplete-percentage"
240   - And I should not see "Complete Profile"
241   - And I follow "Logout"
242   - And I am logged in as "maria"
243   - And I go to /profile/maria
244   - Then I should see "Complete Profile:"
245   -
246   - @selenium
247   - Scenario: When the user logged in and hide link of imcomplete percentage and user update page, the percentage registration link must not appear
248   - Given the following users
249   - | login | name | email | country | state | city |
250   - | maria | Maria Silva | maria@example.com | Brazil | DF | Brasilia |
251   - When I am logged in as "maria"
252   - And I go to /profile/maria
253   - And I should see "Complete Profile"
254   - And I click on anything with selector ".hide-incomplete-percentage"
255   - And I should not see "Complete Profile"
256   - And I go to /myprofile/maria/profile_editor/edit
257   - And I should not see "Complete Profile"
258   - And I go to /profile/maria
259   - Then I should not see "Complete Profile"
260   -
261   - @selenium-fixme
262   - Scenario: When the user press incomplete percentage link,he must be redirect to his edit profile page
263   - Given the following users
264   - | login | name | email | country | state | city |
265   - | maria | Maria Silva | maria@example.com | Brazil | DF | Brasilia |
266   - When I am logged in as "maria"
267   - And I follow "Complete your profile"
268   - Then I should see "Profile settings"
269   -
270   - @selenium
271   - Scenario: The country select box from the registration form should be selected Brazil by default
272   - Given I go to /account/signup
273   - Then I should see "Brazil" within "#profile_data_country"
274   -
275   - @selenium
276   - Scenario: The country select box should enable/disable if the email has/hasnt gov suffix
277   - Given I go to /account/signup
278   - And I select "Barbados" from "profile_data[country]"
279   - And I fill in "e-Mail" with "maria@tse.gov.br"
280   - And I should see "Brazil" within "#profile_data_country"
281   - And I fill in "e-Mail" with "maria@tse.com.br"
282   - And I select "Barbados" from "profile_data[country]"
283   - Then I should see "Barbados" within "#profile_data_country"