module Capybara::RSpecMatchers

def become_closed(**options)

Options Hash: (**options)
  • :wait (Numeric) -- Maximum wait time

Parameters:
  • options (Hash) -- optional param
def become_closed(**options)
  BecomeClosed.new(options)
end

def have_all_of_selectors(*args, &optional_filter_block)

See {Capybara::Node::Matcher#assert_all_of_selectors}
RSpec matcher for whether the element(s) matching a group of selectors exist
def have_all_of_selectors(*args, &optional_filter_block)
  HaveAllSelectors.new(*args, &optional_filter_block)
end

def have_current_path(path, **options)

See {Capybara::SessionMatchers#assert_current_path}
RSpec matcher for the current path
def have_current_path(path, **options)
  HaveCurrentPath.new(path, options)
end

def have_none_of_selectors(*args, &optional_filter_block)

See {Capybara::Node::Matcher#assert_none_of_selectors}
RSpec matcher for whether no element(s) matching a group of selectors exist
def have_none_of_selectors(*args, &optional_filter_block)
  HaveNoSelectors.new(*args, &optional_filter_block)
end

def have_selector(*args, &optional_filter_block)

See {Capybara::Node::Matcher#assert_selector}
RSpec matcher for whether the element(s) matching a given selector exist
def have_selector(*args, &optional_filter_block)
  HaveSelector.new(*args, &optional_filter_block)
end

def have_style(styles, **options)

See {Capybara::Node::Matchers#has_style?}
RSpec matcher for element style
def have_style(styles, **options)
  HaveStyle.new(styles, options)
end

def have_text(*args)

See {Capybara::SessionMatchers#assert_text}
RSpec matcher for text content
def have_text(*args)
  HaveText.new(*args)
end

def have_title(title, **options)

def have_title(title, **options)
  HaveTitle.new(title, options)
end

def match_selector(*args, &optional_filter_block)

See {Capybara::Node::Matchers#assert_matches_selector}
RSpec matcher for whether the current element matches a given selector
def match_selector(*args, &optional_filter_block)
  MatchSelector.new(*args, &optional_filter_block)
end