justin․searls․co

PSA: if you're using Rails+Hotwire,…

PSA: if you're using Rails+Hotwire, Turbo's so-fast-it-feels-like-magic ability to update sections of the DOM downgrades Capybara's all method from "likely to regret this" to "definite footgun" when used in system tests.

IME, Turbo Streams updates the DOM so fast that elements found with Capybara's all are extremely likely to be stale by the time you iterate and interact with them. After several days of fighting intermittent CI failures, I had to banish all in favor of find in all my tests.


Got a taste for hot, fresh takes?

Then you're in luck, because you can subscribe to this site via RSS or Mastodon! And if that ain't enough, then sign up for my newsletter and I'll send you a usually-pretty-good essay once a month. I also have a solo podcast, because of course I do.