Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove keyword from required fields #3747

Merged
1 commit merged into from
Apr 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/forms/hyrax/forms/file_set_edit_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class FileSetEditForm

delegate :depositor, :permissions, to: :model

self.required_fields = [:title, :creator, :keyword, :license]
self.required_fields = [:title, :creator, :license]

self.model_class = ::FileSet

Expand Down
2 changes: 1 addition & 1 deletion app/forms/hyrax/forms/work_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class WorkForm
:visibility, :ordered_member_ids, :source, :in_works_ids,
:member_of_collection_ids, :admin_set_id]

self.required_fields = [:title, :creator, :keyword, :rights_statement]
self.required_fields = [:title, :creator, :rights_statement]

# The service that determines the cardinality of each field
self.field_metadata_service = Hyrax::FormMetadataService
Expand Down
1 change: 0 additions & 1 deletion lib/generators/hyrax/work/templates/feature_spec.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ RSpec.feature 'Create a <%= class_name %>', js: false do
click_link "Descriptions" # switch tab
fill_in('Title', with: 'My Test Work')
fill_in('Creator', with: 'Doe, Jane')
fill_in('Keyword', with: 'testing')
select('In Copyright', from: 'Rights statement')

# With selenium and the chrome driver, focus remains on the
Expand Down
1 change: 0 additions & 1 deletion spec/features/batch_create_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
end
click_link "Descriptions" # switch tab
fill_in('Creator', with: 'Doe, Jane')
fill_in('Keyword', with: 'testing')
select('In Copyright', from: 'Rights statement')
# With selenium and the chrome driver, focus remains on the
# select box. Click outside the box so the next line can't find
Expand Down
2 changes: 0 additions & 2 deletions spec/features/create_work_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
click_link "Descriptions" # switch tab
fill_in('Title', with: 'My Test Work')
fill_in('Creator', with: 'Doe, Jane')
fill_in('Keyword', with: 'testing')
select('In Copyright', from: 'Rights statement')
# With selenium and the chrome driver, focus remains on the
# select box. Click outside the box so the next line can't find
Expand Down Expand Up @@ -78,7 +77,6 @@
click_link "Descriptions" # switch tab
fill_in('Title', with: 'My Test Work')
fill_in('Creator', with: 'Doe, Jane')
fill_in('Keyword', with: 'testing')
select('In Copyright', from: 'Rights statement')
# With selenium and the chrome driver, focus remains on the
# select box. Click outside the box so the next line can't find
Expand Down
1 change: 0 additions & 1 deletion spec/features/dashboard/collection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,6 @@ def get_url_fragment(type)
click_link "Descriptions" # switch tab
fill_in('Title', with: 'New Work for Collection')
fill_in('Creator', with: 'Doe, Jane')
fill_in('Keyword', with: 'testing')
select('In Copyright', from: 'Rights statement')
# check required acceptance
check('agreement')
Expand Down
2 changes: 1 addition & 1 deletion spec/forms/hyrax/forms/batch_upload_form_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
describe "#primary_terms" do
subject { form.primary_terms }

it { is_expected.to eq [:creator, :keyword, :rights_statement] }
it { is_expected.to eq [:creator, :rights_statement] }
it { is_expected.not_to include(:title) }
end

Expand Down
6 changes: 3 additions & 3 deletions spec/forms/hyrax/generic_work_form_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
describe "#required_fields" do
subject { form.required_fields }

it { is_expected.to eq [:title, :creator, :keyword, :rights_statement] }
it { is_expected.to eq [:title, :creator, :rights_statement] }
end

describe "#primary_terms" do
subject { form.primary_terms }

it { is_expected.to eq [:title, :creator, :keyword, :rights_statement] }
it { is_expected.to eq [:title, :creator, :rights_statement] }
end

describe "#secondary_terms" do
subject { form.secondary_terms }

it do
is_expected.not_to include(:title, :creator, :keyword,
is_expected.not_to include(:title, :creator,
:visibilty, :visibility_during_embargo,
:embargo_release_date, :visibility_after_embargo,
:visibility_during_lease, :lease_expiration_date,
Expand Down