Commit bbf5a17bb5c12276ffd82076bae645b7a8979e95

Authored by Luciano Prestes
1 parent f405dad8
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

Cucumber tests

- Only environment admin can change a generic software to a public software
	- Show Adherent fields only to public software

Signed-off-by: David Carlos <ddavidcarlos1392@gmail.com>
Signed-off-by: Luciano Prestes <lucianopcbr@gmail.com>
Showing 1 changed file with 45 additions and 0 deletions   Show diff stats
features/public_software_validation.feature 0 → 100644
... ... @@ -0,0 +1,45 @@
  1 +Feature: edit adherent fields
  2 + As a user
  3 + I want to edit adherent fields
  4 + to mantain my public software up to date.
  5 +
  6 + Background:
  7 + Given "MpogSoftwarePlugin" plugin is enabled
  8 + And the following users
  9 + | login | name | email |
  10 + | joaosilva | Joao Silva | joaosilva@example.com |
  11 + | mariasilva | Maria Silva | mariasilva@example.com |
  12 + And SoftwareInfo has initial default values on database
  13 + And I am logged in as mpog_admin
  14 + And I go to /admin/plugins
  15 + And I check "MpogSoftwarePlugin"
  16 + And I press "Save changes"
  17 + And I go to /myprofile/mpog-admin
  18 + And I follow "Create a new software"
  19 + And I fill in "community_name" with "basic software"
  20 + And I fill in "software_info_finality" with "basic software finality"
  21 + And I press "Create"
  22 +
  23 + Scenario: Don't show public software checkbox to no enviroment admin
  24 + Given I am logged in as "joaosilva"
  25 + And I go to /myprofile/basic-software/plugin/mpog_software/edit_software
  26 + And I follow "Specifications"
  27 + Then I should not see "Is a public software"
  28 +
  29 + Scenario: Show public software checkbox no enviroment admin
  30 + Given I am logged in as mpog_admin
  31 + And I go to /myprofile/basic-software/plugin/mpog_software/edit_software
  32 + And I follow "Specifications"
  33 + Then I should see "Is a public software"
  34 +
  35 + Scenario: Show adherent fields when checkbox are checked
  36 + Given I am logged in as mpog_admin
  37 + And I go to /myprofile/basic-software/plugin/mpog_software/edit_software
  38 + And I follow "Specifications"
  39 + And I check "software[public_software]"
  40 + And I press "Save"
  41 + And I go to /myprofile/basic-software/plugin/mpog_software/edit_software
  42 + And I follow "Specifications"
  43 + Then I should see "Adherent to e-ping ?"
  44 +
  45 +
... ...