Skip to content

Commit

Permalink
Improved cookies spec by keeping global config values as they were be…
Browse files Browse the repository at this point in the history
…fore the test
  • Loading branch information
luisramos0 committed Sep 1, 2018
1 parent 53e7fcb commit 59f8dd4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spec/features/consumer/cookies_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

feature "Cookies", js: true do
describe "banner" do

# keeps banner toggle config unchanged
around do |example|
original_banner_toggle = Spree::Config[:cookies_consent_banner_toggle]
example.run
Spree::Config[:cookies_consent_banner_toggle] = original_banner_toggle
end

describe "in the homepage" do
before do
Spree::Config[:cookies_consent_banner_toggle] = true
Expand Down Expand Up @@ -52,6 +60,14 @@
end

describe "policy page" do

# keeps config unchanged
around do |example|
original_config_value = Spree::Config[:cookies_policy_matomo_section]
example.run
Spree::Config[:cookies_policy_matomo_section] = original_config_value
end

scenario "showing session_id cookies description with correct instance domain" do
visit '/#/policies/cookies'
expect(page).to have_content('_session_id')
Expand Down

0 comments on commit 59f8dd4

Please sign in to comment.