Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions spec/dummy/spec/system/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,15 @@ def finished_all_ajax_requests?
describe "Turbolinks across pages", :js do
subject { page }

around do |example|
ReactOnRails.configure { |config| config.immediate_hydration = true }
example.run
ReactOnRails.configure { |config| config.immediate_hydration = false }
end

it "changes name in message according to input" do
skip "Flaky test - needs investigation"
allow(ReactOnRails::Utils).to receive(:react_on_rails_pro_licence_valid?).and_return(true)

visit "/client_side_hello_world"
expect_change_text_in_dom_selector("#HelloWorld-react-component-0")
click_on "Hello World Component Server Rendered, with extra options"
Expand All @@ -101,8 +108,15 @@ def finished_all_ajax_requests?
describe "TurboStream send react component", :js do
subject { page }

around do |example|
ReactOnRails.configure { |config| config.immediate_hydration = true }
example.run
ReactOnRails.configure { |config| config.immediate_hydration = false }
end

it "force load hello-world component immediately" do
skip "Flaky test - needs investigation"
allow(ReactOnRails::Utils).to receive(:react_on_rails_pro_licence_valid?).and_return(true)

visit "/turbo_frame_tag_hello_world"
click_on "send me hello-turbo-stream component"
expect(page).to have_text "Hello, Mrs. Client Side Rendering From Turbo Stream!"
Expand Down
Loading