module Capybara::RSpecMatchers
Public Instance Methods
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/capybara/rspec/matchers.rb, line 391 def become_closed(**options) BecomeClosed.new(options) end
RSpec
matcher for whether the element(s) matching a group of selectors exist See {Capybara::Node::Matcher#assert_all_of_selectors}
# File lib/capybara/rspec/matchers.rb, line 267 def have_all_of_selectors(*args, &optional_filter_block) HaveAllSelectors.new(*args, &optional_filter_block) end
RSpec
matcher for the current path See {Capybara::SessionMatchers#assert_current_path}
# File lib/capybara/rspec/matchers.rb, line 362 def have_current_path(path, **options) HaveCurrentPath.new(path, options) end
RSpec
matcher for whether no element(s) matching a group of selectors exist See {Capybara::Node::Matcher#assert_none_of_selectors}
# File lib/capybara/rspec/matchers.rb, line 273 def have_none_of_selectors(*args, &optional_filter_block) HaveNoSelectors.new(*args, &optional_filter_block) end
RSpec
matcher for whether the element(s) matching a given selector exist See {Capybara::Node::Matcher#assert_selector}
# File lib/capybara/rspec/matchers.rb, line 261 def have_selector(*args, &optional_filter_block) HaveSelector.new(*args, &optional_filter_block) end
RSpec
matcher for element style See {Capybara::Node::Matchers#has_style?}
# File lib/capybara/rspec/matchers.rb, line 368 def have_style(styles, **options) HaveStyle.new(styles, options) end
RSpec
matcher for text content See {Capybara::SessionMatchers#assert_text}
# File lib/capybara/rspec/matchers.rb, line 351 def have_text(*args) HaveText.new(*args) end
# File lib/capybara/rspec/matchers.rb, line 356 def have_title(title, **options) HaveTitle.new(title, options) end
RSpec
matcher for whether the current element matches a given selector See {Capybara::Node::Matchers#assert_matches_selector}
# File lib/capybara/rspec/matchers.rb, line 279 def match_selector(*args, &optional_filter_block) MatchSelector.new(*args, &optional_filter_block) end