diff --git a/config/locales/cho.yml b/config/locales/cho.yml index 9c590425..dad5975c 100644 --- a/config/locales/cho.yml +++ b/config/locales/cho.yml @@ -11,31 +11,31 @@ en: form: metadata: "Basic Metadata" workflow: "Workflow" - visibility: "Visibility" + visibility: "Access Level" file_selection: "File Selection" field_label: # For fields that are not in the data dictionary collection_type: "Collection Type" - work_type: "Work Type" + work_type: "Resource Type" workflow: "Workflow" - default: "Publish immediately" + default: "Publish Immediately" mediated: "Mediated" - visibility: "Visibility" - public: "Public" - authenticated: "Authenticated" - private: "Private" + visibility: "Access Level" + public: "Public Access" + authenticated: "PSU Access" + private: "Restricted Access" title: "Title" required: "required" member_of_collections: "Collections" role: "Role" header_links: create_collection: "Create Collection" - create_submission: "Create Work" + create_submission: "Create Resource" data_dictionary: "Data Dictionary" select: "Select Resources" work: - csv_create: "Import New Works" - csv_update: "Update Works" + csv_create: "Import New Resources" + csv_update: "Update Resources" agent: list: "List Agents" csv_create: "Import New Agents" @@ -43,33 +43,33 @@ en: manage: "Manage" work: new: - heading: "New %{type} Work" - submit: "Create Work" - no_type: "Unable to find work type" + heading: "New %{type} Resource" + submit: "Create Resource" + no_type: "Unable to find resource type" back_link: "Back" edit: - heading: "Editing Work" - submit: "Update Work" + heading: "Editing Resource" + submit: "Update Resource" show_link: "Show" - delete_link: "Delete Work" + delete_link: "Delete Resource" delete_confirmation: "Are you sure?" - error: "%{count} prohibited this work from being saved:" + error: "%{count} prohibited this resource from being saved:" show: - files_heading: "Files" + files_heading: "Parts" collection: members: title: "Title" date_created: "Date Created" - heading: "Items in this Collection" + heading: "Resources in this Collection" archival_collection: edit: - delete_link: "Delete Archival collection" + delete_link: "Delete Archival Collection" library_collection: edit: - delete_link: "Delete Library collection" + delete_link: "Delete Library Collection" curated_collection: edit: - delete_link: "Delete Curated collection" + delete_link: "Delete Curated Collection" agent: index: heading: "Agents" @@ -77,7 +77,7 @@ en: new: "Create New Agent" show: "Show" edit: "Edit" - destroy: "Destroy" + destroy: "Delete" confirm: "Are you sure you want to delete this agent?" given_name: "Given Name" surname: "Surname" @@ -85,11 +85,11 @@ en: agent: create: heading: 'CSV Agent Import' - description: 'Import a csv that creates new agents.' + description: 'Import a CSV that creates new agents.' submit: 'Preview Import' update: heading: 'CSV Agent Import' - description: 'Import a csv that updates existing agents.' + description: 'Import a CSV that updates existing agents.' submit: 'Preview Import' dry_run: heading: 'Agent Import Preview' @@ -106,17 +106,17 @@ en: work: create: heading: 'CSV Import' - description: 'Import a csv that creates new works.' + description: 'Import a CSV that creates new resources.' submit: 'Preview Import' update: heading: 'CSV Import' - description: 'Import a csv that updates existing works.' + description: 'Import a CSV that updates existing resources.' submit: 'Preview Import' dry_run: heading: 'Import Preview' - create_description: 'The following new works will be created' - update_description: 'The following works will be updated' - error_count_message: "Total Number of Works with Errors %{count}" + create_description: 'The following new resources will be created' + update_description: 'The following resources will be updated' + error_count_message: "Total Number of Resources with Errors %{count}" preview_table: title: "Title" status: "Status" @@ -131,29 +131,29 @@ en: header: "Failed Import" success: header: "Successful Import" - new_import: "Perform Additional Import" + new_import: "Perform Another Import" metrics: benchmark_heading: "User,System,Total,Real" collection: - title: "Test Collection with Many Works" - description: "An example collection used for benchmarking with many works not containing files." - work_title: "Sample Work %{count}" + title: "Test Collection with Many Resources Without Files" + description: "An example collection used for benchmarking with many resources not containing files." + work_title: "Sample Resource %{count}" work: - title: "Test Collection with Works Containing Files" - description: "An example collection used for benchmarking with many works that each contain a 50 MB file." - work_title: "Sample Work with File %{count}" + title: "Test Collection with Many Resources With Files" + description: "An example collection used for benchmarking with many resources that each contain a 50 MB file." + work_title: "Sample Resource with File %{count}" batch: select: heading: "Select Resources" - message: "Search for items to delete from the repository" + message: "Search for resources to delete." delete: heading: "Delete Confirmation" - message: "The following resources will be deleted" + message: "The following resources will be deleted:" continue: "Continue" - success: "You have successfully deleted the following items: %{list}" + success: "You have successfully deleted the following: %{list}" cancel: "Cancel" submit: "Delete Selected Resources" - title: "%{title} (%{count} items)" + title: "%{title} (%{count})" stale_object_error: ": the %{object_name} object you tried to save is stale. Please reload the form to see the latest data." validation: creator: diff --git a/spec/blacklight/catalog_spec.rb b/spec/blacklight/catalog_spec.rb index 4b46362f..b27f5b9f 100644 --- a/spec/blacklight/catalog_spec.rb +++ b/spec/blacklight/catalog_spec.rb @@ -21,7 +21,7 @@ expect(page).to have_link('Searching Collection') end within('div.blacklight-work_type_ssim') do - expect(page).to have_selector('h3', text: 'Work Type') + expect(page).to have_selector('h3', text: 'Resource Type') expect(page).to have_link('Generic') end within('div.blacklight-collection_type_ssim') do diff --git a/spec/cho/agent/import/update_spec.rb b/spec/cho/agent/import/update_spec.rb index cf8f136d..63c7f81f 100644 --- a/spec/cho/agent/import/update_spec.rb +++ b/spec/cho/agent/import/update_spec.rb @@ -15,7 +15,7 @@ it 'successfully updates the works' do visit(csv_agents_update_path) expect(page).to have_selector('h1', text: 'CSV Agent Import') - expect(page).to have_content('Import a csv that updates existing agents') + expect(page).to have_content('Import a CSV that updates existing agents') attach_file('csv_file_file', csv_file.path) click_button('Preview Import') expect(page).to have_selector('h1', text: 'Import Preview') diff --git a/spec/cho/batch/delete_controller_spec.rb b/spec/cho/batch/delete_controller_spec.rb index 0c1ff413..99623f56 100644 --- a/spec/cho/batch/delete_controller_spec.rb +++ b/spec/cho/batch/delete_controller_spec.rb @@ -27,7 +27,7 @@ delete :destroy, params: { delete: { ids: [work.to_param, collection.to_param] } } }.to change { metadata_adapter.query_service.find_all.to_a.count }.by(-2) expect(flash[:success]).to eq( - I18n.t('cho.batch.delete.success', list: 'Sample Generic Work (0 items), Archival Collection (0 items)') + I18n.t('cho.batch.delete.success', list: 'Sample Generic Work (0), Archival Collection (0)') ) end end diff --git a/spec/cho/batch/delete_presenter_spec.rb b/spec/cho/batch/delete_presenter_spec.rb index aaadc0d3..4f7987ed 100644 --- a/spec/cho/batch/delete_presenter_spec.rb +++ b/spec/cho/batch/delete_presenter_spec.rb @@ -14,7 +14,7 @@ let(:work) { build(:work) } - its(:confirmation_title) { is_expected.to eq('Sample Generic Work (0 items)') } + its(:confirmation_title) { is_expected.to eq('Sample Generic Work (0)') } end describe '#children' do diff --git a/spec/cho/batch/select_spec.rb b/spec/cho/batch/select_spec.rb index ba1288a8..402becb2 100644 --- a/spec/cho/batch/select_spec.rb +++ b/spec/cho/batch/select_spec.rb @@ -21,9 +21,9 @@ find("input[id='delete_ids_#{work.id}']").click click_button('Delete Selected Resources') expect(page).to have_content('The following resources will be deleted') - expect(page).to have_selector('h2', text: 'Resource to delete (3 items)') + expect(page).to have_selector('h2', text: 'Resource to delete (3)') click_button('Continue') - expect(page).to have_content('You have successfully deleted the following items: Resource to delete ') + expect(page).to have_content('You have successfully deleted the following: Resource to delete (3)') end end end diff --git a/spec/cho/collection/archival_collections/edit_spec.rb b/spec/cho/collection/archival_collections/edit_spec.rb index 2dfb5251..231dd4a0 100644 --- a/spec/cho/collection/archival_collections/edit_spec.rb +++ b/spec/cho/collection/archival_collections/edit_spec.rb @@ -33,11 +33,11 @@ context 'when deleting the collection' do it 'removes it from the system' do visit(edit_archival_collection_path(resource)) - click_button('Delete Archival collection') + click_button('Delete Archival Collection') expect(page).to have_content('The following resources will be deleted') expect(page).to have_content(resource.title.first) click_button('Continue') - expect(page).to have_content('You have successfully deleted the following items') + expect(page).to have_content('You have successfully deleted the following') expect(page).to have_content(resource.title.first) expect(Collection::Archival.all.count).to eq(0) expect(adapter.index_adapter.query_service.find_all.count).to eq(0) diff --git a/spec/cho/collection/archival_collections/new_spec.rb b/spec/cho/collection/archival_collections/new_spec.rb index 731b150c..d9555a62 100644 --- a/spec/cho/collection/archival_collections/new_spec.rb +++ b/spec/cho/collection/archival_collections/new_spec.rb @@ -10,7 +10,7 @@ fill_in('archival_collection[subtitle]', with: 'new subtitle') fill_in('archival_collection[description]', with: 'Description of new collection') choose('Mediated') - choose('Authenticated') + choose('PSU Access') click_button('Create Archival collection') expect(page).to have_content('New Title') expect(page).to have_content('new subtitle') diff --git a/spec/cho/collection/curated_collections/edit_spec.rb b/spec/cho/collection/curated_collections/edit_spec.rb index 92edce1d..17e52f07 100644 --- a/spec/cho/collection/curated_collections/edit_spec.rb +++ b/spec/cho/collection/curated_collections/edit_spec.rb @@ -33,11 +33,11 @@ context 'when deleting the collection' do it 'removes it from the system' do visit(edit_curated_collection_path(resource)) - click_button('Delete Curated collection') + click_button('Delete Curated Collection') expect(page).to have_content('The following resources will be deleted') expect(page).to have_content(resource.title.first) click_button('Continue') - expect(page).to have_content('You have successfully deleted the following items') + expect(page).to have_content('You have successfully deleted the following') expect(page).to have_content(resource.title.first) expect(Collection::Curated.all.count).to eq(0) expect(adapter.index_adapter.query_service.find_all.count).to eq(0) diff --git a/spec/cho/collection/curated_collections/new_spec.rb b/spec/cho/collection/curated_collections/new_spec.rb index 9281cdec..0d2776dc 100644 --- a/spec/cho/collection/curated_collections/new_spec.rb +++ b/spec/cho/collection/curated_collections/new_spec.rb @@ -10,7 +10,7 @@ fill_in('curated_collection[subtitle]', with: 'new subtitle') fill_in('curated_collection[description]', with: 'Description of new collection') choose('Mediated') - choose('Authenticated') + choose('PSU Access') click_button('Create Curated collection') expect(page).to have_content('New Title') expect(page).to have_content('new subtitle') diff --git a/spec/cho/collection/library_collections/edit_spec.rb b/spec/cho/collection/library_collections/edit_spec.rb index 65a1c9dd..d4249a8a 100644 --- a/spec/cho/collection/library_collections/edit_spec.rb +++ b/spec/cho/collection/library_collections/edit_spec.rb @@ -33,11 +33,11 @@ context 'when deleting the collection' do it 'removes it from the system' do visit(edit_library_collection_path(resource)) - click_button('Delete Library collection') + click_button('Delete Library Collection') expect(page).to have_content('The following resources will be deleted') expect(page).to have_content(resource.title.first) click_button('Continue') - expect(page).to have_content('You have successfully deleted the following items') + expect(page).to have_content('You have successfully deleted the following') expect(page).to have_content(resource.title.first) expect(Collection::Library.all.count).to eq(0) expect(adapter.index_adapter.query_service.find_all.count).to eq(0) diff --git a/spec/cho/collection/library_collections/new_spec.rb b/spec/cho/collection/library_collections/new_spec.rb index 24463e99..2db5dc81 100644 --- a/spec/cho/collection/library_collections/new_spec.rb +++ b/spec/cho/collection/library_collections/new_spec.rb @@ -10,7 +10,7 @@ fill_in('library_collection[subtitle]', with: 'new subtitle') fill_in('library_collection[description]', with: 'Description of new collection') choose('Mediated') - choose('Authenticated') + choose('PSU Access') click_button('Create Library collection') expect(page).to have_content('New Title') expect(page).to have_content('new subtitle') diff --git a/spec/cho/home_page_spec.rb b/spec/cho/home_page_spec.rb index 8f5696f8..96fe7f59 100644 --- a/spec/cho/home_page_spec.rb +++ b/spec/cho/home_page_spec.rb @@ -18,10 +18,10 @@ expect(page).to have_content('New Library Collection') click_link('Curated Collection') expect(page).to have_content('New Curated Collection') - expect(page).to have_link('Create Work') + expect(page).to have_link('Create Resource') click_link('Generic') - expect(page).to have_content('New Generic Work') + expect(page).to have_content('New Generic Resource') click_link('Document') - expect(page).to have_content('New Document Work') + expect(page).to have_content('New Document Resource') end end diff --git a/spec/cho/metrics/collection_spec.rb b/spec/cho/metrics/collection_spec.rb index 4197c347..328b9d9e 100644 --- a/spec/cho/metrics/collection_spec.rb +++ b/spec/cho/metrics/collection_spec.rb @@ -31,7 +31,7 @@ header, results = report.string.split("\n") expect(header).to eq(' User,System,Total,Real') expect(results.split(',').count).to eq(4) - expect(collection.members.first.title).to contain_exactly('Sample Work 1') + expect(collection.members.first.title).to contain_exactly('Sample Resource 1') expect($stdout).to be(STDOUT) end end diff --git a/spec/cho/work/file_set/delete_spec.rb b/spec/cho/work/file_set/delete_spec.rb index 88fa3f5e..4b6e9b51 100644 --- a/spec/cho/work/file_set/delete_spec.rb +++ b/spec/cho/work/file_set/delete_spec.rb @@ -16,8 +16,8 @@ expect(page).to have_content(resource.title.first) expect(page).to have_selector('li', text: 'File: hello_world.txt') click_button('Continue') - expect(page).to have_content('You have successfully deleted the following items') - expect(page).to have_content('File Set to Delete (1 items)') + expect(page).to have_content('You have successfully deleted the following') + expect(page).to have_content('File Set to Delete (1)') expect(Work::File.all.count).to eq(0) expect(Work::FileSet.all.count).to eq(0) expect(adapter.index_adapter.query_service.find_all.count).to eq(2) diff --git a/spec/cho/work/import/create_spec.rb b/spec/cho/work/import/create_spec.rb index 16e8372c..87ef6e59 100644 --- a/spec/cho/work/import/create_spec.rb +++ b/spec/cho/work/import/create_spec.rb @@ -49,8 +49,8 @@ expect(page).to have_selector('h2', text: 'Bag Status') expect(page).to have_selector('h2', text: 'CSV Status') expect(page).to have_content('The bag is valid and contains no errors') - expect(page).to have_content('The following new works will be created') - expect(page).to have_content('Total Number of Works with Errors 0') + expect(page).to have_content('The following new resources will be created') + expect(page).to have_content('Total Number of Resources with Errors 0') within('table') do expect(page).to have_selector('th', text: 'Title') expect(page).to have_selector('th', text: 'Status') @@ -139,8 +139,8 @@ expect(page).to have_selector('h2', text: 'Bag Status') expect(page).to have_selector('h2', text: 'CSV Status') expect(page).to have_content('The bag is valid and contains no errors') - expect(page).to have_content('The following new works will be created') - expect(page).to have_content('Total Number of Works with Errors 0') + expect(page).to have_content('The following new resources will be created') + expect(page).to have_content('Total Number of Resources with Errors 0') within('table') do expect(page).to have_selector('th', text: 'Title') expect(page).to have_selector('th', text: 'Status') @@ -238,8 +238,8 @@ expect(page).to have_selector('h2', text: 'Bag Status') expect(page).to have_selector('h2', text: 'CSV Status') expect(page).to have_content('The bag is valid and contains no errors') - expect(page).to have_content('The following new works will be created') - expect(page).to have_content('Total Number of Works with Errors 0') + expect(page).to have_content('The following new resources will be created') + expect(page).to have_content('Total Number of Resources with Errors 0') click_button('Perform Import') expect(page).to have_selector('h1', text: 'Successful Import') within('ul.result-list') do @@ -298,7 +298,7 @@ attach_file('csv_file_file', csv_file.path) click_button('Preview Import') expect(page).to have_selector('h1', text: 'Import Preview') - expect(page).to have_content('Total Number of Works with Errors 3') + expect(page).to have_content('Total Number of Resources with Errors 3') within('table.table') do expect(page).to have_content("Work type can't be blank") expect(page).to have_content("Title can't be blank") diff --git a/spec/cho/work/import/update_spec.rb b/spec/cho/work/import/update_spec.rb index fc3abf7e..f90407f4 100644 --- a/spec/cho/work/import/update_spec.rb +++ b/spec/cho/work/import/update_spec.rb @@ -15,12 +15,12 @@ it 'successfully updates the works' do visit(csv_works_update_path) expect(page).to have_selector('h1', text: 'CSV Import') - expect(page).to have_content('Import a csv that updates existing works') + expect(page).to have_content('Import a CSV that updates existing resources') attach_file('csv_file_file', csv_file.path) click_button('Preview Import') expect(page).to have_selector('h1', text: 'Import Preview') - expect(page).to have_content('The following works will be updated') - expect(page).to have_content('Total Number of Works with Errors 0') + expect(page).to have_content('The following resources will be updated') + expect(page).to have_content('Total Number of Resources with Errors 0') within('table') do expect(page).to have_selector('th', text: 'Title') expect(page).to have_selector('th', text: 'Status') @@ -72,7 +72,7 @@ attach_file('csv_file_file', csv_file.path) click_button('Preview Import') expect(page).to have_selector('h1', text: 'Import Preview') - expect(page).to have_content('Total Number of Works with Errors 1') + expect(page).to have_content('Total Number of Resources with Errors 1') within('table.table') do expect(page).to have_content("Title can't be blank") end diff --git a/spec/cho/work/submissions/change_set_spec.rb b/spec/cho/work/submissions/change_set_spec.rb index bab91531..0797fbda 100644 --- a/spec/cho/work/submissions/change_set_spec.rb +++ b/spec/cho/work/submissions/change_set_spec.rb @@ -129,13 +129,13 @@ end describe '#submit_text' do - its(:submit_text) { is_expected.to eq('Create Work') } + its(:submit_text) { is_expected.to eq('Create Resource') } context 'save work' do let(:unsaved_work) { Work::Submission.new } let(:resource) { Valkyrie.config.metadata_adapter.persister.save(resource: unsaved_work) } - its(:submit_text) { is_expected.to eq('Update Work') } + its(:submit_text) { is_expected.to eq('Update Resource') } end end diff --git a/spec/cho/work/submissions/delete_spec.rb b/spec/cho/work/submissions/delete_spec.rb index cecbbff8..3430d755 100644 --- a/spec/cho/work/submissions/delete_spec.rb +++ b/spec/cho/work/submissions/delete_spec.rb @@ -10,15 +10,15 @@ visit(polymorphic_path([:solr_document], id: resource.id)) expect(page).to have_selector('li', text: 'hello_world.txt') click_link('Edit') - click_button('Delete Work') + click_button('Delete Resource') expect(page).to have_content('The following resources will be deleted') expect(page).to have_content(resource.title.first) expect(page).to have_selector('li', text: 'File set: hello_world.txt') expect(page).to have_selector('li', text: 'File: hello_world.txt') expect(page).to have_selector('li', text: 'File: hello_world.txt_text.txt') click_button('Continue') - expect(page).to have_content('You have successfully deleted the following items') - expect(page).to have_content('Work to delete (3 items)') + expect(page).to have_content('You have successfully deleted the following') + expect(page).to have_content('Work to delete (3)') expect(Work::Submission.all.count).to eq(0) expect(Work::File.all.count).to eq(0) expect(Collection::Archival.all.count).to eq(1) diff --git a/spec/cho/work/submissions/edit_spec.rb b/spec/cho/work/submissions/edit_spec.rb index 45dd0e19..3b7a495e 100644 --- a/spec/cho/work/submissions/edit_spec.rb +++ b/spec/cho/work/submissions/edit_spec.rb @@ -13,13 +13,13 @@ visit(edit_work_path(resource)) expect(page).to have_field('work_submission_creator_role', with: resource.creator.first[:role]) expect(page).to have_field('work_submission_creator_agent', with: resource.creator.first[:agent]) - expect(page).to have_content('Editing Work') + expect(page).to have_content('Editing Resource') expect(page).to have_selector('h2', text: 'Work to edit') expect(page).to have_link('Show') expect(page).to have_field('Description', type: 'textarea', with: nil) fill_in('work_submission[title]', with: 'Updated Work Title') fill_in('work_submission[description]', with: 'Updated description') - click_button('Update Work') + click_button('Update Resource') expect(page).to have_content('Updated Work Title') expect(page).to have_content('Updated description') expect(solr_document.title_data_dictionary_field).to eq(['Updated Work Title']) @@ -31,9 +31,9 @@ it 'reports errors' do visit(edit_work_path(resource)) fill_in('work_submission[title]', with: '') - click_button('Update Work') + click_button('Update Resource') expect(page).to have_content("Title can't be blank") - expect(page).to have_content('1 error prohibited this work from being saved:') + expect(page).to have_content('1 error prohibited this resource from being saved:') end end end diff --git a/spec/cho/work/submissions/index_spec.rb b/spec/cho/work/submissions/index_spec.rb index f6b5c4b6..ff86a502 100644 --- a/spec/cho/work/submissions/index_spec.rb +++ b/spec/cho/work/submissions/index_spec.rb @@ -16,7 +16,7 @@ within('div#documents') do expect(page).to have_blacklight_label('title_tesim').with('Object Title') expect(page).to have_blacklight_field('title_tesim').with('Work Index View') - expect(page).to have_blacklight_label('work_type_ssim').with('Work Type') + expect(page).to have_blacklight_label('work_type_ssim').with('Resource Type') expect(page).to have_blacklight_field('work_type_ssim').with('Generic') expect(page).to have_blacklight_label('member_of_collection_ids_ssim').with('Member of Collection') expect(page).to have_blacklight_field('member_of_collection_ids_ssim').with('Library Collection') diff --git a/spec/cho/work/submissions/new_spec.rb b/spec/cho/work/submissions/new_spec.rb index 12920f55..28b6f885 100644 --- a/spec/cho/work/submissions/new_spec.rb +++ b/spec/cho/work/submissions/new_spec.rb @@ -16,9 +16,9 @@ it 'creates a new work object without a file' do visit(root_path) - click_link('Create Work') + click_link('Create Resource') click_link('Generic') - expect(page).to have_content('New Generic Work') + expect(page).to have_content('New Generic Resource') fill_in('work_submission[title]', with: 'New Title') fill_in('work_submission[subtitle]', with: 'New subtitle') fill_in('work_submission[description]', with: 'Description of new generic work.') @@ -28,7 +28,7 @@ fill_in('work_submission[member_of_collection_ids]', with: archival_collection.id) fill_in('work_submission[creator][role]', with: MockRDF.relators.first) fill_in('work_submission[creator][agent]', with: agent.id) - click_button('Create Work') + click_button('Create Resource') expect(page).to have_selector('h1', text: 'New Title') within('#document') do expect(page).to have_blacklight_label(:title_tesim, 'Object Title') @@ -43,7 +43,7 @@ expect(page).to have_blacklight_field(:generic_field_tesim, 'Sample generic field value') expect(page).to have_blacklight_label(:alternate_ids_tesim, 'Identifier') expect(page).to have_blacklight_field(:alternate_ids_tesim, 'id-asdf_1234') - expect(page).to have_blacklight_label(:work_type_ssim, 'Work Type') + expect(page).to have_blacklight_label(:work_type_ssim, 'Resource Type') expect(page).to have_blacklight_field(:work_type_ssim, 'Generic') expect(page).to have_blacklight_label(:member_of_collection_ids_ssim, 'Member of Collection') expect(page).to have_blacklight_field(:member_of_collection_ids_ssim, 'Sample Collection') @@ -61,18 +61,18 @@ it 'reports the errors' do visit(root_path) - click_link('Create Work') + click_link('Create Resource') click_link('Document') - expect(page).to have_content('New Document Work') - click_button('Create Work') + expect(page).to have_content('New Document Resource') + click_button('Create Resource') within('.error-explanation') do - expect(page).to have_selector('h2', text: '2 errors prohibited this work from being saved:') + expect(page).to have_selector('h2', text: '2 errors prohibited this resource from being saved:') expect(page).to have_content("Title can't be blank") expect(page).to have_content("Member of collection ids can't be blank") end fill_in('work_submission[title]', with: 'Required Title') fill_in('work_submission[member_of_collection_ids]', with: archival_collection.id) - click_button('Create Work') + click_button('Create Resource') expect(page).to have_content('Required Title') expect(page).to have_content('Document') expect(page).to have_link('Edit') @@ -82,7 +82,7 @@ context 'with a non-existent work type' do it 'reports the error in the form' do visit(new_work_path(work_type_id: 'bogus-work-type-id')) - expect(page).to have_content('Unable to find work type') + expect(page).to have_content('Unable to find resource type') end end @@ -91,17 +91,17 @@ it 'creates a new work object with a file' do visit(root_path) - click_link('Create Work') + click_link('Create Resource') click_link('Generic') - expect(page).to have_content('New Generic Work') + expect(page).to have_content('New Generic Resource') fill_in('work_submission[title]', with: 'New Title') fill_in('work_submission[member_of_collection_ids]', with: archival_collection.id) attach_file('File Selection', Pathname.new(fixture_path).join('hello_world.txt')) - click_button('Create Work') + click_button('Create Resource') expect(page).to have_content('New Title') expect(page).to have_content('Generic') expect(page).to have_link('Edit') - expect(page).to have_selector('h2', text: 'Files') + expect(page).to have_selector('h2', text: 'Parts') expect(page).to have_content('hello_world.txt') end end @@ -122,17 +122,17 @@ it 'creates a new work object with files from zip' do visit(root_path) - click_link('Create Work') + click_link('Create Resource') click_link('Generic') - expect(page).to have_content('New Generic Work') + expect(page).to have_content('New Generic Resource') fill_in('work_submission[title]', with: 'Work with attached zip') fill_in('work_submission[member_of_collection_ids]', with: archival_collection.id) attach_file('File Selection', zip_file) - click_button('Create Work') + click_button('Create Resource') expect(page).to have_content('Work with attached zip') expect(page).to have_content('Generic') expect(page).to have_link('Edit') - expect(page).to have_selector('h2', text: 'Files') + expect(page).to have_selector('h2', text: 'Parts') expect(page).to have_content('work1_preservation.tif') end end @@ -166,19 +166,19 @@ it 'creates a new work object with file sets, files, and a thumbnail from the zip' do visit(root_path) - click_link('Create Work') + click_link('Create Resource') click_link('Generic') - expect(page).to have_content('New Generic Work') + expect(page).to have_content('New Generic Resource') fill_in('work_submission[title]', with: 'Work and file sets with attached zip') fill_in('work_submission[member_of_collection_ids]', with: archival_collection.id) attach_file('File Selection', zip_file) - click_button('Create Work') + click_button('Create Resource') expect(page).to have_content('Work and file sets with attached zip') expect(page).to have_content('Generic') expect(page).to have_xpath("//img[@src='/files/work1_thumb.jpg']") expect(page).to have_xpath("//img[@alt='Work1 thumb']") expect(page).to have_link('Edit') - expect(page).to have_selector('h2', text: 'Files') + expect(page).to have_selector('h2', text: 'Parts') expect(page).to have_content('work1_00001_01_preservation.tif') expect(page).to have_content('work1_00001_02_preservation.tif') expect(page).to have_content('work1_00002_01_preservation.tif') @@ -214,19 +214,19 @@ it 'creates a new work object with file sets, files, and a thumbnail from the zip' do visit(root_path) - click_link('Create Work') + click_link('Create Resource') click_link('Generic') - expect(page).to have_content('New Generic Work') + expect(page).to have_content('New Generic Resource') fill_in('work_submission[title]', with: 'Work and file sets with an alternate thumbnail') fill_in('work_submission[member_of_collection_ids]', with: archival_collection.id) attach_file('File Selection', zip_file) - click_button('Create Work') + click_button('Create Resource') expect(page).to have_content('Work and file sets with an alternate thumbnail') expect(page).to have_content('Generic') expect(page).to have_xpath("//img[@src='/files/work1_00001_thumb.png']") expect(page).to have_xpath("//img[@alt='Work1 00001 thumb']") expect(page).to have_link('Edit') - expect(page).to have_selector('h2', text: 'Files') + expect(page).to have_selector('h2', text: 'Parts') expect(page).to have_link('work1_00001_preservation.tif') expect(page).to have_link('work1_access.pdf') diff --git a/spec/cho/work/submissions/show_spec.rb b/spec/cho/work/submissions/show_spec.rb index 96e735df..a13d1fdb 100644 --- a/spec/cho/work/submissions/show_spec.rb +++ b/spec/cho/work/submissions/show_spec.rb @@ -18,13 +18,13 @@ within('div#document') do expect(page).to have_blacklight_label('title_tesim').with('Object Title') expect(page).to have_blacklight_field('title_tesim').with('No files') - expect(page).to have_blacklight_label('work_type_ssim').with('Work Type') + expect(page).to have_blacklight_label('work_type_ssim').with('Resource Type') expect(page).to have_blacklight_field('work_type_ssim').with('Document') expect(page).to have_blacklight_label('member_of_collection_ids_ssim').with('Member of Collection') expect(page).to have_blacklight_field('member_of_collection_ids_ssim').with('Library Collection') expect(page).to have_link('Library Collection') end - expect(page).not_to have_selector('h2', text: 'Files') + expect(page).not_to have_selector('h2', text: 'Parts') end end @@ -36,10 +36,10 @@ within('div#document') do expect(page).to have_blacklight_label('title_tesim').with('Title') expect(page).to have_blacklight_field('title_tesim').with('An editable file') - expect(page).to have_blacklight_label('work_type_ssim').with('Work Type') + expect(page).to have_blacklight_label('work_type_ssim').with('Resource Type') expect(page).to have_blacklight_field('work_type_ssim').with('Document') end - expect(page).to have_selector('h2', text: 'Files') + expect(page).to have_selector('h2', text: 'Parts') expect(page).to have_content('hello_world.txt') click_link('Edit') expect(page).to have_field('work_submission[title]', with: 'An editable file') diff --git a/spec/support/shared/collections.rb b/spec/support/shared/collections.rb index 651d9ac6..dfed089b 100644 --- a/spec/support/shared/collections.rb +++ b/spec/support/shared/collections.rb @@ -9,7 +9,7 @@ it 'displays a paginated listing of its works' do visit(polymorphic_path([:solr_document], id: collection.id)) - expect(page).to have_content('Items in this Collection') + expect(page).to have_content('Resources in this Collection') within('div#members') do expect(page).to have_link('Work 1') expect(page).not_to have_link('Work 20') diff --git a/spec/support/shared/features.rb b/spec/support/shared/features.rb index 7468e216..2427d562 100644 --- a/spec/support/shared/features.rb +++ b/spec/support/shared/features.rb @@ -36,7 +36,7 @@ click_link('Generic') end within('.constraints-container') do - expect(page).to have_link('Remove constraint Work Type: Generic') + expect(page).to have_link('Remove constraint Resource Type: Generic') end expect(page).to have_content('Some exceptional content') end diff --git a/spec/views/archival_collections/edit.html.erb_spec.rb b/spec/views/archival_collections/edit.html.erb_spec.rb index 67ef9cf0..7f8ff01f 100644 --- a/spec/views/archival_collections/edit.html.erb_spec.rb +++ b/spec/views/archival_collections/edit.html.erb_spec.rb @@ -22,7 +22,7 @@ assert_select 'legend', 'Basic Metadata' assert_select 'label', /Title\s.* required/ assert_select 'legend', 'Workflow' - assert_select 'legend', 'Visibility' + assert_select 'legend', 'Access Level' end end end diff --git a/spec/views/archival_collections/new.html.erb_spec.rb b/spec/views/archival_collections/new.html.erb_spec.rb index ac194131..7fe5287d 100644 --- a/spec/views/archival_collections/new.html.erb_spec.rb +++ b/spec/views/archival_collections/new.html.erb_spec.rb @@ -21,7 +21,7 @@ assert_select 'legend', 'Basic Metadata' assert_select 'label', /Title\s.* required/ assert_select 'legend', 'Workflow' - assert_select 'legend', 'Visibility' + assert_select 'legend', 'Access Level' end end end diff --git a/spec/views/curated_collections/edit.html.erb_spec.rb b/spec/views/curated_collections/edit.html.erb_spec.rb index 0c0ce883..33934553 100644 --- a/spec/views/curated_collections/edit.html.erb_spec.rb +++ b/spec/views/curated_collections/edit.html.erb_spec.rb @@ -22,7 +22,7 @@ assert_select 'legend', 'Basic Metadata' assert_select 'label', /Title\s.* required/ assert_select 'legend', 'Workflow' - assert_select 'legend', 'Visibility' + assert_select 'legend', 'Access Level' end end end diff --git a/spec/views/curated_collections/new.html.erb_spec.rb b/spec/views/curated_collections/new.html.erb_spec.rb index 7bf33bf8..46851a49 100644 --- a/spec/views/curated_collections/new.html.erb_spec.rb +++ b/spec/views/curated_collections/new.html.erb_spec.rb @@ -21,7 +21,7 @@ assert_select 'legend', 'Basic Metadata' assert_select 'label', /Title\s.* required/ assert_select 'legend', 'Workflow' - assert_select 'legend', 'Visibility' + assert_select 'legend', 'Access Level' end end end diff --git a/spec/views/library_collections/edit.html.erb_spec.rb b/spec/views/library_collections/edit.html.erb_spec.rb index 9d4373b2..5d7d9994 100644 --- a/spec/views/library_collections/edit.html.erb_spec.rb +++ b/spec/views/library_collections/edit.html.erb_spec.rb @@ -22,7 +22,7 @@ assert_select 'legend', 'Basic Metadata' assert_select 'label', /Title\s.* required/ assert_select 'legend', 'Workflow' - assert_select 'legend', 'Visibility' + assert_select 'legend', 'Access Level' end end end diff --git a/spec/views/library_collections/new.html.erb_spec.rb b/spec/views/library_collections/new.html.erb_spec.rb index 692b8509..1419c11b 100644 --- a/spec/views/library_collections/new.html.erb_spec.rb +++ b/spec/views/library_collections/new.html.erb_spec.rb @@ -21,7 +21,7 @@ assert_select 'legend', 'Basic Metadata' assert_select 'label', /Title\s.* required/ assert_select 'legend', 'Workflow' - assert_select 'legend', 'Visibility' + assert_select 'legend', 'Access Level' end end end