Skip to content

Commit

Permalink
Merge pull request #2610 from sul-dlss/2609-role-facet-label
Browse files Browse the repository at this point in the history
Change Role facet label
  • Loading branch information
jcoyne authored Oct 18, 2024
2 parents 4f616ef + 0f987c2 commit e0a42ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class CatalogController < ApplicationController
config.add_facet_field 'pub_year_tisim', label: 'Date Range', range: true
config.add_facet_field 'language', label: 'Language', limit: true
config.add_facet_field 'name_ssim', label: 'Creators/Contributors', limit: true
config.add_facet_field 'name_roles_ssim', label: 'Role', limit: -1,
config.add_facet_field 'name_roles_ssim', label: 'Creators/Contributors by role', limit: -1,
component: Blacklight::Hierarchy::FacetFieldListComponent,
item_presenter: RoleFacetItemPresenter
config.add_facet_field 'author_person_facet', label: 'Author', limit: true # includes Collectors
Expand Down
12 changes: 6 additions & 6 deletions spec/features/hierarchy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
page.driver.browser.manage.window.resize_to(1000, 400)
end

it 'has the Role facet' do
expect(page).to have_button('Role')
it 'has the Creators/Contributors by role facet' do
expect(page).to have_button('Creators/Contributors by role')

click_button 'Role'
click_button 'Creators/Contributors by role'

within '.blacklight-name_roles_ssim' do
expect(page).to have_content('Artist')
Expand All @@ -32,10 +32,10 @@
expect(page).to have_css('.filter-value', text: 'Artist: Pellegrini, Domenico, 1759-1840')
end

it 'excludes empty roles from the Role facet' do
expect(page).to have_button('Role')
it 'excludes empty roles from the Creators/Contributors by role facet' do
expect(page).to have_button('Creators/Contributors by role')

click_button 'Role'
click_button 'Creators/Contributors by role'

within '.blacklight-name_roles_ssim' do
roles = find_all('li').map(&:text)
Expand Down

0 comments on commit e0a42ce

Please sign in to comment.