Hotwire Discussion

Testing a lazy loaded turbo frame (system tests)

Is there a specific strategy for system tests on a page with lazy loaded turbo frames? I currently wait to load in content after a full page load, and am trying to write some tests to go through user flows on the page, but the lazy loading content is all that is available.

1 Like

I’m also wondering about how to handle system tests.
I can’t get them stable while using turbo_stream…

I’m having a similar but opposite issue: for me the turbo-frame content isn’t loaded onto the page and sleeping/waiting isn’t working. Trying to do capybara/rspec feature specs. It is all working as expected in my browser, though.

Hey! Did you ever get to the bottom of this issue? I’m running into the same thing! I have a frame that lazily loads content and I can’t seem to get the content to show in a system spec using capybara

The biggest thing was ensuring you have JS enabled on the system specs. It was a while ago, but I believe that worked with capybara async selectors