Skip to content

Commit

Permalink
Show basic metadata fields for generic work
Browse files Browse the repository at this point in the history
closes #6276
  • Loading branch information
hackartisan committed Sep 15, 2023
1 parent 775ba3a commit 7e20baa
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
22 changes: 22 additions & 0 deletions config/metadata/basic_metadata.yaml
Expand Up @@ -5,16 +5,22 @@ attributes:
multiple: true
form:
primary: false
index_keys:
- "abstract_tesim"
access_right:
type: string
multiple: true
form:
primary: false
index_keys:
- "access_right_tesim"
alternative_title:
type: string
multiple: true
form:
primary: false
index_keys:
- "alternative_title_tesim"
based_near:
type: string
multiple: true
Expand All @@ -31,6 +37,8 @@ attributes:
multiple: true
form:
primary: false
index_keys:
- "contributor_tesim"
creator:
type: string
multiple: true
Expand Down Expand Up @@ -58,6 +66,8 @@ attributes:
multiple: true
form:
primary: false
index_keys:
- "identifier_tesim"
import_url:
type: string
keyword:
Expand All @@ -73,20 +83,28 @@ attributes:
multiple: true
form:
primary: false
index_keys:
- "publisher_tesim"
label:
type: string
form:
primary: false
index_keys:
- "label_tesim"
language:
type: string
multiple: true
form:
primary: false
index_keys:
- "language_tesim"
license:
type: string
multiple: true
form:
primary: false
index_keys:
- "license_tesim"
relative_path:
type: string
related_url:
Expand All @@ -109,6 +127,8 @@ attributes:
multiple: true
form:
primary: false
index_keys:
- "rights_notes_tesim"
rights_statement:
type: string
multiple: true
Expand All @@ -121,6 +141,8 @@ attributes:
multiple: true
form:
primary: false
index_keys:
- "source_tesim"
subject:
type: string
multiple: true
Expand Down
22 changes: 21 additions & 1 deletion spec/features/work_show_spec.rb
Expand Up @@ -182,7 +182,17 @@
let(:work) do
FactoryBot.valkyrie_create(
:comet_in_moominland,
:public
:public,
abstract: "some fairy creatures meet a child from Sweden I think",
access_right: "open",
alternative_title: "mooninland",
contributor: "Mystery",
identifier: "867-5309",
publisher: "Books Incorporated",
language: "English",
license: "public domain",
rights_notes: "no rights reserved",
source: "springwater"
)
end

Expand All @@ -192,6 +202,16 @@

it "shows a work" do
expect(page).to have_selector 'h1', text: 'Comet in Moominland'
expect(page).to have_selector 'dt', text: 'Abstract'
expect(page).to have_selector 'dt', text: 'Access right'
expect(page).to have_selector 'dt', text: 'Alternative title'
expect(page).to have_selector 'dt', text: 'Contributor'
expect(page).to have_selector 'dt', text: 'Identifier'
expect(page).to have_selector 'dt', text: 'Publisher'
expect(page).to have_selector 'dt', text: 'Language'
expect(page).to have_selector 'dt', text: 'License'
expect(page).to have_selector 'dt', text: 'Rights notes'
expect(page).to have_selector 'dt', text: 'Source'

# Doesn't have the upload form for uploading more files
expect(page).not_to have_selector "form#fileupload"
Expand Down

0 comments on commit 7e20baa

Please sign in to comment.