Module: Capybara::ActiveAdmin::Matchers::Layout
- Included in:
- Capybara::ActiveAdmin::Matchers
- Defined in:
- lib/capybara/active_admin/matchers/layout.rb
Overview
Matchers for common Active Admin components.
Instance Method Summary collapse
- #have_action_item(text, options = {}) ⇒ Object
- #have_batch_action(title, exact: true) ⇒ Object
- #have_flash_message(text, options = {}) ⇒ Object
- #have_footer(options = {}) ⇒ Object
- #have_page_title(text, options = {}) ⇒ Object
- #have_panel(title, options = {}) ⇒ Object
- #have_sidebar(title, options = {}) ⇒ Object
Instance Method Details
#have_action_item(text, options = {}) ⇒ Object
8 9 10 11 |
# File 'lib/capybara/active_admin/matchers/layout.rb', line 8 def have_action_item(text, = {}) opts = Util.(text, ) have_selector(action_item_selector, opts) end |
#have_batch_action(title, exact: true) ⇒ Object
42 43 44 45 46 |
# File 'lib/capybara/active_admin/matchers/layout.rb', line 42 def have_batch_action(title, exact: true) selector = "#{dropdown_list_selector} #{batch_action_selector}" opts = Util.(title, exact: exact) have_selector(selector, opts) end |
#have_flash_message(text, options = {}) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/capybara/active_admin/matchers/layout.rb', line 18 def (text, = {}) type = .delete(:type) opts = Util.(text, ) selector = (type) have_selector(selector, opts) end |
#have_footer(options = {}) ⇒ Object
25 26 27 28 |
# File 'lib/capybara/active_admin/matchers/layout.rb', line 25 def ( = {}) selector = have_selector(selector, ) end |
#have_page_title(text, options = {}) ⇒ Object
13 14 15 16 |
# File 'lib/capybara/active_admin/matchers/layout.rb', line 13 def have_page_title(text, = {}) opts = Util.(text, ) have_selector(page_title_selector, opts) end |
#have_panel(title, options = {}) ⇒ Object
30 31 32 33 34 |
# File 'lib/capybara/active_admin/matchers/layout.rb', line 30 def have_panel(title, = {}) title_selector = "#{panel_selector} > #{panel_title_selector}" opts = Util.(title, ) have_selector(title_selector, opts) end |
#have_sidebar(title, options = {}) ⇒ Object
36 37 38 39 40 |
# File 'lib/capybara/active_admin/matchers/layout.rb', line 36 def (title, = {}) title_selector = "#{} #{panel_selector} > #{panel_title_selector}" opts = Util.(title, ) have_selector(title_selector, opts) end |