Commit 1a13685cc1d3d01b112859a5c6ef3fe75a1f5365

Authored by Braulio Bhavamitra
1 parent 414bafe6

categories_block: Elements are not clickable on blocks edition

So use the block at the environment page
features/categories_block.feature
... ... @@ -44,6 +44,7 @@ Feature: categories_block
44 44 And I follow "Edit" within ".block-outer .categories-block"
45 45 And I check "Product"
46 46 And I press "Save"
  47 + And I go to /
47 48 Then I should see "Food"
48 49 And I should see "Book"
49 50 And "Vegetarian" should not be visible within "span#category-name"
... ... @@ -62,6 +63,7 @@ Feature: categories_block
62 63 And I follow "Edit" within ".block-outer .categories-block"
63 64 And I check "Product"
64 65 And I press "Save"
  66 + And I go to /
65 67 Then I should see "Book"
66 68 And "Literature" should not be visible within "span#category-name"
67 69 When I follow "block_2_category_2"
... ...
features/step_definitions/web_steps.rb
... ... @@ -7,7 +7,7 @@
7 7  
8 8 require 'uri'
9 9 require 'cgi'
10   -require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
  10 +require_relative '../support/paths'
11 11  
12 12 module WithinHelpers
13 13 def with_scope(locator)
... ...
features/support/env.rb
... ... @@ -65,5 +65,13 @@ Before do
65 65 fixtures_folder = Rails.root.join('test', 'fixtures')
66 66 fixtures = ['environments', 'roles']
67 67 ActiveRecord::Fixtures.create_fixtures(fixtures_folder, fixtures)
  68 +
  69 + # The same browser session is used across tests, so expire caching
  70 + # can create changes from scenario to another.
  71 + e=Environment.default
  72 + e.home_cache_in_minutes = 0
  73 + e.general_cache_in_minutes = 0
  74 + e.profile_cache_in_minutes = 0
  75 + e.save
68 76 end
69 77  
... ...