Skip to content

Commit

Permalink
Attempt to fix Ferrum timeout errors (#1877)
Browse files Browse the repository at this point in the history
* Attempt to fix Ferrum timeout errors

* Add CHANGELOG entry; fix linting issues
  • Loading branch information
camertron authored Oct 19, 2023
1 parent f67155f commit dea2697
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 6 additions & 2 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion test/sandbox/test/view_component_system_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
4 changes: 3 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit dea2697

Please sign in to comment.