From 9f9a55784c8f04a595bc4568bc88a8cacbc4b496 Mon Sep 17 00:00:00 2001 From: Randall Floyd Date: Tue, 12 Dec 2023 20:07:00 -0500 Subject: [PATCH 1/3] Adds indexing, display and specs for missing elements from physdesc --- lib/arclight/traject/ead2_component_config.rb | 25 ++++++- lib/arclight/traject/ead2_config.rb | 25 ++++++- .../arclight/templates/catalog_controller.rb | 4 ++ .../templates/config/locales/arclight.en.yml | 2 + spec/features/traject/ead2_indexing_spec.rb | 67 ++++++++++++++++--- spec/fixtures/ead/nlm/alphaomegaalpha.xml | 22 +++++- spec/fixtures/ead/sul-spec/a0011.xml | 10 +++ 7 files changed, 139 insertions(+), 16 deletions(-) diff --git a/lib/arclight/traject/ead2_component_config.rb b/lib/arclight/traject/ead2_component_config.rb index 598422f4c..b401b06f9 100644 --- a/lib/arclight/traject/ead2_component_config.rb +++ b/lib/arclight/traject/ead2_component_config.rb @@ -167,12 +167,29 @@ accumulator.concat settings[:root].output_hash['normalized_title_ssm'] end +# This accumulates direct text from a physdesc, ignoring child elements handled elsewhere +to_field 'physdesc_ssm', extract_xpath('./did/physdesc', to_text: false) do |_record, accumulator| + accumulator.map! do |element| + physdesc = [] + element.children.map do |child| + next if child.instance_of?(Nokogiri::XML::Element) + + physdesc << child.text&.strip unless child.text&.strip&.empty? + end.flatten + physdesc.join(' ') unless physdesc.empty? + end +end + +to_field 'physdesc_tesim' do |_record, accumulator, context| + accumulator.concat context.output_hash['physdesc_ssm'] || [] +end + to_field 'extent_ssm' do |record, accumulator| physdescs = record.xpath('./did/physdesc') extents_per_physdesc = physdescs.map do |physdesc| extents = physdesc.xpath('./extent').map { |e| e.text.strip } # Join extents within the same physdesc with an empty string - extents.join(' ') + extents.join(' ') unless extents.empty? end # Add each physdesc separately to the accumulator @@ -183,6 +200,12 @@ accumulator.concat context.output_hash['extent_ssm'] || [] end +to_field 'physfacet_ssm', extract_xpath('./did/physdesc/physfacet') +to_field 'physfacet_tesim', extract_xpath('./did/physdesc/physfacet') + +to_field 'dimensions_ssm', extract_xpath('./did/physdesc/dimensions') +to_field 'dimensions_tesim', extract_xpath('./did/physdesc/dimensions') + to_field 'creator_ssm', extract_xpath('./did/origination') to_field 'creator_ssim', extract_xpath('./did/origination') to_field 'creators_ssim', extract_xpath('./did/origination') diff --git a/lib/arclight/traject/ead2_config.rb b/lib/arclight/traject/ead2_config.rb index b2371f9bf..b18c42d14 100644 --- a/lib/arclight/traject/ead2_config.rb +++ b/lib/arclight/traject/ead2_config.rb @@ -183,12 +183,29 @@ end end +# This accumulates direct text from a physdesc, ignoring child elements handled elsewhere +to_field 'physdesc_ssm', extract_xpath('/ead/archdesc/did/physdesc', to_text: false) do |_record, accumulator| + accumulator.map! do |element| + physdesc = [] + element.children.map do |child| + next if child.instance_of?(Nokogiri::XML::Element) + + physdesc << child.text&.strip unless child.text&.strip&.empty? + end.flatten + physdesc.join(' ') unless physdesc.empty? + end +end + +to_field 'physdesc_tesim' do |_record, accumulator, context| + accumulator.concat context.output_hash['physdesc_ssm'] || [] +end + to_field 'extent_ssm' do |record, accumulator| physdescs = record.xpath('/ead/archdesc/did/physdesc') extents_per_physdesc = physdescs.map do |physdesc| extents = physdesc.xpath('./extent').map { |e| e.text.strip } # Join extents within the same physdesc with an empty string - extents.join(' ') + extents.join(' ') unless extents.empty? end # Add each physdesc separately to the accumulator @@ -199,6 +216,12 @@ accumulator.concat context.output_hash['extent_ssm'] || [] end +to_field 'physfacet_ssm', extract_xpath('/ead/archdesc/did/physdesc/physfacet') +to_field 'physfacet_tesim', extract_xpath('/ead/archdesc/did/physdesc/physfacet') + +to_field 'dimensions_ssm', extract_xpath('/ead/archdesc/did/physdesc/dimensions') +to_field 'dimensions_tesim', extract_xpath('/ead/archdesc/did/physdesc/dimensions') + to_field 'genreform_ssim', extract_xpath('/ead/archdesc/controlaccess/genreform') to_field 'date_range_isim', extract_xpath('/ead/archdesc/did/unitdate/@normal', to_text: false) do |_record, accumulator| diff --git a/lib/generators/arclight/templates/catalog_controller.rb b/lib/generators/arclight/templates/catalog_controller.rb index 64976c6e0..2c4985bd2 100644 --- a/lib/generators/arclight/templates/catalog_controller.rb +++ b/lib/generators/arclight/templates/catalog_controller.rb @@ -279,6 +279,8 @@ class CatalogController < ApplicationController config.add_background_field 'accruals', field: 'accruals_html_tesm', helper_method: :render_html_tags config.add_background_field 'phystech', field: 'phystech_html_tesm', helper_method: :render_html_tags config.add_background_field 'physloc', field: 'physloc_html_tesm', helper_method: :render_html_tags + config.add_background_field 'physfacet', field: 'physfacet_ssm', helper_method: :render_html_tags + config.add_background_field 'dimensions', field: 'dimensions_ssm', helper_method: :render_html_tags config.add_background_field 'materialspec', field: 'materialspec_tesim', helper_method: :render_html_tags config.add_background_field 'fileplan', field: 'fileplan_html_tesim', helper_method: :render_html_tags config.add_background_field 'descrules', field: 'descrules_ssm', helper_method: :render_html_tags @@ -335,6 +337,8 @@ class CatalogController < ApplicationController config.add_component_field 'phystech', field: 'phystech_html_tesm', helper_method: :render_html_tags config.add_component_field 'materialspec', field: 'materialspec_tesim', helper_method: :render_html_tags config.add_component_field 'physloc', field: 'physloc_html_tesm', helper_method: :render_html_tags + config.add_component_field 'physfacet', field: 'physfacet_tesim', helper_method: :render_html_tags + config.add_component_field 'dimensions', field: 'dimensions_tesim', helper_method: :render_html_tags config.add_component_field 'fileplan', field: 'fileplan_html_tesim', helper_method: :render_html_tags config.add_component_field 'altformavail', field: 'altformavail_html_tesim', helper_method: :render_html_tags config.add_component_field 'otherfindaid', field: 'otherfindaid_html_tesm', helper_method: :render_html_tags diff --git a/lib/generators/arclight/templates/config/locales/arclight.en.yml b/lib/generators/arclight/templates/config/locales/arclight.en.yml index 71266d078..b09e34cd2 100644 --- a/lib/generators/arclight/templates/config/locales/arclight.en.yml +++ b/lib/generators/arclight/templates/config/locales/arclight.en.yml @@ -18,6 +18,8 @@ en: accruals: Accruals phystech: Physical / technical requirements physloc: Physical location + physfacet: Physical facet + dimensions: Dimensions descrules: Rules or conventions relatedmaterial: Related material diff --git a/spec/features/traject/ead2_indexing_spec.rb b/spec/features/traject/ead2_indexing_spec.rb index 212acfbf4..317abb5c6 100644 --- a/spec/features/traject/ead2_indexing_spec.rb +++ b/spec/features/traject/ead2_indexing_spec.rb @@ -120,8 +120,22 @@ def components(result) expect(result['places_ssim']).to equal_array_ignoring_whitespace ['Yosemite National Park (Calif.)'] end - it 'physdesc' do - expect(result['extent_ssm']).to equal_array_ignoring_whitespace ['1.25 Linear Feet (1 volume)', '1 document case', '16 DVDRs'] + describe 'physdesc' do + it 'direct text' do + expect(result['physdesc_ssm']).to equal_array_ignoring_whitespace ['Photographic album', 'Single bound volume'] + end + + it 'extent' do + expect(result['extent_ssm']).to equal_array_ignoring_whitespace ['1.25 Linear Feet (1 volume)', '1 document case', '16 DVDRs'] + end + + it 'physfacet' do + expect(result['physfacet_ssm']).to equal_array_ignoring_whitespace ['Printed material', 'Digital Video Disc'] + end + + it 'dimensions' do + expect(result['dimensions_ssm']).to equal_array_ignoring_whitespace ['20 x 20 in.', '7.5 x 5.5 in.'] + end end it 'has_online_content' do @@ -295,18 +309,49 @@ def components(result) ).to_a.first end - it 'extent at the collection level' do - %w[extent_ssm extent_tesim].each do |field| - expect(result[field]).to equal_array_ignoring_whitespace(['15.0 linear feet (36 boxes + oversize folder)', '3 CDs']) + describe 'physdesc at the collection level' do + it 'direct text' do + expect(result['physdesc_ssm']).to equal_array_ignoring_whitespace ['Boxes and folders', 'Compact discs'] + end + + it 'extent' do + %w[extent_ssm extent_tesim].each do |field| + expect(result[field]).to equal_array_ignoring_whitespace(['15.0 linear feet (36 boxes + oversize folder)', '3 CDs']) + end + end + + it 'physfacet' do + expect(result['physfacet_ssm']).to equal_array_ignoring_whitespace ['Compact digital disc'] + end + + it 'dimensions' do + expect(result['dimensions_ssm']).to equal_array_ignoring_whitespace ['7.5 x 5.5 in.'] end end - it 'extent at the component level' do - component = all_components.find { |c| c['ref_ssi'] == ['aspace_a951375d104030369a993ff943f61a77'] } - %w[extent_ssm extent_tesim].each do |field| - expect(component[field]).to equal_array_ignoring_whitespace( - ['1.5 Linear Feet'] - ) + describe 'physdesc at the component level' do + let(:component) do + all_components.find { |c| c['ref_ssi'] == ['aspace_a951375d104030369a993ff943f61a77'] } + end + + it 'direct text' do + expect(component['physdesc_ssm']).to equal_array_ignoring_whitespace ['Cards and sheets of various sizes'] + end + + it 'extent' do + %w[extent_ssm extent_tesim].each do |field| + expect(component[field]).to equal_array_ignoring_whitespace( + ['1.5 Linear Feet'] + ) + end + end + + it 'physfacet' do + expect(component['physfacet_ssm']).to equal_array_ignoring_whitespace ['Informational cards'] + end + + it 'dimensions' do + expect(component['dimensions_ssm']).to equal_array_ignoring_whitespace ['various'] end end diff --git a/spec/fixtures/ead/nlm/alphaomegaalpha.xml b/spec/fixtures/ead/nlm/alphaomegaalpha.xml index 7f9b5fb25..3983dbd7c 100644 --- a/spec/fixtures/ead/nlm/alphaomegaalpha.xml +++ b/spec/fixtures/ead/nlm/alphaomegaalpha.xml @@ -41,11 +41,19 @@ Alpha Omega Alpha MS C 271 + + Boxes and folders + + + Compact discs + 15.0 linear feet (36 boxes + oversize folder) + 7.5 x 5.5 in. + Compact digital disc 3 CDs 1894-1992 @@ -393,7 +401,7 @@ Historical Note

- The Society started keeping consistent adminstrative records in 1975, the same year that E. L. Doctorow published Ragtime. + The Society started keeping consistent adminstrative records in 1975, the same year that E. L. Doctorow published Ragtime.

@@ -724,8 +732,16 @@ Series II: Membership, MS C 271.II - 1.5 Linear - Feet + + Cards and sheets of various sizes + + + Informational cards + + + various + 1.5 Linear Feet + 1902-1973 Contains a mixture of membership cards and membership rosters. diff --git a/spec/fixtures/ead/sul-spec/a0011.xml b/spec/fixtures/ead/sul-spec/a0011.xml index 8563271fa..5f7b778f0 100644 --- a/spec/fixtures/ead/sul-spec/a0011.xml +++ b/spec/fixtures/ead/sul-spec/a0011.xml @@ -78,13 +78,23 @@ A0011 + Photographic album + + + Single bound volume + + + Printed material 1.25 Linear Feet (1 volume) + 20 x 20 in. 1 document case + 7.5 x 5.5 in. + Digital Video Disc 16 DVDRs circa 1900-1906 From 99c657a28ccf235d6514abc70780238df9b0d566 Mon Sep 17 00:00:00 2001 From: Randall Floyd Date: Wed, 13 Dec 2023 11:59:45 -0500 Subject: [PATCH 2/3] Removing ssm versions of physdesc fields since tesim is both stored and indexed. --- lib/arclight/traject/ead2_component_config.rb | 9 +-------- lib/arclight/traject/ead2_config.rb | 9 +-------- .../arclight/templates/catalog_controller.rb | 4 ++-- spec/features/traject/ead2_indexing_spec.rb | 20 +++++++++---------- 4 files changed, 14 insertions(+), 28 deletions(-) diff --git a/lib/arclight/traject/ead2_component_config.rb b/lib/arclight/traject/ead2_component_config.rb index b401b06f9..ed0f4a9ac 100644 --- a/lib/arclight/traject/ead2_component_config.rb +++ b/lib/arclight/traject/ead2_component_config.rb @@ -168,7 +168,7 @@ end # This accumulates direct text from a physdesc, ignoring child elements handled elsewhere -to_field 'physdesc_ssm', extract_xpath('./did/physdesc', to_text: false) do |_record, accumulator| +to_field 'physdesc_tesim', extract_xpath('./did/physdesc', to_text: false) do |_record, accumulator| accumulator.map! do |element| physdesc = [] element.children.map do |child| @@ -180,10 +180,6 @@ end end -to_field 'physdesc_tesim' do |_record, accumulator, context| - accumulator.concat context.output_hash['physdesc_ssm'] || [] -end - to_field 'extent_ssm' do |record, accumulator| physdescs = record.xpath('./did/physdesc') extents_per_physdesc = physdescs.map do |physdesc| @@ -200,10 +196,7 @@ accumulator.concat context.output_hash['extent_ssm'] || [] end -to_field 'physfacet_ssm', extract_xpath('./did/physdesc/physfacet') to_field 'physfacet_tesim', extract_xpath('./did/physdesc/physfacet') - -to_field 'dimensions_ssm', extract_xpath('./did/physdesc/dimensions') to_field 'dimensions_tesim', extract_xpath('./did/physdesc/dimensions') to_field 'creator_ssm', extract_xpath('./did/origination') diff --git a/lib/arclight/traject/ead2_config.rb b/lib/arclight/traject/ead2_config.rb index b18c42d14..0fcb55128 100644 --- a/lib/arclight/traject/ead2_config.rb +++ b/lib/arclight/traject/ead2_config.rb @@ -184,7 +184,7 @@ end # This accumulates direct text from a physdesc, ignoring child elements handled elsewhere -to_field 'physdesc_ssm', extract_xpath('/ead/archdesc/did/physdesc', to_text: false) do |_record, accumulator| +to_field 'physdesc_tesim', extract_xpath('/ead/archdesc/did/physdesc', to_text: false) do |_record, accumulator| accumulator.map! do |element| physdesc = [] element.children.map do |child| @@ -196,10 +196,6 @@ end end -to_field 'physdesc_tesim' do |_record, accumulator, context| - accumulator.concat context.output_hash['physdesc_ssm'] || [] -end - to_field 'extent_ssm' do |record, accumulator| physdescs = record.xpath('/ead/archdesc/did/physdesc') extents_per_physdesc = physdescs.map do |physdesc| @@ -216,10 +212,7 @@ accumulator.concat context.output_hash['extent_ssm'] || [] end -to_field 'physfacet_ssm', extract_xpath('/ead/archdesc/did/physdesc/physfacet') to_field 'physfacet_tesim', extract_xpath('/ead/archdesc/did/physdesc/physfacet') - -to_field 'dimensions_ssm', extract_xpath('/ead/archdesc/did/physdesc/dimensions') to_field 'dimensions_tesim', extract_xpath('/ead/archdesc/did/physdesc/dimensions') to_field 'genreform_ssim', extract_xpath('/ead/archdesc/controlaccess/genreform') diff --git a/lib/generators/arclight/templates/catalog_controller.rb b/lib/generators/arclight/templates/catalog_controller.rb index 2c4985bd2..b4510482d 100644 --- a/lib/generators/arclight/templates/catalog_controller.rb +++ b/lib/generators/arclight/templates/catalog_controller.rb @@ -279,8 +279,8 @@ class CatalogController < ApplicationController config.add_background_field 'accruals', field: 'accruals_html_tesm', helper_method: :render_html_tags config.add_background_field 'phystech', field: 'phystech_html_tesm', helper_method: :render_html_tags config.add_background_field 'physloc', field: 'physloc_html_tesm', helper_method: :render_html_tags - config.add_background_field 'physfacet', field: 'physfacet_ssm', helper_method: :render_html_tags - config.add_background_field 'dimensions', field: 'dimensions_ssm', helper_method: :render_html_tags + config.add_background_field 'physfacet', field: 'physfacet_tesim', helper_method: :render_html_tags + config.add_background_field 'dimensions', field: 'dimensions_tesim', helper_method: :render_html_tags config.add_background_field 'materialspec', field: 'materialspec_tesim', helper_method: :render_html_tags config.add_background_field 'fileplan', field: 'fileplan_html_tesim', helper_method: :render_html_tags config.add_background_field 'descrules', field: 'descrules_ssm', helper_method: :render_html_tags diff --git a/spec/features/traject/ead2_indexing_spec.rb b/spec/features/traject/ead2_indexing_spec.rb index 317abb5c6..2cfb7eaad 100644 --- a/spec/features/traject/ead2_indexing_spec.rb +++ b/spec/features/traject/ead2_indexing_spec.rb @@ -122,19 +122,19 @@ def components(result) describe 'physdesc' do it 'direct text' do - expect(result['physdesc_ssm']).to equal_array_ignoring_whitespace ['Photographic album', 'Single bound volume'] + expect(result['physdesc_tesim']).to equal_array_ignoring_whitespace ['Photographic album', 'Single bound volume'] end it 'extent' do - expect(result['extent_ssm']).to equal_array_ignoring_whitespace ['1.25 Linear Feet (1 volume)', '1 document case', '16 DVDRs'] + expect(result['extent_tesim']).to equal_array_ignoring_whitespace ['1.25 Linear Feet (1 volume)', '1 document case', '16 DVDRs'] end it 'physfacet' do - expect(result['physfacet_ssm']).to equal_array_ignoring_whitespace ['Printed material', 'Digital Video Disc'] + expect(result['physfacet_tesim']).to equal_array_ignoring_whitespace ['Printed material', 'Digital Video Disc'] end it 'dimensions' do - expect(result['dimensions_ssm']).to equal_array_ignoring_whitespace ['20 x 20 in.', '7.5 x 5.5 in.'] + expect(result['dimensions_tesim']).to equal_array_ignoring_whitespace ['20 x 20 in.', '7.5 x 5.5 in.'] end end @@ -311,7 +311,7 @@ def components(result) describe 'physdesc at the collection level' do it 'direct text' do - expect(result['physdesc_ssm']).to equal_array_ignoring_whitespace ['Boxes and folders', 'Compact discs'] + expect(result['physdesc_tesim']).to equal_array_ignoring_whitespace ['Boxes and folders', 'Compact discs'] end it 'extent' do @@ -321,11 +321,11 @@ def components(result) end it 'physfacet' do - expect(result['physfacet_ssm']).to equal_array_ignoring_whitespace ['Compact digital disc'] + expect(result['physfacet_tesim']).to equal_array_ignoring_whitespace ['Compact digital disc'] end it 'dimensions' do - expect(result['dimensions_ssm']).to equal_array_ignoring_whitespace ['7.5 x 5.5 in.'] + expect(result['dimensions_tesim']).to equal_array_ignoring_whitespace ['7.5 x 5.5 in.'] end end @@ -335,7 +335,7 @@ def components(result) end it 'direct text' do - expect(component['physdesc_ssm']).to equal_array_ignoring_whitespace ['Cards and sheets of various sizes'] + expect(component['physdesc_tesim']).to equal_array_ignoring_whitespace ['Cards and sheets of various sizes'] end it 'extent' do @@ -347,11 +347,11 @@ def components(result) end it 'physfacet' do - expect(component['physfacet_ssm']).to equal_array_ignoring_whitespace ['Informational cards'] + expect(component['physfacet_tesim']).to equal_array_ignoring_whitespace ['Informational cards'] end it 'dimensions' do - expect(component['dimensions_ssm']).to equal_array_ignoring_whitespace ['various'] + expect(component['dimensions_tesim']).to equal_array_ignoring_whitespace ['various'] end end From d57a9c88f421b62ca9ce94b4c17522ea3854a0e1 Mon Sep 17 00:00:00 2001 From: Randall Floyd Date: Thu, 14 Dec 2023 14:56:04 -0500 Subject: [PATCH 3/3] Adding tests for physdesc elements to display feature specs. --- .../arclight/templates/catalog_controller.rb | 2 ++ .../arclight/templates/config/locales/arclight.en.yml | 1 + spec/features/collection_page_spec.rb | 11 ++++++++++- spec/features/component_page_spec.rb | 11 +++++++++++ spec/fixtures/ead/nlm/alphaomegaalpha.xml | 10 ++++++++++ 5 files changed, 34 insertions(+), 1 deletion(-) diff --git a/lib/generators/arclight/templates/catalog_controller.rb b/lib/generators/arclight/templates/catalog_controller.rb index b4510482d..c088b4aca 100644 --- a/lib/generators/arclight/templates/catalog_controller.rb +++ b/lib/generators/arclight/templates/catalog_controller.rb @@ -279,6 +279,7 @@ class CatalogController < ApplicationController config.add_background_field 'accruals', field: 'accruals_html_tesm', helper_method: :render_html_tags config.add_background_field 'phystech', field: 'phystech_html_tesm', helper_method: :render_html_tags config.add_background_field 'physloc', field: 'physloc_html_tesm', helper_method: :render_html_tags + config.add_background_field 'physdesc', field: 'physdesc_tesim', helper_method: :render_html_tags config.add_background_field 'physfacet', field: 'physfacet_tesim', helper_method: :render_html_tags config.add_background_field 'dimensions', field: 'dimensions_tesim', helper_method: :render_html_tags config.add_background_field 'materialspec', field: 'materialspec_tesim', helper_method: :render_html_tags @@ -337,6 +338,7 @@ class CatalogController < ApplicationController config.add_component_field 'phystech', field: 'phystech_html_tesm', helper_method: :render_html_tags config.add_component_field 'materialspec', field: 'materialspec_tesim', helper_method: :render_html_tags config.add_component_field 'physloc', field: 'physloc_html_tesm', helper_method: :render_html_tags + config.add_component_field 'physdesc', field: 'physdesc_tesim', helper_method: :render_html_tags config.add_component_field 'physfacet', field: 'physfacet_tesim', helper_method: :render_html_tags config.add_component_field 'dimensions', field: 'dimensions_tesim', helper_method: :render_html_tags config.add_component_field 'fileplan', field: 'fileplan_html_tesim', helper_method: :render_html_tags diff --git a/lib/generators/arclight/templates/config/locales/arclight.en.yml b/lib/generators/arclight/templates/config/locales/arclight.en.yml index b09e34cd2..5b6327bab 100644 --- a/lib/generators/arclight/templates/config/locales/arclight.en.yml +++ b/lib/generators/arclight/templates/config/locales/arclight.en.yml @@ -18,6 +18,7 @@ en: accruals: Accruals phystech: Physical / technical requirements physloc: Physical location + physdesc: Physical description physfacet: Physical facet dimensions: Dimensions descrules: Rules or conventions diff --git a/spec/features/collection_page_spec.rb b/spec/features/collection_page_spec.rb index 96d060e1f..c26c7c649 100644 --- a/spec/features/collection_page_spec.rb +++ b/spec/features/collection_page_spec.rb @@ -73,7 +73,7 @@ end end - it 'background has configured metadata' do + it 'background has configured metadata' do # rubocop:disable RSpec/MultipleExpectations within '#background' do expect(page).to have_css('dt', text: 'Scope and content') expect(page).to have_css('dd', text: /^Correspondence, documents, records, photos/) @@ -99,6 +99,15 @@ expect(page).to have_css('dt', text: 'Arrangement') expect(page).to have_css('dd', text: /^Arranged into seven series\./) + expect(page).to have_css('dt', text: 'Physical description') + expect(page).to have_css('dd', text: /^Boxes and folders/) + + expect(page).to have_css('dt', text: 'Physical facet') + expect(page).to have_css('dd', text: /^Compact digital disc/) + + expect(page).to have_css('dt', text: 'Dimensions') + expect(page).to have_css('dd', text: /^7\.5 x 5\.5 in\./) + expect(page).to have_css('dt', text: 'Rules or conventions') expect(page).to have_css('dd', text: /^Finding aid prepared using Rules for Archival Description/) end diff --git a/spec/features/component_page_spec.rb b/spec/features/component_page_spec.rb index fddeb49f3..0e6ce8fce 100644 --- a/spec/features/component_page_spec.rb +++ b/spec/features/component_page_spec.rb @@ -83,6 +83,17 @@ expect(page).to have_css('dd', text: /^These papers were maintained by the staff/) end + it 'shows configured component fields' do + expect(page).to have_css('dt', text: 'Extent') + expect(page).to have_css('dd', text: /^2 Linear Feet/) + expect(page).to have_css('dt', text: 'Physical description') + expect(page).to have_css('dd', text: /^Mixed Materials/) + expect(page).to have_css('dt', text: 'Dimensions') + expect(page).to have_css('dd', text: /^various/) + expect(page).to have_css('dt', text: 'Physical facet') + expect(page).to have_css('dd', text: /^Boxes and folders/) + end + it 'multivalued notes are rendered as paragaphs' do within 'dd.blacklight-appraisal' do expect(page).to have_css('p', count: 2) diff --git a/spec/fixtures/ead/nlm/alphaomegaalpha.xml b/spec/fixtures/ead/nlm/alphaomegaalpha.xml index 3983dbd7c..6e8c60d72 100644 --- a/spec/fixtures/ead/nlm/alphaomegaalpha.xml +++ b/spec/fixtures/ead/nlm/alphaomegaalpha.xml @@ -474,6 +474,16 @@ Constitution and by-laws - drafts, 1902-1904 + + Mixed Materials + + + Boxes and folders + + + various + 2 Linear Feet + 1