diff --git a/features/categories_block.feature b/features/categories_block.feature index 8801e19..9929de8 100644 --- a/features/categories_block.feature +++ b/features/categories_block.feature @@ -44,6 +44,7 @@ Feature: categories_block And I follow "Edit" within ".block-outer .categories-block" And I check "Product" And I press "Save" + And I go to / Then I should see "Food" And I should see "Book" And "Vegetarian" should not be visible within "span#category-name" @@ -62,6 +63,7 @@ Feature: categories_block And I follow "Edit" within ".block-outer .categories-block" And I check "Product" And I press "Save" + And I go to / Then I should see "Book" And "Literature" should not be visible within "span#category-name" When I follow "block_2_category_2" diff --git a/features/step_definitions/web_steps.rb b/features/step_definitions/web_steps.rb index c6ca511..3142389 100644 --- a/features/step_definitions/web_steps.rb +++ b/features/step_definitions/web_steps.rb @@ -7,7 +7,7 @@ require 'uri' require 'cgi' -require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths")) +require_relative '../support/paths' module WithinHelpers def with_scope(locator) diff --git a/features/support/env.rb b/features/support/env.rb index db70813..0c85ef5 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -65,5 +65,13 @@ Before do fixtures_folder = Rails.root.join('test', 'fixtures') fixtures = ['environments', 'roles'] ActiveRecord::Fixtures.create_fixtures(fixtures_folder, fixtures) + + # The same browser session is used across tests, so expire caching + # can create changes from scenario to another. + e=Environment.default + e.home_cache_in_minutes = 0 + e.general_cache_in_minutes = 0 + e.profile_cache_in_minutes = 0 + e.save end -- libgit2 0.21.2