From 0f987c2d9b491f4ea3a1a912a892c9d9436914d2 Mon Sep 17 00:00:00 2001 From: Steve Taylor Date: Thu, 17 Oct 2024 16:02:24 -0700 Subject: [PATCH] Change Role facet label --- app/controllers/catalog_controller.rb | 2 +- spec/features/hierarchy_spec.rb | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index c0907818..fb6d0a67 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -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 diff --git a/spec/features/hierarchy_spec.rb b/spec/features/hierarchy_spec.rb index c4618814..9b3a371f 100644 --- a/spec/features/hierarchy_spec.rb +++ b/spec/features/hierarchy_spec.rb @@ -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') @@ -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)