module Capybara::RSpecMatchers
Public Instance Methods
Source
# File lib/capybara/rspec/matchers.rb, line 198 def become_closed(**options) Matchers::BecomeClosed.new(options) end
Wait for window to become closed.
@example
expect(window).to become_closed(wait: 0.8)
@option options [Numeric] :wait Maximum wait time. Defaults to {Capybara.configure default_max_wait_time}
Source
# File lib/capybara/rspec/matchers.rb, line 25 def have_all_of_selectors(...) Matchers::HaveAllSelectors.new(...) end
RSpec
matcher for whether the element(s) matching a group of selectors exist.
Source
# File lib/capybara/rspec/matchers.rb, line 187 def have_ancestor(...) Matchers::HaveAncestor.new(...) end
RSpec
matcher for whether ancestor element(s) matching a given selector exist.
Source
# File lib/capybara/rspec/matchers.rb, line 39 def have_any_of_selectors(...) Matchers::HaveAnySelectors.new(...) end
RSpec
matcher for whether the element(s) matching any of a group of selectors exist.
Source
# File lib/capybara/rspec/matchers.rb, line 142 def have_current_path(path, **options, &optional_filter_block) Matchers::HaveCurrentPath.new(path, **options, &optional_filter_block) end
RSpec
matcher for the current path.
Source
# File lib/capybara/rspec/matchers.rb, line 32 def have_none_of_selectors(...) Matchers::HaveNoSelectors.new(...) end
RSpec
matcher for whether no element(s) matching a group of selectors exist.
Source
# File lib/capybara/rspec/matchers.rb, line 18 def have_selector(...) Matchers::HaveSelector.new(...) end
RSpec
matcher for whether the element(s) matching a given selector exist.
Source
# File lib/capybara/rspec/matchers.rb, line 180 def have_sibling(...) Matchers::HaveSibling.new(...) end
RSpec
matcher for whether sibling element(s) matching a given selector exist.
Source
# File lib/capybara/rspec/matchers.rb, line 157 def have_style(styles = nil, **options) Capybara::Helpers.warn "DEPRECATED: have_style is deprecated, please use match_style : #{Capybara::Helpers.filter_backtrace(caller)}" match_style(styles, **options) end
@deprecated
Source
# File lib/capybara/rspec/matchers.rb, line 130 def have_text(text_or_type, *args, **options) Matchers::HaveText.new(text_or_type, *args, **options) end
RSpec
matcher for text content.
Source
# File lib/capybara/rspec/matchers.rb, line 135 def have_title(title, **options) Matchers::HaveTitle.new(title, **options) end
Source
# File lib/capybara/rspec/matchers.rb, line 46 def match_selector(...) Matchers::MatchSelector.new(...) end
RSpec
matcher for whether the current element matches a given selector.
Source
# File lib/capybara/rspec/matchers.rb, line 149 def match_style(styles = nil, **options) styles, options = options, {} if styles.nil? Matchers::MatchStyle.new(styles, **options) end
RSpec
matcher for element style.