teamcapybara / capybara

Acceptance test framework for web applications

Home Page:http://teamcapybara.github.io/capybara/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tests Fail in CI with 'visit' Method but Pass Locally

davideluque opened this issue · comments

Meta

Capybara Version:
3.40.0

Driver Information (and browser if relevant):
selenium-webdriver (4.11.0) with headless-chrome


I'm encountering a strange issue where my tests pass when run on my local machine, but fail when executed in the continuous integration (CI) environment. I'm working with GitHub Actions, utilizing the ubuntu-latest runner and Node 20. My development environment is on a Mac with an M1 chip, running the same version of Node.

Locally, my tests pass when using the visit method. However, in the CI environment, these tests only pass if I replace visit with click_link.

The screenshots from the CI runs suggest that the visit command isn't functioning as expected—it seems as though the command isn't being executed at all.

Not a lot to go on here. I don't even really know how you would swap visit with click_link since one requires being passed a url and the other an element on the page. most likely it's a case of you not visiting the correct hostname but without any examples, test code, etc no way to say.