From b1ca2c90ced237ee2783f4056c937a8c9106a228 Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Fri, 10 Feb 2023 11:11:10 +0000 Subject: [PATCH 1/2] Replaces I18n.t() by visible string Removes superfluous js: true --- spec/system/consumer/footer_links_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/system/consumer/footer_links_spec.rb b/spec/system/consumer/footer_links_spec.rb index 35620b1c57..ddbfa5ef5b 100644 --- a/spec/system/consumer/footer_links_spec.rb +++ b/spec/system/consumer/footer_links_spec.rb @@ -2,7 +2,7 @@ require 'system_helper' -describe "Footer Links", js: true do +describe "Footer Links" do describe "policy link" do it "showing" do visit root_path @@ -12,7 +12,7 @@ describe "Footer Links", js: true do it "opens cookies policy page" do visit root_path click_link "cookies policy" - expect(page).to have_content I18n.t('legal.cookies_policy.header') + expect(page).to have_content "How We Use Cookies" end end From 761a6731dbb6f0c86fd1c7021032fb54c4fa8bbc Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Fri, 10 Feb 2023 11:18:07 +0000 Subject: [PATCH 2/2] Sets conctext: asserts within the modal --- spec/system/consumer/footer_links_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/system/consumer/footer_links_spec.rb b/spec/system/consumer/footer_links_spec.rb index ddbfa5ef5b..4685b09895 100644 --- a/spec/system/consumer/footer_links_spec.rb +++ b/spec/system/consumer/footer_links_spec.rb @@ -12,7 +12,9 @@ describe "Footer Links" do it "opens cookies policy page" do visit root_path click_link "cookies policy" - expect(page).to have_content "How We Use Cookies" + within "div.reveal-modal" do + expect(page).to have_content "How We Use Cookies" + end end end