From 09bb0ac29c2c3bdc6e0c3eb17909ed23ae4b4aae Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Thu, 3 Oct 2013 15:40:35 -0300 Subject: [PATCH] solr: enable solr to run its features tests --- features/plugins.feature | 10 +++++----- features/search_communities.feature | 1 + features/step_definitions/plugin_steps.rb | 1 + plugins/solr/features/search_contents.feature | 1 + plugins/solr/features/search_enterprises.feature | 2 ++ plugins/solr/features/search_people.feature | 1 + plugins/solr/features/search_products.feature | 1 + 7 files changed, 12 insertions(+), 5 deletions(-) diff --git a/features/plugins.feature b/features/plugins.feature index a40b898..902224c 100644 --- a/features/plugins.feature +++ b/features/plugins.feature @@ -22,27 +22,27 @@ Feature: plugins | profile_tabs | lambda { {:title => 'Test plugin tab', :id => 'test_plugin', :content => lambda {'Test plugin random content'} } } | Scenario: a user must see the plugin\'s button in the control panel if the plugin is enabled - Given plugin TestPlugin is enabled on environment + Given plugin Test is enabled on environment And I go to joaosilva's control panel Then I should see "Test plugin button" Scenario: a user must see the plugin\'s tab in in the profile if the plugin is enabled - Given plugin TestPlugin is enabled on environment + Given plugin Test is enabled on environment And I am on joaosilva's profile Then I should see "Test plugin tab" Scenario: a user must not see the plugin\'s button in the control panel if the plugin is disabled - Given plugin TestPlugin is disabled on environment + Given plugin Test is disabled on environment And I go to joaosilva's control panel Then I should not see "Test plugin button" Scenario: a user must not see the plugin\'s tab in in the profile if the plugin is disabled - Given plugin TestPlugin is disabled on environment + Given plugin Test is disabled on environment And I am on joaosilva's profile Then I should not see "Test plugin tab" Scenario: an admin should be able to deactivate a plugin - Given plugin TestPlugin is enabled on environment + Given plugin Test is enabled on environment And I am logged in as admin When I go to admin_user's control panel Then I should see "Test plugin button" diff --git a/features/search_communities.feature b/features/search_communities.feature index 1467f77..27dc1fd 100644 --- a/features/search_communities.feature +++ b/features/search_communities.feature @@ -5,6 +5,7 @@ Feature: search communities Background: Given the following category + And plugin Solr is enabled on environment | name | | social network | And the following community diff --git a/features/step_definitions/plugin_steps.rb b/features/step_definitions/plugin_steps.rb index 1052822..e0253eb 100644 --- a/features/step_definitions/plugin_steps.rb +++ b/features/step_definitions/plugin_steps.rb @@ -23,6 +23,7 @@ end Given /^plugin (.+) is (enabled|disabled) on environment$/ do |plugin, status| e = Environment.default + plugin = "#{plugin}Plugin" if status == 'enabled' e.enabled_plugins += [plugin] else diff --git a/plugins/solr/features/search_contents.feature b/plugins/solr/features/search_contents.feature index b4cbbfd..cbdf8f9 100644 --- a/plugins/solr/features/search_contents.feature +++ b/plugins/solr/features/search_contents.feature @@ -5,6 +5,7 @@ Feature: search contents Background: Given the search index is empty + And plugin Solr is enabled on environment And the following users Given the following users | login | name | diff --git a/plugins/solr/features/search_enterprises.feature b/plugins/solr/features/search_enterprises.feature index ed6b99a..4105dc5 100644 --- a/plugins/solr/features/search_enterprises.feature +++ b/plugins/solr/features/search_enterprises.feature @@ -5,6 +5,7 @@ Feature: search enterprises Background: Given the search index is empty + And plugin Solr is enabled on environment And the following enterprises | identifier | name | img | | shop1 | Shoes shop | shoes | @@ -12,6 +13,7 @@ Feature: search enterprises And the following categories as facets | name | | Temáticas | + Scenario: see default facets when searching When I go to the search enterprises page And I fill in "search-input" with "shoes" diff --git a/plugins/solr/features/search_people.feature b/plugins/solr/features/search_people.feature index 4f6d886..fa959ad 100644 --- a/plugins/solr/features/search_people.feature +++ b/plugins/solr/features/search_people.feature @@ -5,6 +5,7 @@ Feature: search people Background: Given the search index is empty + And plugin Solr is enabled on environment And the following users | login | name | | joaosilva | Joao Silva | diff --git a/plugins/solr/features/search_products.feature b/plugins/solr/features/search_products.feature index 0fb76ca..55eb9c8 100644 --- a/plugins/solr/features/search_products.feature +++ b/plugins/solr/features/search_products.feature @@ -5,6 +5,7 @@ Feature: search products Background: Given the search index is empty + And plugin Solr is enabled on environment And feature "disable_asset_products" is disabled on environment And the following enterprises | identifier | name | -- libgit2 0.21.2