Skip to content

Commit cde9d76

Browse files
ihabadhamclaude
andcommitted
Fix integration tests for immediate_hydration Pro license changes
Mock Pro license validation per-test using around blocks. Follows existing helper spec patterns. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent f7d5355 commit cde9d76

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

spec/dummy/spec/system/integration_spec.rb

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,23 +90,37 @@ def finished_all_ajax_requests?
9090
subject { page }
9191

9292
it "changes name in message according to input" do
93-
skip "Flaky test - needs investigation"
93+
allow(ReactOnRails::Utils).to receive(:react_on_rails_pro_licence_valid?).and_return(true)
94+
9495
visit "/client_side_hello_world"
9596
expect_change_text_in_dom_selector("#HelloWorld-react-component-0")
9697
click_on "Hello World Component Server Rendered, with extra options"
9798
expect_change_text_in_dom_selector("#my-hello-world-id")
9899
end
100+
101+
around do |example|
102+
ReactOnRails.configure { |config| config.immediate_hydration = true }
103+
example.run
104+
ReactOnRails.configure { |config| config.immediate_hydration = false }
105+
end
99106
end
100107

101108
describe "TurboStream send react component", :js do
102109
subject { page }
103110

104111
it "force load hello-world component immediately" do
105-
skip "Flaky test - needs investigation"
112+
allow(ReactOnRails::Utils).to receive(:react_on_rails_pro_licence_valid?).and_return(true)
113+
106114
visit "/turbo_frame_tag_hello_world"
107115
click_on "send me hello-turbo-stream component"
108116
expect(page).to have_text "Hello, Mrs. Client Side Rendering From Turbo Stream!"
109117
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
110124
end
111125

112126
describe "Pages/client_side_log_throw", :ignore_js_errors, :js do

0 commit comments

Comments
 (0)