Commit 09bb0ac29c2c3bdc6e0c3eb17909ed23ae4b4aae

Authored by Rodrigo Souto
1 parent 64f476b4

solr: enable solr to run its features tests

features/plugins.feature
@@ -22,27 +22,27 @@ Feature: plugins @@ -22,27 +22,27 @@ Feature: plugins
22 | profile_tabs | lambda { {:title => 'Test plugin tab', :id => 'test_plugin', :content => lambda {'Test plugin random content'} } } | 22 | profile_tabs | lambda { {:title => 'Test plugin tab', :id => 'test_plugin', :content => lambda {'Test plugin random content'} } } |
23 23
24 Scenario: a user must see the plugin\'s button in the control panel if the plugin is enabled 24 Scenario: a user must see the plugin\'s button in the control panel if the plugin is enabled
25 - Given plugin TestPlugin is enabled on environment 25 + Given plugin Test is enabled on environment
26 And I go to joaosilva's control panel 26 And I go to joaosilva's control panel
27 Then I should see "Test plugin button" 27 Then I should see "Test plugin button"
28 28
29 Scenario: a user must see the plugin\'s tab in in the profile if the plugin is enabled 29 Scenario: a user must see the plugin\'s tab in in the profile if the plugin is enabled
30 - Given plugin TestPlugin is enabled on environment 30 + Given plugin Test is enabled on environment
31 And I am on joaosilva's profile 31 And I am on joaosilva's profile
32 Then I should see "Test plugin tab" 32 Then I should see "Test plugin tab"
33 33
34 Scenario: a user must not see the plugin\'s button in the control panel if the plugin is disabled 34 Scenario: a user must not see the plugin\'s button in the control panel if the plugin is disabled
35 - Given plugin TestPlugin is disabled on environment 35 + Given plugin Test is disabled on environment
36 And I go to joaosilva's control panel 36 And I go to joaosilva's control panel
37 Then I should not see "Test plugin button" 37 Then I should not see "Test plugin button"
38 38
39 Scenario: a user must not see the plugin\'s tab in in the profile if the plugin is disabled 39 Scenario: a user must not see the plugin\'s tab in in the profile if the plugin is disabled
40 - Given plugin TestPlugin is disabled on environment 40 + Given plugin Test is disabled on environment
41 And I am on joaosilva's profile 41 And I am on joaosilva's profile
42 Then I should not see "Test plugin tab" 42 Then I should not see "Test plugin tab"
43 43
44 Scenario: an admin should be able to deactivate a plugin 44 Scenario: an admin should be able to deactivate a plugin
45 - Given plugin TestPlugin is enabled on environment 45 + Given plugin Test is enabled on environment
46 And I am logged in as admin 46 And I am logged in as admin
47 When I go to admin_user's control panel 47 When I go to admin_user's control panel
48 Then I should see "Test plugin button" 48 Then I should see "Test plugin button"
features/search_communities.feature
@@ -5,6 +5,7 @@ Feature: search communities @@ -5,6 +5,7 @@ Feature: search communities
5 5
6 Background: 6 Background:
7 Given the following category 7 Given the following category
  8 + And plugin Solr is enabled on environment
8 | name | 9 | name |
9 | social network | 10 | social network |
10 And the following community 11 And the following community
features/step_definitions/plugin_steps.rb
@@ -23,6 +23,7 @@ end @@ -23,6 +23,7 @@ end
23 23
24 Given /^plugin (.+) is (enabled|disabled) on environment$/ do |plugin, status| 24 Given /^plugin (.+) is (enabled|disabled) on environment$/ do |plugin, status|
25 e = Environment.default 25 e = Environment.default
  26 + plugin = "#{plugin}Plugin"
26 if status == 'enabled' 27 if status == 'enabled'
27 e.enabled_plugins += [plugin] 28 e.enabled_plugins += [plugin]
28 else 29 else
plugins/solr/features/search_contents.feature
@@ -5,6 +5,7 @@ Feature: search contents @@ -5,6 +5,7 @@ Feature: search contents
5 5
6 Background: 6 Background:
7 Given the search index is empty 7 Given the search index is empty
  8 + And plugin Solr is enabled on environment
8 And the following users 9 And the following users
9 Given the following users 10 Given the following users
10 | login | name | 11 | login | name |
plugins/solr/features/search_enterprises.feature
@@ -5,6 +5,7 @@ Feature: search enterprises @@ -5,6 +5,7 @@ Feature: search enterprises
5 5
6 Background: 6 Background:
7 Given the search index is empty 7 Given the search index is empty
  8 + And plugin Solr is enabled on environment
8 And the following enterprises 9 And the following enterprises
9 | identifier | name | img | 10 | identifier | name | img |
10 | shop1 | Shoes shop | shoes | 11 | shop1 | Shoes shop | shoes |
@@ -12,6 +13,7 @@ Feature: search enterprises @@ -12,6 +13,7 @@ Feature: search enterprises
12 And the following categories as facets 13 And the following categories as facets
13 | name | 14 | name |
14 | Temáticas | 15 | Temáticas |
  16 +
15 Scenario: see default facets when searching 17 Scenario: see default facets when searching
16 When I go to the search enterprises page 18 When I go to the search enterprises page
17 And I fill in "search-input" with "shoes" 19 And I fill in "search-input" with "shoes"
plugins/solr/features/search_people.feature
@@ -5,6 +5,7 @@ Feature: search people @@ -5,6 +5,7 @@ Feature: search people
5 5
6 Background: 6 Background:
7 Given the search index is empty 7 Given the search index is empty
  8 + And plugin Solr is enabled on environment
8 And the following users 9 And the following users
9 | login | name | 10 | login | name |
10 | joaosilva | Joao Silva | 11 | joaosilva | Joao Silva |
plugins/solr/features/search_products.feature
@@ -5,6 +5,7 @@ Feature: search products @@ -5,6 +5,7 @@ Feature: search products
5 5
6 Background: 6 Background:
7 Given the search index is empty 7 Given the search index is empty
  8 + And plugin Solr is enabled on environment
8 And feature "disable_asset_products" is disabled on environment 9 And feature "disable_asset_products" is disabled on environment
9 And the following enterprises 10 And the following enterprises
10 | identifier | name | 11 | identifier | name |