From c3b0fac895a30c88a159c5e6f6d9badc94953f08 Mon Sep 17 00:00:00 2001 From: Fabio Teixeira Date: Thu, 5 Mar 2015 11:50:09 -0300 Subject: [PATCH] Fix finality error on selenium tests --- features/public_software_validation.feature | 10 ++++------ features/software_block.feature | 6 +++--- features/software_catalog.feature | 8 ++++---- features/software_registration.feature | 4 ++-- features/step_definitions/software_communities_steps.rb | 1 + 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/features/public_software_validation.feature b/features/public_software_validation.feature index 26565df..8cdc7a5 100644 --- a/features/public_software_validation.feature +++ b/features/public_software_validation.feature @@ -9,16 +9,14 @@ Feature: edit adherent fields | login | name | email | | joaosilva | Joao Silva | joaosilva@example.com | | mariasilva | Maria Silva | mariasilva@example.com | + And the following softwares + | name | public_software | finality | + | basic software | true | basic software finality | And SoftwareInfo has initial default values on database And I am logged in as mpog_admin And I go to /admin/plugins And I check "SoftwareCommunitiesPlugin" - And I press "Save changes" - And I go to /myprofile/mpog-admin - And I follow "Create a new software" - And I fill in "community_name_id" with "basic software" - And I fill in "software_info_finality" with "basic software finality" - And I press "Create" + Then I press "Save changes" Scenario: Disable public software checkbox to non admin users Given I am logged in as "joaosilva" diff --git a/features/software_block.feature b/features/software_block.feature index 1b5c7d0..1f8cf8b 100644 --- a/features/software_block.feature +++ b/features/software_block.feature @@ -10,9 +10,9 @@ Feature: edit adherent fields And I check "SoftwareCommunitiesPlugin" And I press "Save changes" And the following softwares - | name | public_software | - | Public Software | true | - | Generic Software | false | + | name | public_software | finality | + | Public Software | true | some finality | + | Generic Software | false | some finality | Scenario: Add software block Given I am logged in as mpog_admin diff --git a/features/software_catalog.feature b/features/software_catalog.feature index 9e029e1..02acc7a 100644 --- a/features/software_catalog.feature +++ b/features/software_catalog.feature @@ -17,10 +17,10 @@ Feature: Search software | Software | Health | true | | Software | Education | true | And the following softwares - | name | public_software | categories | - | Software One | true | Health | - | Software Two | true | Health, Education | - | Software Three | false | Education | + | name | public_software | categories | finality | + | Software One | true | Health | some finality | + | Software Two | true | Health, Education | some finality | + | Software Three | false | Education | some finality | Scenario: Show all "public_software" softwares when open search page diff --git a/features/software_registration.feature b/features/software_registration.feature index 61cbcfc..65ee0e0 100644 --- a/features/software_registration.feature +++ b/features/software_registration.feature @@ -74,8 +74,8 @@ Feature: edit public software information @selenium Scenario: Message second step of creation in edit software community Given the following softwares - | name | - | New Software | + | name | finality | + | New Software | some finality | And I go to /myprofile/new-software/profile_editor/edit Then I should see "Step 2/2 - Software Community Configuration" And I go to /myprofile/new-software/profile_editor/edit diff --git a/features/step_definitions/software_communities_steps.rb b/features/step_definitions/software_communities_steps.rb index 168ed32..12e1897 100644 --- a/features/step_definitions/software_communities_steps.rb +++ b/features/step_definitions/software_communities_steps.rb @@ -130,6 +130,7 @@ Given /^the following softwares$/ do |table| software_info = SoftwareInfo.new software_info.community = Community.create(:name=>item[:name]) + software_info.finality = item[:finality] if item[:finality] software_info.acronym = item[:acronym] if item[:acronym] software_info.finality = item[:finality] if item[:finality] software_info.finality ||= "something" -- libgit2 0.21.2