mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-03 06:59:14 +00:00
Clean up some comments
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
# spec/system/support/better_rails_system_tests.rb
|
||||
|
||||
module BetterRailsSystemTests
|
||||
# Use our `Capybara.save_path` to store screenshots with other capybara artifacts
|
||||
# (Rails screenshots path is not configurable https://github.com/rails/rails/blob/49baf092439fc74fc3377b12e3334c3dd9d0752f/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#L79)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# spec/system/support/capybara_setup.rb
|
||||
|
||||
# Usually, especially when using Selenium, developers tend to increase the max wait time.
|
||||
# With Cuprite, there is no need for that.
|
||||
# We use a Capybara default value here explicitly.
|
||||
@@ -14,8 +12,6 @@ Capybara.default_normalize_ws = true
|
||||
# It could be useful to be able to configure this path from the outside (e.g., on CI).
|
||||
Capybara.save_path = ENV.fetch("CAPYBARA_ARTIFACTS", "./tmp/capybara")
|
||||
|
||||
# spec/system/support/capybara_setup.rb
|
||||
|
||||
Capybara.singleton_class.prepend(Module.new do
|
||||
attr_accessor :last_used_session
|
||||
|
||||
|
||||
@@ -1,23 +1,14 @@
|
||||
# spec/system/support/cuprite_setup.rb
|
||||
|
||||
# First, load Cuprite Capybara integration
|
||||
require "capybara/cuprite"
|
||||
|
||||
# Then, we need to register our driver to be able to use it later
|
||||
# with #driven_by method.
|
||||
Capybara.register_driver(:cuprite) do |app|
|
||||
Capybara::Cuprite::Driver.new(
|
||||
app,
|
||||
**{
|
||||
window_size: [1200, 800],
|
||||
# See additional options for Dockerized environment in the respective section of this article
|
||||
browser_options: {},
|
||||
# Increase Chrome startup wait time (required for stable CI builds)
|
||||
process_timeout: 20,
|
||||
timeout: 20,
|
||||
# Enable debugging capabilities
|
||||
inspector: true,
|
||||
# Allow running Chrome in a headful mode by setting HEADLESS env
|
||||
headless: true
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user