Module: CapybaraErrorIntel::DSL
- Defined in:
- lib/capybara_error_intel/dsl.rb
Overview
Wraps Capybara::DSL
Instance Method Summary collapse
- #has_button?(locator, options = {}) ⇒ Boolean
- #has_checked_field?(locator, options = {}) ⇒ Boolean
- #has_css?(css, options = {}) ⇒ Boolean
- #has_field?(locator, options = {}) ⇒ Boolean
- #has_select?(locator, options = {}) ⇒ Boolean
- #has_selector?(*args) ⇒ Boolean
- #has_table?(locator, options = {}) ⇒ Boolean
- #has_text?(*args) ⇒ Boolean (also: #has_content?)
- #has_title?(title, options = {}) ⇒ Boolean
- #has_unchecked_field?(locator, options = {}) ⇒ Boolean
- #has_xpath?(_xpath, options = {}) ⇒ Boolean
Instance Method Details
#has_button?(locator, options = {}) ⇒ Boolean
13 14 15 |
# File 'lib/capybara_error_intel/dsl.rb', line 13 def (locator, = {}) has_selector?(:button, locator, ) end |
#has_checked_field?(locator, options = {}) ⇒ Boolean
25 26 27 |
# File 'lib/capybara_error_intel/dsl.rb', line 25 def has_checked_field?(locator, = {}) has_selector?(:field, locator, .merge(checked: true)) end |
#has_css?(css, options = {}) ⇒ Boolean
9 10 11 |
# File 'lib/capybara_error_intel/dsl.rb', line 9 def has_css?(css, = {}) has_selector?(:css, css, ) end |
#has_field?(locator, options = {}) ⇒ Boolean
17 18 19 |
# File 'lib/capybara_error_intel/dsl.rb', line 17 def has_field?(locator, = {}) has_selector?(:field, locator, ) end |
#has_select?(locator, options = {}) ⇒ Boolean
33 34 35 |
# File 'lib/capybara_error_intel/dsl.rb', line 33 def has_select?(locator, = {}) has_selector?(:select, locator, ) end |
#has_selector?(*args) ⇒ Boolean
4 5 6 7 |
# File 'lib/capybara_error_intel/dsl.rb', line 4 def has_selector?(*args) matcher = has_selector(*args) match_or_error(matcher) end |
#has_table?(locator, options = {}) ⇒ Boolean
37 38 39 |
# File 'lib/capybara_error_intel/dsl.rb', line 37 def has_table?(locator, = {}) has_selector?(:table, locator, ) end |
#has_text?(*args) ⇒ Boolean Also known as: has_content?
41 42 43 44 |
# File 'lib/capybara_error_intel/dsl.rb', line 41 def has_text?(*args) matcher = has_text(*args) match_or_error(matcher) end |
#has_title?(title, options = {}) ⇒ Boolean
47 48 49 50 |
# File 'lib/capybara_error_intel/dsl.rb', line 47 def has_title?(title, = {}) matcher = has_title(title, ) match_or_error(matcher) end |
#has_unchecked_field?(locator, options = {}) ⇒ Boolean
29 30 31 |
# File 'lib/capybara_error_intel/dsl.rb', line 29 def has_unchecked_field?(locator, = {}) has_selector?(:field, locator, .merge(unchecked: true)) end |
#has_xpath?(_xpath, options = {}) ⇒ Boolean
21 22 23 |
# File 'lib/capybara_error_intel/dsl.rb', line 21 def has_xpath?(_xpath, = {}) has_selector?(:xpath, locator, ) end |