@@ -89,6 +89,12 @@ def finished_all_ajax_requests?
8989describe "Turbolinks across pages" , :js do
9090 subject { page }
9191
92+ around do |example |
93+ ReactOnRails . configure { |config | config . immediate_hydration = true }
94+ example . run
95+ ReactOnRails . configure { |config | config . immediate_hydration = false }
96+ end
97+
9298 it "changes name in message according to input" do
9399 allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro_licence_valid? ) . and_return ( true )
94100
@@ -97,16 +103,16 @@ def finished_all_ajax_requests?
97103 click_on "Hello World Component Server Rendered, with extra options"
98104 expect_change_text_in_dom_selector ( "#my-hello-world-id" )
99105 end
106+ end
107+
108+ describe "TurboStream send react component" , :js do
109+ subject { page }
100110
101111 around do |example |
102112 ReactOnRails . configure { |config | config . immediate_hydration = true }
103113 example . run
104114 ReactOnRails . configure { |config | config . immediate_hydration = false }
105115 end
106- end
107-
108- describe "TurboStream send react component" , :js do
109- subject { page }
110116
111117 it "force load hello-world component immediately" do
112118 allow ( ReactOnRails ::Utils ) . to receive ( :react_on_rails_pro_licence_valid? ) . and_return ( true )
@@ -115,12 +121,6 @@ def finished_all_ajax_requests?
115121 click_on "send me hello-turbo-stream component"
116122 expect ( page ) . to have_text "Hello, Mrs. Client Side Rendering From Turbo Stream!"
117123 end
118-
119- around do |example |
120- ReactOnRails . configure { |config | config . immediate_hydration = true }
121- example . run
122- ReactOnRails . configure { |config | config . immediate_hydration = false }
123- end
124124end
125125
126126describe "Pages/client_side_log_throw" , :ignore_js_errors , :js do
0 commit comments