Skip to content

Commit bcab118

Browse files
Merge pull request #4701 from pulibrary/i4676_advanced_search_facet_dropdown_arrow
Make it so carets toggle dropdowns on advanced search
2 parents 4a11226 + 25e0db5 commit bcab118

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

app/components/multiselect_combobox_component.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<input id="<%= @dom_id %>" data-bs-toggle="dropdown" autocomplete="off"
44
class="col-sm-8 combobox-multiselect" role="combobox"
55
aria-expanded="false" aria-controls="<%= @listbox_id %>">
6-
<span class="fa fa-caret-down" aria-hidden="true"></span>
6+
<span class="fa fa-caret-down" aria-hidden="true" data-bs-toggle="dropdown"></span>
77
<ul class="dropdown-menu" role="listbox" aria-label="Options" id="<%= @listbox_id %>">
88
<% @values.each do |value| %>
99
<%= content_tag :li,

spec/system/numismatics_form_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,12 @@
1818
expect(page.find(".page_entries").text).to eq('1 entry found')
1919
expect(page).to have_content('Coin: 1167')
2020
end
21+
it 'can click the drop-down caret', js: true do
22+
visit '/numismatics'
23+
first_facet = page.first('.advanced-search-facet')
24+
within(first_facet) do
25+
page.find('span').click
26+
expect(page).to have_content('coin (3)')
27+
end
28+
end
2129
end

0 commit comments

Comments
 (0)