From dea2697e5b46b2d360bde97c4e45e946467f4287 Mon Sep 17 00:00:00 2001 From: Cameron Dutro Date: Thu, 19 Oct 2023 13:11:01 -0700 Subject: [PATCH] Attempt to fix Ferrum timeout errors (#1877) * Attempt to fix Ferrum timeout errors * Add CHANGELOG entry; fix linting issues --- docs/CHANGELOG.md | 8 ++++++-- test/sandbox/test/view_component_system_test.rb | 2 +- test/test_helper.rb | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 1bdee95b4..4e38e7784 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -18,13 +18,17 @@ nav_order: 5 *Alexandre Ignjatovic* +* Improve docs about inline templates interpolation. + + *Hans Lemuet* + * Update generators.md to clarify the way of changing `config.view_component.view_component_path`. *Shozo Hatta* -* Improve docs about inline templates interpolation +* Attempt to fix Ferrum timeout errors by creating driver with unique name. - *Hans Lemuet* + *Cameron Dutro* ## 3.6.0 diff --git a/test/sandbox/test/view_component_system_test.rb b/test/sandbox/test/view_component_system_test.rb index 086f54b12..067c345fe 100644 --- a/test/sandbox/test/view_component_system_test.rb +++ b/test/sandbox/test/view_component_system_test.rb @@ -3,7 +3,7 @@ require "test_helper" class ViewComponentSystemTest < ViewComponent::SystemTestCase - driven_by :cuprite + driven_by :vc_cuprite def test_simple_js_interaction_in_browser_without_layout with_rendered_component_path(render_inline(SimpleJavascriptInteractionWithJsIncludedComponent.new)) do |path| diff --git a/test/test_helper.rb b/test/test_helper.rb index 6528bdb12..aa7a61584 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -40,7 +40,9 @@ def self.warn(message) require "capybara/cuprite" -Capybara.register_driver(:cuprite) do |app| +# Rails registers its own driver named "cuprite" which will overwrite the one we +# register here. Avoid the problem by registering the driver with a distinct name. +Capybara.register_driver(:vc_cuprite) do |app| # Add the process_timeout option to prevent failures due to the browser # taking too long to start up. Capybara::Cuprite::Driver.new(app, {process_timeout: 60, timeout: 30})