Commit 95b8e8295ff01558e731dd469d2663f447eadbf5

Authored by Fabio Teixeira
1 parent d5595b30

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