Commit 95b8e8295ff01558e731dd469d2663f447eadbf5

Authored by Fabio Teixeira
1 parent d5595b30
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

Fix cucumber/selenium tests

Signed-off-by: David Carlos <ddavidcarlos1392@gmail.com>
Signed-off-by: Fabio Teixeira <fabio1079@gmail.com>
features/software_catalog_block.feature
1 -Feature:Search catalogued software 1 +Feature:Search catalogued software
2 As a user 2 As a user
3 I want to be able to search catalogued software 3 I want to be able to search catalogued software
4 So that I find a software that fit my needs 4 So that I find a software that fit my needs
@@ -8,18 +8,24 @@ Feature:Search catalogued software @@ -8,18 +8,24 @@ Feature:Search catalogued software
8 And I go to /admin/plugins 8 And I go to /admin/plugins
9 And I check "MpogSoftwarePlugin" 9 And I check "MpogSoftwarePlugin"
10 And I press "Save changes" 10 And I press "Save changes"
11 - And I go to /admin/environment_design  
12 - And I follow "Add a block"  
13 - And I choose "Search Softwares catalog"  
14 - And I press "Add"  
15 And I go to /account/logout 11 And I go to /account/logout
  12 + And the following blocks
  13 + | owner | type |
  14 + | environment | SearchCatalogBlock |
  15 + And the following softwares
  16 + | name | public_software |
  17 + | Public Software | true |
  18 + | Generic Software | false |
16 And the following users 19 And the following users
17 | login | name | email | 20 | login | name | email |
18 | joaosilva | Joao Silva | joaosilva@example.com | 21 | joaosilva | Joao Silva | joaosilva@example.com |
19 And I am logged in as "joaosilva" 22 And I am logged in as "joaosilva"
20 23
21 -  
22 Scenario: successfull search 24 Scenario: successfull search
23 - Given I go to homepage 25 + Given I go to /search/software_infos
  26 + And I should see "Public Software"
  27 + And I should see "Generic Software"
  28 + And I fill in "search-input" with "Generic"
24 And I press "Search" 29 And I press "Search"
25 - Then I should see "Software Catalog" 30 + And I should see "Generic Software"
  31 + Then I should not see "Public Software"
features/software_registration.feature
@@ -59,20 +59,16 @@ Feature: edit public software information @@ -59,20 +59,16 @@ Feature: edit public software information
59 And I follow "New language" 59 And I follow "New language"
60 And I type in "py" into autocomplete list "language_autocomplete" and I choose "Python" 60 And I type in "py" into autocomplete list "language_autocomplete" and I choose "Python"
61 And I fill in "language__version" with "1.2.3" 61 And I fill in "language__version" with "1.2.3"
62 - And I fill in "language__operating_system" with "Unix"  
63 And I follow "New Database" 62 And I follow "New Database"
64 And I type in "my" into autocomplete list "database_autocomplete" and I choose "MySQL" 63 And I type in "my" into autocomplete list "database_autocomplete" and I choose "MySQL"
65 And I fill in "database__version" with "4.5.6" 64 And I fill in "database__version" with "4.5.6"
66 - And I fill in "database__operating_system" with "Unix"  
67 Then I press "Save" 65 Then I press "Save"
68 And I follow "Software Info" 66 And I follow "Software Info"
69 And I follow "Specifications" 67 And I follow "Specifications"
70 And selector ".language_autocomplete" should have any "Python" 68 And selector ".language_autocomplete" should have any "Python"
71 And selector "#language__version" should have any "1.2.3" 69 And selector "#language__version" should have any "1.2.3"
72 - And selector "#language__operating_system" should have any "Unix"  
73 And selector ".database_autocomplete" should have any "MySQL" 70 And selector ".database_autocomplete" should have any "MySQL"
74 And selector "#database__version" should have any "4.5.6" 71 And selector "#database__version" should have any "4.5.6"
75 - And selector "#database__operating_system" should have any "Unix"  
76 72
77 @selenium 73 @selenium
78 Scenario: Message second step of creation in edit software community 74 Scenario: Message second step of creation in edit software community
features/step_definitions/mpog_steps.rb
@@ -120,6 +120,7 @@ Given /^the following softwares$/ do |table| @@ -120,6 +120,7 @@ Given /^the following softwares$/ do |table|
120 software_info.objectives = item[:objectives] if item[:objectives] 120 software_info.objectives = item[:objectives] if item[:objectives]
121 software_info.features = item[:features] if item[:features] 121 software_info.features = item[:features] if item[:features]
122 software_info.public_software = item[:public_software] == "true" if item[:public_software] 122 software_info.public_software = item[:public_software] == "true" if item[:public_software]
  123 + software_info.license_info = LicenseInfo.create :version=>"GPL - 1.0"
123 124
124 if item[:software_language] 125 if item[:software_language]
125 programming_language = ProgrammingLanguage.where(:name=>item[:software_language]).first 126 programming_language = ProgrammingLanguage.where(:name=>item[:software_language]).first