New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System tests not working on Rails 7.1.3 running on a remote machine/docker container. #50827
Comments
Hi @srabuini thanks for your explanation in detail, I ran into the same issue with upgrading to Rails 7.1.3 / ruby 3.2.3 and was able to continue working with test:system by the hack commenting out line 19 @browser.preload 👍 |
This issue sounds similar to what was reported in #47706, could you try that and see if it resolves your issue? I could be wrong, but I don't think you need to patch rails, you should be able to update the args you are sending to |
@hahmed thanks for investigating, I changed
My original ApplicationSystemTestCase configuration is:
Instead, if I comment out line 19
everything is working. I am not sure, was that the test or what should I try to change? |
Hi @hahmed, it might be similar, but not exactly the same. It changed when the way to find the @muhme I'd fixit with @browser.preload unless @options[:browser] == :remote |
Steps to reproduce
I've been running my system tests using a remote browser (on a docker container) since Rails 7.0 without a problem, with the following set up.
It looks like the problem was introduced in #49908 and related issues/fixes.
I fixed it locally just monkeypatching
Selenium::Webdriver::DriverFinder.path
just to return nil.Having a look at the code, I think that it would be nice to avoid
Browser#preload
when browser is:remote
in:rails/actionpack/lib/action_dispatch/system_testing/driver.rb
Line 19 in 3064d4f
If you think it's the right way to tackle it, I could post a fix.
Actual behavior
After a while, an exception is raised:
System configuration
Rails version: 7.1..3
Ruby version: 3.2.2 (2023-03-30 revision e51014f9c0) [aarch64-linux]
The text was updated successfully, but these errors were encountered: