Module: Capybara::ActiveAdmin::Actions::Layout
- Included in:
- Capybara::ActiveAdmin::Actions
- Defined in:
- lib/capybara/active_admin/actions/layout.rb
Overview
Actions for common Active Admin components.
Instance Method Summary collapse
- #click_action_item(title, options = {}) ⇒ Object
- #click_batch_action(title, exact: true) ⇒ Object
- #confirm_modal_dialog ⇒ Object
- #open_batch_action_menu ⇒ Object
- #switch_tab(tab_name, options = {}) ⇒ Object
Instance Method Details
#click_action_item(title, options = {}) ⇒ Object
8 9 10 11 12 |
# File 'lib/capybara/active_admin/actions/layout.rb', line 8 def click_action_item(title, = {}) within(action_items_container_selector) do click_link(title, ) end end |
#click_batch_action(title, exact: true) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/capybara/active_admin/actions/layout.rb', line 19 def click_batch_action(title, exact: true) within(dropdown_list_selector) do selector = batch_action_selector opts = Util.(title, exact: exact) find(selector, opts).click end end |
#confirm_modal_dialog ⇒ Object
34 35 36 |
# File 'lib/capybara/active_admin/actions/layout.rb', line 34 def confirm_modal_dialog within_modal_dialog { 'OK' } end |
#open_batch_action_menu ⇒ Object
28 29 30 31 32 |
# File 'lib/capybara/active_admin/actions/layout.rb', line 28 def return if find_all(dropdown_list_selector).present? find().click end |
#switch_tab(tab_name, options = {}) ⇒ Object
14 15 16 17 |
# File 'lib/capybara/active_admin/actions/layout.rb', line 14 def switch_tab(tab_name, = {}) opts = Util.(tab_name, ) find(tab_header_link_selector, opts).click end |