module Capybara::ActiveAdmin::Matchers::Layout
Matchers
for common Active Admin components.
Public Instance Methods
have_action_item(text, options = {})
click to toggle source
# File lib/capybara/active_admin/matchers/layout.rb, line 8 def have_action_item(text, options = {}) opts = Util.options_with_text(text, options) have_selector(action_item_selector, opts) end
have_batch_action(title, exact: true)
click to toggle source
# 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.options_with_text(title, exact: exact) have_selector(selector, opts) end
have_flash_message(text, options = {})
click to toggle source
# File lib/capybara/active_admin/matchers/layout.rb, line 18 def have_flash_message(text, options = {}) type = options.delete(:type) opts = Util.options_with_text(text, options) selector = flash_message_selector(type) have_selector(selector, opts) end
have_page_title(text, options = {})
click to toggle source
# File lib/capybara/active_admin/matchers/layout.rb, line 13 def have_page_title(text, options = {}) opts = Util.options_with_text(text, options) have_selector(page_title_selector, opts) end
have_panel(title, options = {})
click to toggle source
# File lib/capybara/active_admin/matchers/layout.rb, line 30 def have_panel(title, options = {}) title_selector = "#{panel_selector} > #{panel_title_selector}" opts = Util.options_with_text(title, options) have_selector(title_selector, opts) end