Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduce the
Turbo::SystemTestHelper
module to be included intoActionDispatch::SystemTestCase when it's available.
The module is named to mimic ActionText::SystemTestHelper.
The module defines a
#connect_turbo_cable_stream_sources
helpermethod extracted from this project's System Test suite. It aims to
synchronize the test harness with Turbo's Action Cable-powered broadcast
support. The method will find all
<turbo-cable-stream-source>
elementsthat are present but not yet
[connected]
(returning the resultsimmediately with Capybara's
:wait
), then wait for them to connect(using whatever Capybara's configured wait value).
In addition to the
connect_turbo_cable_stream_sources
, also introducea
:turbo_cable_stream_source
Capybara selector, along withassert_turbo_cable_stream_source
andassert_no_turbo_cable_stream_source
helper methods.