Sha256: fa570bce8991127e92f9174d95f9012bf4278cff771f9cf480a57ec411f64895

Contents?: true

Size: 820 Bytes

Versions: 2

Compression:

Stored size: 820 Bytes

Contents

# frozen_string_literal: true

module Capybara
  module ActiveAdmin
    module Actions
      module Layout
        def click_action_item(title, options = {})
          within(action_items_container_selector) do
            click_link(title, options)
          end
        end

        def switch_tab(tab_name, options = {})
          opts = Util.options_with_text(tab_name, options)
          find(tab_header_link_selector, opts).click
        end

        def click_batch_action(title)
          find(batch_actions_button_selector).click
          within(dropdown_list_selector) do
            selector = batch_action_selector(title)
            find(selector).click
          end
        end

        def confirm_modal_dialog
          within_modal_dialog { click_button 'OK' }
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
capybara_active_admin-0.3.1 lib/capybara/active_admin/actions/layout.rb
capybara_active_admin-0.3.0 lib/capybara/active_admin/actions/layout.rb