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

Collection Location field fixes; Valkyrize collection dashboard feature spec #6439

Merged
merged 21 commits into from
Nov 10, 2023

Conversation

dlpierce
Copy link
Contributor

Fixes

Fixes #5155 ; refs #3819

Summary

Improves support for the collection location field.

Guidance for testing, such as acceptance criteria or new user interface behaviors:

  • Collections in both dassie and koppie can set the location field using the geonames lookup form.
  • CollectionResource has basic metadata behaviors.

Detailed Description

This epic began with the goal of updating spec/features/dashboard/collection_spec.rb for valkyrie compatibility. However, due to differences in collection metadata in the established Collection and Hyrax::PcdmCollection models for dassie and koppie respectively, it became clear that the :hyrax_collection factory needed some changes.

Fields such as description and based_near are expected by the spec, but were not available on the bare bones Hyrax::PcdmCollection model generated by the hyrax_collection factory. The generated CollectionResource model is already present, although with some slight differences in metadata compared to the basic_metadata schema. The significant differences are creator is not a required form field, and description is a primary field. I believe by modifying the collection model used for most specs we can ensure the suggested inclusion of basic metadata into an application's collection model is well tested. Applications are still free to use a minimal collection based on PcdmCollection.

Once basic metadata was included, the based_near/location field demanded fixes to function on collections as it does for works. Some feature specs needed additional actions to trigger the additional fields button, or to supply a creator value.

Changes proposed in this pull request:

  • Adopt CollectionResource as the default model for the :hyrax_collection factory. The Wings model registry is modified during specs to reflect this.
  • Include the :basic_metadata schema in koppie's CollectionResource, bringing the model into closer alignment with what is in use in dassie.
  • Change the based_near form partial for collections to match works; fix specs broken by this.
  • Update a few collection specs for valkyrie and for use of CollectionResource.
  • Fix a flaky failure in the multiple membership checker.

@dlpierce dlpierce added notes-minor Release Notes: Non-breaking features notes-valkyrie Release Notes: Valkyrie specific notes-tests Release Notes: Spec or CI changes labels Nov 10, 2023
The old AdminSet form outputs a string, new AdministrativeSet form an array.
CollectionResource includes some properties that are expected by specs (description, based_near, etc)
Instead of using a large list of attributes that *almost* match basic metadata, use the basic metadata schema as suggested in the generated collection metadata schema config.
The significant differences for koppie are creator becomes a required form field, and some fields are secondary instead of primary. Real applications are still free to customize their collection model as desired.
This is for both ActiveFedora and Valkyrie models.
Old string values should still be compatible.
Fixes missing prepopulated location field on new forms.
…specs

This allows CollectionResource to be used when converting from AF, and PcdmCollection to still map to Collection. Does not affect operation outside of specs.
@bwatson78 bwatson78 merged commit cc11c0d into main Nov 10, 2023
4 checks passed
@bwatson78 bwatson78 deleted the valk-dash-col-feat-spec branch November 10, 2023 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes-minor Release Notes: Non-breaking features notes-tests Release Notes: Spec or CI changes notes-valkyrie Release Notes: Valkyrie specific
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for controlled Location field to Valkyrie forms
2 participants