Skip to content

Commit

Permalink
Respond to review
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkadel committed Aug 25, 2023
1 parent d4c46ef commit 089b43e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
11 changes: 0 additions & 11 deletions spec/components/orangelight/advanced_search_form_component_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,6 @@

let(:response) do
Blacklight::Solr::Response.new({}.with_indifferent_access, {})
# Blacklight::Solr::Response.new({ facet_counts: { facet_fields: {
# issue_object_type_s: { 'badge' => 4, 'counterfeit' => 10 },
# issue_denomination_s: { '1 Qian' => 4, '1 and 1/3 dollar' => 10 },
# issue_metal_s: { 'Brass' => 10 },
# issue_city_s: { 'Aleppo' => 10, 'Amul' => 2 },
# issue_state_s: { 'Andalusia' => 10, 'Antioch' => 2 },
# issue_region_s: { 'Brazil' => 10 },
# issue_ruler_s: { 'Alexios III Angelos' => 3 },
# issue_artists_s: { 'Ada Possesse' => 1 },
# find_place_s: { 'Kushan, India' => 1 }
# } } }.with_indifferent_access, {})
end

let(:params) { {} }
Expand Down
15 changes: 14 additions & 1 deletion spec/features/advanced_searching_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@
end

it 'can run a search' do
# This passes locally with an older Solr LuceneMatchVersion
# And when run only within context.
pending('Flipflop in controller fix')
# defaults to keyword
fill_in(id: 'clause_0_query', with: 'gay')
Expand All @@ -96,6 +98,7 @@

it 'can exclude terms from the search', js: false do
# This passes locally with an older Solr LuceneMatchVersion
# And when run only within context.
pending('Flipflop in controller fix')
# defaults to keyword
fill_in(id: 'clause_0_query', with: 'gay')
Expand All @@ -106,7 +109,17 @@
expect(page.find(".page_entries").text).to eq('1 entry found')
expect(page).to have_content('Seeking sanctuary')
expect(page).not_to have_content('Reno Gay Press and Promotions')
# expect(page).to have_content('Title NOT RenoOut')
end

it 'shows constraint-value on search results page' do
pending('Display constraint-value on search result page from built-in advanced search')
# defaults to keyword
fill_in(id: 'clause_0_query', with: 'gay')
choose(id: 'clause_2_op_must_not')
# defaults to title
fill_in(id: 'clause_2_query', with: 'RenoOut')
click_button('advanced-search-submit')
expect(page).to have_content('Title NOT RenoOut')
end
end

Expand Down

0 comments on commit 089b43e

Please sign in to comment.