Commit 0f28f08f3430cfeef5358500e8584472a009ad20

Authored by Gabriela Navarro
2 parents e0c02120 6159a8c2
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

Merge branch 'master' of gitlab.com:softwarepublico/mpog_software

features/deactivate_user.feature 0 → 100644
@@ -0,0 +1,45 @@ @@ -0,0 +1,45 @@
  1 +Feature: deactivate user
  2 + As a environment admin
  3 + I want to be able deactivate my account
  4 + So that user data remains persisted and allows the reactivation of the account
  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 I go to /account/logout
  13 + And the following users
  14 + | login | name | email |
  15 + | joaosilva | Joao Silva | joaosilva@example.com |
  16 + And I am logged in as "joaosilva"
  17 +
  18 +
  19 + @selenium-fixme
  20 + Scenario: successfull deactivation
  21 + Given I go to joaosilva's control panel
  22 + And I follow "Edit Profile"
  23 + And I follow "Delete profile"
  24 + And I follow "Yes, I am sure"
  25 + Then I am not logged in
  26 + When I go to /profile/joaosilva
  27 + Then I should see "This profile is inaccessible."
  28 +
  29 + @selenium-fixme
  30 + Scenario: successfull reactivation of account
  31 + Given I go to joaosilva's control panel
  32 + And I follow "Edit Profile"
  33 + And I follow "Delete profile"
  34 + And I follow "Yes, I am sure"
  35 + And I go to the homepage
  36 + When I follow "Login"
  37 + And I follow "New user"
  38 + And I fill in the following within ".no-boxes":
  39 + | e-Mail | joaosilva@example.com |
  40 + | Full name | 123 |
  41 + And I follow "Reactive account"
  42 + And I fill in the following within ".no-boxes":
  43 + | Username or Email | joaosilva@example.com |
  44 + And I press "Send instructions"
  45 + Then I should see "An e-mail was just sent to your e-mail address"
features/logic_delete.feature
@@ -1,44 +0,0 @@ @@ -1,44 +0,0 @@
1 -Feature: deactivate user  
2 - As a user  
3 - I want to deactivate my account  
4 - So I can reactivate my account later  
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 I go to /account/logout  
13 - And the following users  
14 - | login | name | email |  
15 - | joaosilva | Joao Silva | joaosilva@example.com |  
16 - And I am logged in as "joaosilva"  
17 -  
18 -@selenium  
19 - Scenario: successfull deactivation  
20 - Given I go to joaosilva's control panel  
21 - And I follow "Edit Profile"  
22 - And I follow "Delete profile"  
23 - And I follow "Yes, I am sure"  
24 - Then I am not logged in  
25 - When I go to /profile/joaosilva  
26 - Then I should see "This profile is inaccessible."  
27 -  
28 -@selenium  
29 - Scenario: successfull reactivation of account  
30 - Given I go to joaosilva's control panel  
31 - And I follow "Edit Profile"  
32 - And I follow "Delete profile"  
33 - And I follow "Yes, I am sure"  
34 - And I go to the homepage  
35 - When I follow "Login"  
36 - And I follow "New user"  
37 - And I fill in the following within ".no-boxes":  
38 - | e-Mail | joaosilva@example.com |  
39 - | Full name | 123 |  
40 - And I follow "Reactive account"  
41 - And I fill in the following within ".no-boxes":  
42 - | Username or Email | joaosilva@example.com |  
43 - And I press "Send instructions"  
44 - Then I should see "An e-mail was just sent to your e-mail address"  
lib/mpog_software_plugin.rb
@@ -189,7 +189,7 @@ class MpogSoftwarePlugin < Noosfero::Plugin @@ -189,7 +189,7 @@ class MpogSoftwarePlugin < Noosfero::Plugin
189 end 189 end
190 190
191 def manage_software 191 def manage_software
192 - [{:title => _('Manage Software'), :url => {:controller => 'mpog_software_plugin', :action => 'archive_software'}}] 192 + [{:title => _('Manage Software'), :url => {:controller => 'mpog_software_plugin', :action => 'archive_software'}}]
193 end 193 end
194 194
195 protected 195 protected
@@ -279,10 +279,6 @@ class MpogSoftwarePlugin < Noosfero::Plugin @@ -279,10 +279,6 @@ class MpogSoftwarePlugin < Noosfero::Plugin
279 context.profile.software_info.save! 279 context.profile.software_info.save!
280 end 280 end
281 281
282 - def manage_software  
283 - [{:title => _('Manage Software'), :url => {:controller => 'mpog_software_plugin_myprofile', :action => 'new_software'}}]  
284 - end  
285 -  
286 def language_transaction 282 def language_transaction
287 SoftwareLanguage.transaction do 283 SoftwareLanguage.transaction do
288 list_language = SoftwareLanguageHelper.list_language(context.params[:language]) 284 list_language = SoftwareLanguageHelper.list_language(context.params[:language])