Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions spec/support/axe_core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,14 @@ def check_accessibility(a11y_skip:)

RSpec.configure do |config|
config.include(AccessibilityOverrides, type: :system)

# axe-core-api shrinks the Selenium page_load timeout to 1s while it runs
# (lib/axe/api/run.rb), which intermittently fails under CI load with
# "Navigation timed out after 1000 ms". Neutralize the setter so it can't.
# https://github.com/dequelabs/axe-core-gems/issues/386
config.before(:each, type: :system) do
page.driver.browser.manage.timeouts.instance_eval do
def page_load=(*); end
end
end
end
2 changes: 1 addition & 1 deletion spec/support/capybara.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using = ENV.fetch("DRIVER", :firefox).to_sym

RSpec.configure do |config|
config.before(:each, type: :system) do
config.prepend_before(:each, type: :system) do
driven_by(:selenium, using:) do |driver|
driver.add_preference("browser.download.folderList", 2)
driver.add_preference("browser.download.manager.showWhenStarting", false)
Expand Down
Loading