thoughtbot / capybara-webkit

A Capybara driver for headless WebKit to test JavaScript web apps
https://thoughtbot.com/open-source
MIT License
1.97k stars 428 forks source link

Cached React files #1042

Closed bgarr closed 6 years ago

bgarr commented 6 years ago

I am currently working on a project that uses xvfb-run with rspec and Capybara::Webkit. When I set Capybara::Webkit's debug config to true, I can see a React component registry error. The components listed do not reflect the contents of my current registration.jsx file, however; they match an earlier version in my git repository, probably 7-8 versions old. The component works fine when I run the app locally. Is there a way I can flush out whatever cache is holding the older version of the file? I should note that this is in a Docker environment.

bgarr commented 6 years ago

... I have reinstalled Docker and rebuilt/re-pulled all of my docker container images, and the same problem persists.

bgarr commented 6 years ago

... also applying ReactOnRails config, per https://shakacode.gitbooks.io/react-on-rails/content/docs/additional-reading/rspec-configuration.html

twalpole commented 6 years ago

I don't see how this could be a capybara-webkit caching issue, since there are no persistent caches between runs.

bgarr commented 6 years ago

Turned out it was a proxy issue during Docker build, preventing yarn from loading new libraries and therefor Rails from picking up a revised webpack-bundle.js.