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

🧹 Rename image_form_spec to reflect decoration #37

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

jeremyf
Copy link
Contributor

@jeremyf jeremyf commented Oct 4, 2023

Prior to this commit the Knapsace image_form_spec had a test for terms
that was not part of the Hyku. We introduce these differences through our
decoration in ./app/forms/hyrax/image_form_decorator.rb

To reflect the existence of the decorator and not have a duplicate file
that future us would need to synchronize with Hyku, I've moved the file
and winnowed it down to reflect the specific changes.

I also needed to add three new properties to the spec as it reflects
upstream changes in Hyku (e.g. access_right alternative_title
rights_notes)

Diff of filein Hyku and Knapsack
❯ diff spec/forms/hyrax/image_form_spec.rb hyrax-webapp/spec/forms/hyrax/image_form_spec.rb
27,44d26
<   describe '.terms' do
<     it 'returns an array of inherited and custom terms' do
<       expect(described_class.terms.sort).to eq(
<         %i[
<           title creator contributor description keyword abstract
<           license rights_statement publisher date_created
<           subject language identifier based_near related_url
<           representative_id thumbnail_id rendering_ids files
<           visibility_during_embargo embargo_release_date visibility_after_embargo
<           visibility_during_lease lease_expiration_date visibility_after_lease
<           visibility ordered_member_ids source in_works_ids member_of_collection_ids
<           admin_set_id resource_type extent aark_id part_of place_of_publication
<           date_issued alt bibliographic_citation remote_url
<         ].sort
<       )
<     end
<   end
<

Related to:

Prior to this commit the Knapsace image_form_spec had a test for terms
that was not part of the Hyku.  We introduce these differences through our
decoration in ./app/forms/hyrax/image_form_decorator.rb

To reflect the existence of the decorator and not have a duplicate file
that future us would need to synchronize with Hyku, I've moved the file
and winnowed it down to reflect the specific changes.

I also needed to add three new properties to the spec as it reflects
upstream changes in Hyku (e.g. `access_right` `alternative_title`
`rights_notes`)

<details>
<summary>Diff of filein Hyku and Knapsack</summary>

```
❯ diff spec/forms/hyrax/image_form_spec.rb hyrax-webapp/spec/forms/hyrax/image_form_spec.rb
27,44d26
<   describe '.terms' do
<     it 'returns an array of inherited and custom terms' do
<       expect(described_class.terms.sort).to eq(
<         %i[
<           title creator contributor description keyword abstract
<           license rights_statement publisher date_created
<           subject language identifier based_near related_url
<           representative_id thumbnail_id rendering_ids files
<           visibility_during_embargo embargo_release_date visibility_after_embargo
<           visibility_during_lease lease_expiration_date visibility_after_lease
<           visibility ordered_member_ids source in_works_ids member_of_collection_ids
<           admin_set_id resource_type extent aark_id part_of place_of_publication
<           date_issued alt bibliographic_citation remote_url
<         ].sort
<       )
<     end
<   end
<
```
</details>

Related to:

- https://github.com/scientist-softserv/adventist-dl/issues/538
@jeremyf jeremyf merged commit cfa8f4d into main Oct 4, 2023
2 of 6 checks passed
@jeremyf jeremyf deleted the spec-forms-hyrax-image_form_spec branch October 4, 2023 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants