Files
openfoodnetwork/spec/system_helper.rb
Gaetan Craig-Riou 94fb1397f0 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
2023-12-22 13:20:14 +01:00

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 }