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