Module: Capybara::ActiveAdmin::Selectors::Layout

Included in:
Capybara::ActiveAdmin::Selectors
Defined in:
lib/capybara/active_admin/selectors/layout.rb

Overview

Selectors for common Active Admin components.

Instance Method Summary collapse

Instance Method Details

#action_item_selectorString

Returns selector.

Returns:

  • (String)

    selector.



14
15
16
# File 'lib/capybara/active_admin/selectors/layout.rb', line 14

def action_item_selector
  "#{action_items_container_selector} .action_item"
end

#action_items_container_selectorString

Returns selector.

Returns:

  • (String)

    selector.



9
10
11
# File 'lib/capybara/active_admin/selectors/layout.rb', line 9

def action_items_container_selector
  '#titlebar_right .action_items'
end

#batch_action_selectorString

Returns selector.

Returns:

  • (String)

    selector.



76
77
78
# File 'lib/capybara/active_admin/selectors/layout.rb', line 76

def batch_action_selector
  'li a[data-action]'
end

#batch_actions_button_selectorString

Returns selector.

Returns:

  • (String)

    selector.



66
67
68
# File 'lib/capybara/active_admin/selectors/layout.rb', line 66

def batch_actions_button_selector
  'div.batch_actions_selector'
end

Returns selector.

Returns:

  • (String)

    selector.



71
72
73
# File 'lib/capybara/active_admin/selectors/layout.rb', line 71

def dropdown_list_selector
  'ul.dropdown_menu_list'
end

#flash_message_selector(type = nil) ⇒ String

Returns selector.

Returns:

  • (String)

    selector.



24
25
26
27
28
# File 'lib/capybara/active_admin/selectors/layout.rb', line 24

def flash_message_selector(type = nil)
  return ".flashes .flash.flash_#{type}" if type

  '.flashes .flash'
end

Returns selector.

Returns:

  • (String)

    selector.



31
32
33
# File 'lib/capybara/active_admin/selectors/layout.rb', line 31

def footer_selector
  'div.footer#footer'
end

Returns selector.

Returns:

  • (String)

    selector.



81
82
83
# File 'lib/capybara/active_admin/selectors/layout.rb', line 81

def modal_dialog_selector
  '.active_admin_dialog'
end

#page_title_selectorString

Returns selector.

Returns:

  • (String)

    selector.



19
20
21
# File 'lib/capybara/active_admin/selectors/layout.rb', line 19

def page_title_selector
  '#page_title'
end

#panel_content_selectorString

Returns selector.

Returns:

  • (String)

    selector.



61
62
63
# File 'lib/capybara/active_admin/selectors/layout.rb', line 61

def panel_content_selector
  '.panel_contents'
end

#panel_selectorString

Returns selector.

Returns:

  • (String)

    selector.



51
52
53
# File 'lib/capybara/active_admin/selectors/layout.rb', line 51

def panel_selector
  '.panel'
end

#panel_title_selectorString

Returns selector.

Returns:

  • (String)

    selector.



56
57
58
# File 'lib/capybara/active_admin/selectors/layout.rb', line 56

def panel_title_selector
  'h3'
end

Returns selector.

Returns:

  • (String)

    selector.



46
47
48
# File 'lib/capybara/active_admin/selectors/layout.rb', line 46

def sidebar_selector
  '#sidebar'
end

#tab_content_selectorString

Returns selector.

Returns:

  • (String)

    selector.



41
42
43
# File 'lib/capybara/active_admin/selectors/layout.rb', line 41

def tab_content_selector
  '.tab-content'
end

Returns selector.

Returns:

  • (String)

    selector.



36
37
38
# File 'lib/capybara/active_admin/selectors/layout.rb', line 36

def tab_header_link_selector
  '.tabs.ui-tabs li.ui-tabs-tab a'
end