mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-31 21:37:16 +00:00
Set up data to hide ToS banner
The banner can in some case overlap element we are trying to interact with. Add a fake ToS file and make sure user have accepted the ToS, so that the banner is not shown
This commit is contained in:
committed by
Konrad
parent
8e31e35d5d
commit
94fb1397f0
@@ -22,6 +22,7 @@ FactoryBot.define do
|
||||
|
||||
confirmation_sent_at { '1970-01-01 00:00:00' }
|
||||
confirmed_at { '1970-01-01 00:00:01' }
|
||||
terms_of_service_accepted_at { 1.hour.ago }
|
||||
|
||||
before(:create) do |user, evaluator|
|
||||
if evaluator.confirmation_sent_at
|
||||
|
||||
@@ -2,5 +2,12 @@
|
||||
|
||||
require "base_spec_helper"
|
||||
|
||||
RSpec.configure do |config|
|
||||
# Set up a fake ToS file
|
||||
config.before(:each, type: :system) do
|
||||
allow(TermsOfServiceFile).to receive(:updated_at).and_return(2.hours.ago)
|
||||
end
|
||||
end
|
||||
|
||||
# system/support/ files contain system tests configurations and helpers
|
||||
Dir[File.join(__dir__, "system/support/**/*.rb")].sort.each { |file| require file }
|
||||
|
||||
Reference in New Issue
Block a user