Commit 36475a0ec017297f4bbe8282cc49cfd72986d177
1 parent
34ab0d8e
Exists in
master
and in
5 other branches
correcoes_aderencia: Add text information to use governmental e-mail
Signed-off-by: Fabio Teixeira <fabio1079@gmail.com> Signed-off-by: Luciano Prestes <lucianopcbr@gmail.com>
Showing
4 changed files
with
27 additions
and
2 deletions
Show diff stats
features/step_definitions/mpog_steps.rb
| ... | ... | @@ -168,3 +168,21 @@ end |
| 168 | 168 | Given /^I sleep for (\d+) seconds$/ do |time| |
| 169 | 169 | sleep time.to_i |
| 170 | 170 | end |
| 171 | + | |
| 172 | +Given /^I am logged in as mpog_admin$/ do | |
| 173 | + visit('/account/logout') | |
| 174 | + | |
| 175 | + user = User.new(:login => 'admin_user', :password => '123456', :password_confirmation => '123456', :email => 'admin_user@example.com') | |
| 176 | + person = Person.new :name=>"Mpog Admin", :identifier=>"mpog-admin" | |
| 177 | + user.person = person | |
| 178 | + user.save! | |
| 179 | + | |
| 180 | + user.activate | |
| 181 | + e = Environment.default | |
| 182 | + e.add_admin(user.person) | |
| 183 | + | |
| 184 | + visit('/account/login') | |
| 185 | + fill_in("Username", :with => user.login) | |
| 186 | + fill_in("Password", :with => '123456') | |
| 187 | + click_button("Log in") | |
| 188 | +end | ... | ... |
features/user_profile_edition.feature
| ... | ... | @@ -5,7 +5,7 @@ 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" |
| ... | ... | @@ -43,3 +43,8 @@ Feature: Institution Field |
| 43 | 43 | Then I should see "Ministerio do Planejamento" within ".institutions_added" |
| 44 | 44 | And I should see "Governo do DF" within ".institutions_added" |
| 45 | 45 | |
| 46 | + @selenium | |
| 47 | + Scenario: Verify text information to use governmental e-mail | |
| 48 | + Given I am on josesilva's control panel | |
| 49 | + And I follow "Edit Profile" | |
| 50 | + Then I should see "If you work in a public agency use your government e-Mail" | |
| 46 | 51 | \ No newline at end of file | ... | ... |
public/mpog-user-validations.js
| ... | ... | @@ -60,6 +60,7 @@ |
| 60 | 60 | function set_initial_form_custom_data(selectFieldChoices) { |
| 61 | 61 | jQuery('#profile_data_country').val("BR"); |
| 62 | 62 | jQuery("#password-balloon").html(jQuery("#user_password_menssage").val()); |
| 63 | + jQuery("#profile_data_email").parent().append(jQuery("#email_public_message").remove()); | |
| 63 | 64 | |
| 64 | 65 | selectFieldChoices.setSelect(); |
| 65 | 66 | } | ... | ... |
views/person_editor_extras.html.erb
| ... | ... | @@ -35,4 +35,5 @@ |
| 35 | 35 | |
| 36 | 36 | <%= hidden_field_tag("full_name_error", _("Should begin with a capital letter and no special characters")) %> |
| 37 | 37 | <%= hidden_field_tag("email_error", _("Email should have the following format: name@host.br")) %> |
| 38 | -<%= hidden_field_tag("site_error", _("Site should have a valid format: http://name.hosts")) %> | |
| 39 | 38 | \ No newline at end of file |
| 39 | +<%= hidden_field_tag("site_error", _("Site should have a valid format: http://name.hosts")) %> | |
| 40 | +<div id="email_public_message"><%= _("If you work in a public agency use your government e-Mail") %> </div> | |
| 40 | 41 | \ No newline at end of file | ... | ... |