Skip to content
Merged
Changes from all 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 @@ -86,11 +86,24 @@ def finished_all_ajax_requests?
include_examples "React Component", "div#my-hello-world-id"
end

shared_context "with pro features and immediate hydration" do
before do
allow(ReactOnRails::Utils).to receive(:react_on_rails_pro_licence_valid?).and_return(true)
end

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

describe "Turbolinks across pages", :js do
subject { page }

include_context "with pro features and immediate hydration"

it "changes name in message according to input" do
skip "Flaky test - needs investigation"
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 +114,9 @@ def finished_all_ajax_requests?
describe "TurboStream send react component", :js do
subject { page }

include_context "with pro features and immediate hydration"

it "force load hello-world component immediately" do
skip "Flaky test - needs investigation"
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