Module: CapybaraErrorIntel::DSL
- Defined in:
- lib/capybara_error_intel/dsl.rb
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
12 13 14 |
# File 'lib/capybara_error_intel/dsl.rb', line 12 def (locator, ={}) has_selector?(:button, locator, ) end |
#has_checked_field?(locator, options = {}) ⇒ Boolean
24 25 26 |
# File 'lib/capybara_error_intel/dsl.rb', line 24 def has_checked_field?(locator, ={}) has_selector?(:field, locator, .merge(:checked => true)) end |
#has_css?(css, options = {}) ⇒ Boolean
8 9 10 |
# File 'lib/capybara_error_intel/dsl.rb', line 8 def has_css?(css, ={}) has_selector?(:css, css, ) end |
#has_field?(locator, options = {}) ⇒ Boolean
16 17 18 |
# File 'lib/capybara_error_intel/dsl.rb', line 16 def has_field?(locator, ={}) has_selector?(:field, locator, ) end |
#has_select?(locator, options = {}) ⇒ Boolean
32 33 34 |
# File 'lib/capybara_error_intel/dsl.rb', line 32 def has_select?(locator, ={}) has_selector?(:select, locator, ) end |
#has_selector?(*args) ⇒ Boolean
3 4 5 6 |
# File 'lib/capybara_error_intel/dsl.rb', line 3 def has_selector?(*args) matcher = has_selector(*args) match_or_error(matcher) end |
#has_table?(locator, options = {}) ⇒ Boolean
36 37 38 |
# File 'lib/capybara_error_intel/dsl.rb', line 36 def has_table?(locator, ={}) has_selector?(:table, locator, ) end |
#has_text?(*args) ⇒ Boolean Also known as: has_content?
40 41 42 43 |
# File 'lib/capybara_error_intel/dsl.rb', line 40 def has_text?(*args) matcher = has_text(*args) match_or_error(matcher) end |
#has_title?(title, options = {}) ⇒ Boolean
46 47 48 49 |
# File 'lib/capybara_error_intel/dsl.rb', line 46 def has_title?(title, = {}) matcher = has_title(title, ) match_or_error(matcher) end |
#has_unchecked_field?(locator, options = {}) ⇒ Boolean
28 29 30 |
# File 'lib/capybara_error_intel/dsl.rb', line 28 def has_unchecked_field?(locator, ={}) has_selector?(:field, locator, .merge(:unchecked => true)) end |
#has_xpath?(xpath, options = {}) ⇒ Boolean
20 21 22 |
# File 'lib/capybara_error_intel/dsl.rb', line 20 def has_xpath?(xpath, ={}) has_selector?(:xpath, locator, ) end |