Module: CapybaraSelect2::Selectors
- Defined in:
- lib/capybara_select2/selectors.rb
Constant Summary collapse
- OpenerSelectors =
{ '2' => ".select2-choice, .select2-search-field", '3' => ".select2-choice, .select2-search-field", '4' => ".select2-selection" }.freeze
- SearchInputSelectors =
{ '2' => ".select2-dropdown-open input.select2-focused", '3' => ".select2-drop-active input.select2-input," + # single ".select2-dropdown-open input.select2-input", # multi '4' => ".select2-container--open input.select2-search__field" }.freeze
- OptionSelectors =
{ '2' => ".select2-container-active .select2-result", '3' => ".select2-drop-active .select2-result-label", '4' => ".select2-results .select2-results__option[aria-selected='false']" }.freeze
Class Method Summary collapse
- .opener_selector(select2_version) ⇒ Object
- .option_selector(select2_version) ⇒ Object
- .search_input_selector(select2_version) ⇒ Object
Class Method Details
.opener_selector(select2_version) ⇒ Object
12 13 14 |
# File 'lib/capybara_select2/selectors.rb', line 12 def opener_selector(select2_version) OpenerSelectors.fetch(select2_version) end |
.option_selector(select2_version) ⇒ Object
33 34 35 |
# File 'lib/capybara_select2/selectors.rb', line 33 def option_selector(select2_version) OptionSelectors.fetch(select2_version) end |
.search_input_selector(select2_version) ⇒ Object
23 24 25 |
# File 'lib/capybara_select2/selectors.rb', line 23 def search_input_selector(select2_version) SearchInputSelectors.fetch(select2_version) end |