mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-05 07:19:14 +00:00
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
14 lines
400 B
Ruby
14 lines
400 B
Ruby
# frozen_string_literal: true
|
|
|
|
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 }
|