module Capybara::ActiveAdmin::Actions::Layout

Actions for common Active Admin components.

Public Instance Methods

click_action_item(title, options = {}) click to toggle source
# File lib/capybara/active_admin/actions/layout.rb, line 8
def click_action_item(title, options = {})
  within(action_items_container_selector) do
    click_link(title, options)
  end
end
click_batch_action(title, exact: true) click to toggle source
# File lib/capybara/active_admin/actions/layout.rb, line 19
def click_batch_action(title, exact: true)
  open_batch_action_menu
  within(dropdown_list_selector) do
    selector = batch_action_selector
    opts = Util.options_with_text(title, exact: exact)
    find(selector, opts).click
  end
end
confirm_modal_dialog() click to toggle source
# File lib/capybara/active_admin/actions/layout.rb, line 34
def confirm_modal_dialog
  within_modal_dialog { click_button 'OK' }
end
open_batch_action_menu() click to toggle source
# File lib/capybara/active_admin/actions/layout.rb, line 28
def open_batch_action_menu
  return if find_all(dropdown_list_selector).present?

  find(batch_actions_button_selector).click
end
switch_tab(tab_name, options = {}) click to toggle source
# File lib/capybara/active_admin/actions/layout.rb, line 14
def switch_tab(tab_name, options = {})
  opts = Util.options_with_text(tab_name, options)
  find(tab_header_link_selector, opts).click
end