Commit 00821581c87840355f4526adec5a4d3de86b303a

Authored by Parley
Committed by Fabio Teixeira
1 parent e102c124
Exists in master and in 79 other branches add_sisp_to_chef, add_super_archives_plugin, api_for_colab, automates_core_packing, backup_not_prod, changes_in_buttons_on_content_panel, colab_automated_login, colab_spb_plugin_recipe, colab_widgets_settings, design_validation, dev_env_minimal, disable_email_dev, fix_breadcrumbs_position, fix_categories_software_link, fix_edit_institution, fix_edit_software_with_another_license, fix_get_license_info, fix_gitlab_assets_permission, fix_list_style_inside_article, fix_list_style_on_folder_elements, fix_members_pagination, fix_merge_request_url, fix_models_translations, fix_no_license, fix_software_api, fix_software_block_migration, fix_software_communities_translations, fix_software_communities_unit_test, fix_style_create_institution_admin_panel, fix_superarchives_imports, fix_sym_links_noosfero, focus_search_field_theme, gov-user-refactoring, gov-user-refactoring-rails4, header_fix, institution_modal_on_rating, kalibro-conf-refactoring, kalibro-processor-package, lxc_settings, margin_fix, mezuro_cookbook, prezento, refactor_download_block, refactor_software_communities, refactor_software_for_sisp, register_page, release-process, release-process-v2, remove-unused-images, remove_broken_theme, remove_secondary_email_from_user, remove_sisp_buttons, removing_super_archives_email, review_message, scope2method, signals_user_noosfero, sisp_catalog_header, sisp_colab_config, sisp_dev, sisp_dev_master, sisp_simple_version, software_as_organization, software_catalog_style_fix, software_communities_html_refactor, software_infos_api, spb_minimal_env, spb_to_rails4, spec_refactor, stable-4.1, stable-4.2, stable-4.x, temp_soft_comm_refactoring, theme_header, theme_javascript_refactory, thread_dropdown, thread_page, update_search_by_categories, update_software_api, update_softwares_boxes

incomplete_registration: Cucumber and functional tests to incomplete profile message.

Signed-off-by: Fabio Teixeira  <fabio1079@gmail.com>
Signed-off-by: Parley Martins <parley@outlook.com>
features/user_registration.feature
@@ -236,7 +236,7 @@ Feature: User Registration @@ -236,7 +236,7 @@ Feature: User Registration
236 And I fill in "Username" with "josesilva" 236 And I fill in "Username" with "josesilva"
237 And I fill in "Password" with "secret" 237 And I fill in "Password" with "secret"
238 And I press "Log in" 238 And I press "Log in"
239 - Then I should see "Percentage incomplete: 63 %" 239 + Then I should see "Complete Profile: 37%"
240 240
241 @selenium 241 @selenium
242 Scenario: Remove the incomplete resgistration percentage message 242 Scenario: Remove the incomplete resgistration percentage message
@@ -260,7 +260,7 @@ Feature: User Registration @@ -260,7 +260,7 @@ Feature: User Registration
260 And I fill in "Password" with "secret" 260 And I fill in "Password" with "secret"
261 And I press "Log in" 261 And I press "Log in"
262 And I click on anything with selector ".hide-incomplete-percentage" 262 And I click on anything with selector ".hide-incomplete-percentage"
263 - Then I should not see "Percentage incomplete: 63 %" 263 + Then I should not see "Complete Profile: 37%"
264 264
265 @selenium 265 @selenium
266 Scenario: When the user log out and log in again, the percentage registration message must appear 266 Scenario: When the user log out and log in again, the percentage registration message must appear
@@ -268,9 +268,10 @@ Feature: User Registration @@ -268,9 +268,10 @@ Feature: User Registration
268 | login | name | email | country | state | city | 268 | login | name | email | country | state | city |
269 | maria | Maria Silva | maria@example.com | Brazil | DF | Brasilia | 269 | maria | Maria Silva | maria@example.com | Brazil | DF | Brasilia |
270 When I am logged in as "maria" 270 When I am logged in as "maria"
  271 + And I should see "Complete Profile:"
271 And I follow "Logout" 272 And I follow "Logout"
272 And I am logged in as "maria" 273 And I am logged in as "maria"
273 - Then I should see "Percentage incomplete:" 274 + Then I should see "Complete Profile:"
274 275
275 @selenium 276 @selenium
276 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 277 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
@@ -279,12 +280,13 @@ Feature: User Registration @@ -279,12 +280,13 @@ Feature: User Registration
279 | maria | Maria Silva | maria@example.com | Brazil | DF | Brasilia | 280 | maria | Maria Silva | maria@example.com | Brazil | DF | Brasilia |
280 When I am logged in as "maria" 281 When I am logged in as "maria"
281 And I go to /profile/maria 282 And I go to /profile/maria
282 - And I should see "Percentage incomplete:" 283 + And I should see "Complete Profile:"
283 And I click on anything with selector ".hide-incomplete-percentage" 284 And I click on anything with selector ".hide-incomplete-percentage"
  285 + And I should not see "Complete Profile"
284 And I follow "Logout" 286 And I follow "Logout"
285 And I am logged in as "maria" 287 And I am logged in as "maria"
286 And I go to /profile/maria 288 And I go to /profile/maria
287 - Then I should see "Percentage incomplete:" 289 + Then I should see "Complete Profile:"
288 290
289 @selenium 291 @selenium
290 Scenario: When the user logged in and hide link of imcomplete percentage and user update page, the percentage registration link must not appear 292 Scenario: When the user logged in and hide link of imcomplete percentage and user update page, the percentage registration link must not appear
@@ -293,12 +295,13 @@ Feature: User Registration @@ -293,12 +295,13 @@ Feature: User Registration
293 | maria | Maria Silva | maria@example.com | Brazil | DF | Brasilia | 295 | maria | Maria Silva | maria@example.com | Brazil | DF | Brasilia |
294 When I am logged in as "maria" 296 When I am logged in as "maria"
295 And I go to /profile/maria 297 And I go to /profile/maria
296 - And I should see "Percentage incomplete:" 298 + And I should see "Complete Profile"
297 And I click on anything with selector ".hide-incomplete-percentage" 299 And I click on anything with selector ".hide-incomplete-percentage"
298 - And I should not see "Percentage incomplete:" 300 + And I should not see "Complete Profile"
299 And I go to /myprofile/maria/profile_editor/edit 301 And I go to /myprofile/maria/profile_editor/edit
  302 + And I should not see "Complete Profile"
300 And I go to /profile/maria 303 And I go to /profile/maria
301 - Then I should not see "Percentage incomplete:" 304 + Then I should not see "Complete Profile"
302 305
303 @selenium-fixme 306 @selenium-fixme
304 Scenario: When the user press incomplete percentage link,he must be redirect to his edit profile page 307 Scenario: When the user press incomplete percentage link,he must be redirect to his edit profile page
@@ -306,5 +309,5 @@ Feature: User Registration @@ -306,5 +309,5 @@ Feature: User Registration
306 | login | name | email | country | state | city | 309 | login | name | email | country | state | city |
307 | maria | Maria Silva | maria@example.com | Brazil | DF | Brasilia | 310 | maria | Maria Silva | maria@example.com | Brazil | DF | Brasilia |
308 When I am logged in as "maria" 311 When I am logged in as "maria"
309 - And I follow "Percentage incomplete: 72 %" 312 + And I follow "Complete your profile"
310 Then I should see "Profile settings" 313 Then I should see "Profile settings"
test/functional/mpog_software_plugin_controller_test.rb
@@ -95,6 +95,16 @@ class MpogSoftwarePluginControllerTest &lt; ActionController::TestCase @@ -95,6 +95,16 @@ class MpogSoftwarePluginControllerTest &lt; ActionController::TestCase
95 assert_equal "name;acronym;demonstration_url;e_arq;e_mag;e_ping;features;icp_brasil;objectives;operating_platform\n", @response.body 95 assert_equal "name;acronym;demonstration_url;e_arq;e_mag;e_ping;features;icp_brasil;objectives;operating_platform\n", @response.body
96 end 96 end
97 97
  98 + should "hide registration incomplete message" do
  99 + xhr :get, :hide_registration_incomplete_percentage, :hide=>true
  100 + assert_equal "true", @response.body
  101 + end
  102 +
  103 + should "not hide registration incomplete message" do
  104 + xhr :get, :hide_registration_incomplete_percentage, :hide=>false
  105 + assert_equal "false", @response.body
  106 + end
  107 +
98 108
99 private 109 private
100 110