Module: TurboRspec::Capybara::Matchers

Defined in:
lib/turbo_rspec/capybara/matchers.rb,
lib/turbo_rspec/capybara/matchers/have_turbo_frame.rb,
lib/turbo_rspec/capybara/matchers/have_turbo_stream_tag.rb

Defined Under Namespace

Classes: HaveTurboFrame, HaveTurboStreamTag

Instance Method Summary collapse

Instance Method Details

#have_turbo_frame(id) ⇒ Object



9
10
11
# File 'lib/turbo_rspec/capybara/matchers.rb', line 9

def have_turbo_frame(id)
  HaveTurboFrame.new(id)
end

#have_turbo_stream_tag(signed_stream_name = nil) ⇒ Object



13
14
15
# File 'lib/turbo_rspec/capybara/matchers.rb', line 13

def have_turbo_stream_tag(signed_stream_name = nil)
  HaveTurboStreamTag.new(signed_stream_name: signed_stream_name)
end

#within_turbo_frame(id, &block) ⇒ Object

:nocov:



18
19
20
# File 'lib/turbo_rspec/capybara/matchers.rb', line 18

def within_turbo_frame(id, &block)
  page.within("turbo-frame##{id}", &block)
end