Commit 95b8e8295ff01558e731dd469d2663f447eadbf5
1 parent
d5595b30
Exists in
master
and in
5 other branches
Fix cucumber/selenium tests
Signed-off-by: David Carlos <ddavidcarlos1392@gmail.com> Signed-off-by: Fabio Teixeira <fabio1079@gmail.com>
Showing
3 changed files
with
15 additions
and
12 deletions
Show diff stats
features/software_catalog_block.feature
1 | -Feature:Search catalogued software | |
1 | +Feature:Search catalogued software | |
2 | 2 | As a user |
3 | 3 | I want to be able to search catalogued software |
4 | 4 | So that I find a software that fit my needs |
... | ... | @@ -8,18 +8,24 @@ Feature:Search catalogued software |
8 | 8 | And I go to /admin/plugins |
9 | 9 | And I check "MpogSoftwarePlugin" |
10 | 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 | 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 | 19 | And the following users |
17 | 20 | | login | name | email | |
18 | 21 | | joaosilva | Joao Silva | joaosilva@example.com | |
19 | 22 | And I am logged in as "joaosilva" |
20 | 23 | |
21 | - | |
22 | 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 | 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 | 59 | And I follow "New language" |
60 | 60 | And I type in "py" into autocomplete list "language_autocomplete" and I choose "Python" |
61 | 61 | And I fill in "language__version" with "1.2.3" |
62 | - And I fill in "language__operating_system" with "Unix" | |
63 | 62 | And I follow "New Database" |
64 | 63 | And I type in "my" into autocomplete list "database_autocomplete" and I choose "MySQL" |
65 | 64 | And I fill in "database__version" with "4.5.6" |
66 | - And I fill in "database__operating_system" with "Unix" | |
67 | 65 | Then I press "Save" |
68 | 66 | And I follow "Software Info" |
69 | 67 | And I follow "Specifications" |
70 | 68 | And selector ".language_autocomplete" should have any "Python" |
71 | 69 | And selector "#language__version" should have any "1.2.3" |
72 | - And selector "#language__operating_system" should have any "Unix" | |
73 | 70 | And selector ".database_autocomplete" should have any "MySQL" |
74 | 71 | And selector "#database__version" should have any "4.5.6" |
75 | - And selector "#database__operating_system" should have any "Unix" | |
76 | 72 | |
77 | 73 | @selenium |
78 | 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 | 120 | software_info.objectives = item[:objectives] if item[:objectives] |
121 | 121 | software_info.features = item[:features] if item[:features] |
122 | 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 | 125 | if item[:software_language] |
125 | 126 | programming_language = ProgrammingLanguage.where(:name=>item[:software_language]).first | ... | ... |