module Capybara::RSpecMatchers

Public Instance Methods

become_closed(**options) click to toggle source

Wait for window to become closed. @example

expect(window).to become_closed(wait: 0.8)

@param options [Hash] optional param @option options [Numeric] :wait (Capybara.default_max_wait_time) Maximum wait time

# File lib/isomorfeus/puppetmaster/rspec/matchers.rb, line 160
def become_closed(**options)
  Matchers::BecomeClosed.new(options)
end
have_all_of_selectors(*args, &optional_filter_block) click to toggle source

RSpec matcher for whether the element(s) matching a group of selectors exist See {Capybara::Node::Matcher#assert_all_of_selectors}

# File lib/isomorfeus/puppetmaster/rspec/matchers.rb, line 21
def have_all_of_selectors(*args, &optional_filter_block)
  Matchers::HaveAllSelectors.new(*args, &optional_filter_block)
end
have_any_of_selectors(*args, &optional_filter_block) click to toggle source

RSpec matcher for whether the element(s) matching any of a group of selectors exist See {Capybara::Node::Matcher#assert_any_of_selectors}

# File lib/isomorfeus/puppetmaster/rspec/matchers.rb, line 33
def have_any_of_selectors(*args, &optional_filter_block)
  Matchers::HaveAnySelectors.new(*args, &optional_filter_block)
end
have_content(*args)
Alias for: have_text
have_current_path(path, **options) click to toggle source

RSpec matcher for the current path See {Capybara::SessionMatchers#assert_current_path}

# File lib/isomorfeus/puppetmaster/rspec/matchers.rb, line 122
def have_current_path(path, **options)
  Matchers::HaveCurrentPath.new(path, options)
end
have_none_of_selectors(*args, &optional_filter_block) click to toggle source

RSpec matcher for whether no element(s) matching a group of selectors exist See {Capybara::Node::Matcher#assert_none_of_selectors}

# File lib/isomorfeus/puppetmaster/rspec/matchers.rb, line 27
def have_none_of_selectors(*args, &optional_filter_block)
  Matchers::HaveNoSelectors.new(*args, &optional_filter_block)
end
have_selector(*args, &optional_filter_block) click to toggle source

RSpec matcher for whether the element(s) matching a given selector exist See {Capybara::Node::Matcher#assert_selector}

# File lib/isomorfeus/puppetmaster/rspec/matchers.rb, line 15
def have_selector(*args, &optional_filter_block)
  Matchers::HaveSelector.new(*args, &optional_filter_block)
end
have_style(styles, **options) click to toggle source

@deprecated

# File lib/isomorfeus/puppetmaster/rspec/matchers.rb, line 135
def have_style(styles, **options)
  warn 'DEPRECATED: have_style is deprecated, please use match_style'
  match_style(styles, **options)
end
have_text(*args) click to toggle source

RSpec matcher for text content See {Capybara::SessionMatchers#assert_text}

# File lib/isomorfeus/puppetmaster/rspec/matchers.rb, line 111
def have_text(*args)
  Matchers::HaveText.new(*args)
end
Also aliased as: have_content
have_title(title, **options) click to toggle source
# File lib/isomorfeus/puppetmaster/rspec/matchers.rb, line 116
def have_title(title, **options)
  Matchers::HaveTitle.new(title, options)
end
match_selector(*args, &optional_filter_block) click to toggle source

RSpec matcher for whether the current element matches a given selector See {Capybara::Node::Matchers#assert_matches_selector}

# File lib/isomorfeus/puppetmaster/rspec/matchers.rb, line 39
def match_selector(*args, &optional_filter_block)
  Matchers::MatchSelector.new(*args, &optional_filter_block)
end
match_style(styles, **options) click to toggle source

RSpec matcher for element style See {Capybara::Node::Matchers#matches_style?}

# File lib/isomorfeus/puppetmaster/rspec/matchers.rb, line 128
def match_style(styles, **options)
  Matchers::MatchStyle.new(styles, options)
end