From 95b8e8295ff01558e731dd469d2663f447eadbf5 Mon Sep 17 00:00:00 2001 From: Fabio Teixeira Date: Tue, 6 Jan 2015 15:11:42 -0200 Subject: [PATCH] Fix cucumber/selenium tests --- features/software_catalog_block.feature | 22 ++++++++++++++-------- features/software_registration.feature | 4 ---- features/step_definitions/mpog_steps.rb | 1 + 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/features/software_catalog_block.feature b/features/software_catalog_block.feature index bde6022..7817df8 100644 --- a/features/software_catalog_block.feature +++ b/features/software_catalog_block.feature @@ -1,4 +1,4 @@ -Feature:Search catalogued software +Feature:Search catalogued software As a user I want to be able to search catalogued software So that I find a software that fit my needs @@ -8,18 +8,24 @@ Feature:Search catalogued software And I go to /admin/plugins And I check "MpogSoftwarePlugin" And I press "Save changes" - And I go to /admin/environment_design - And I follow "Add a block" - And I choose "Search Softwares catalog" - And I press "Add" And I go to /account/logout + And the following blocks + | owner | type | + | environment | SearchCatalogBlock | + And the following softwares + | name | public_software | + | Public Software | true | + | Generic Software | false | And the following users | login | name | email | | joaosilva | Joao Silva | joaosilva@example.com | And I am logged in as "joaosilva" - Scenario: successfull search - Given I go to homepage + Given I go to /search/software_infos + And I should see "Public Software" + And I should see "Generic Software" + And I fill in "search-input" with "Generic" And I press "Search" - Then I should see "Software Catalog" + And I should see "Generic Software" + Then I should not see "Public Software" diff --git a/features/software_registration.feature b/features/software_registration.feature index 852dd79..4e61694 100644 --- a/features/software_registration.feature +++ b/features/software_registration.feature @@ -59,20 +59,16 @@ Feature: edit public software information And I follow "New language" And I type in "py" into autocomplete list "language_autocomplete" and I choose "Python" And I fill in "language__version" with "1.2.3" - And I fill in "language__operating_system" with "Unix" And I follow "New Database" And I type in "my" into autocomplete list "database_autocomplete" and I choose "MySQL" And I fill in "database__version" with "4.5.6" - And I fill in "database__operating_system" with "Unix" Then I press "Save" And I follow "Software Info" And I follow "Specifications" And selector ".language_autocomplete" should have any "Python" And selector "#language__version" should have any "1.2.3" - And selector "#language__operating_system" should have any "Unix" And selector ".database_autocomplete" should have any "MySQL" And selector "#database__version" should have any "4.5.6" - And selector "#database__operating_system" should have any "Unix" @selenium Scenario: Message second step of creation in edit software community diff --git a/features/step_definitions/mpog_steps.rb b/features/step_definitions/mpog_steps.rb index dd609e7..e23ad0b 100644 --- a/features/step_definitions/mpog_steps.rb +++ b/features/step_definitions/mpog_steps.rb @@ -120,6 +120,7 @@ Given /^the following softwares$/ do |table| software_info.objectives = item[:objectives] if item[:objectives] software_info.features = item[:features] if item[:features] software_info.public_software = item[:public_software] == "true" if item[:public_software] + software_info.license_info = LicenseInfo.create :version=>"GPL - 1.0" if item[:software_language] programming_language = ProgrammingLanguage.where(:name=>item[:software_language]).first -- libgit2 0.21.2