-
Notifications
You must be signed in to change notification settings - Fork 4
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
T458 license field display #562
Conversation
… to bulkrax zip staging directory, but will need to segregate files from each ETD into separate directoroes
…sing prerelease of next bulkrax release.
…sn't yet an admin set for admin to deposit to
…ut from ScholComm
Just got through these steps - couple of things I noticed, though might not be issues.
Re: tests - I tagged you in this PR for just directly taking the more fully functioned factories from Hyrax as we briefly discussed, so maybe we can take another pass at tests for this once we get that checked/merged. |
My apologies -- the deprecated field isn't available in the dropdown because it's marked If we're merging #557 after this one, we'll want to update the seeded works to use the non-deprecated license value. |
Sounds good! Yeah, seems fine to merge. Re: #557 - I'm going to work on it some more and see if I can figure out that problem with editing works, so I'll make that license field change while figuring that out. |
Workflow notes
This branch has been rebased with #300 (PR #555), so the latter should be merged first.
Changes
GwWork
andGwEtd
views to include the license field presenter (making the field visible).license.yml
):All rights reserved
value has been added, which will display as plain text.TEMP_FILE_BASE
environment variable, if present, instead of defaulting toscholarspace-hyrax/tmp
.gw_work
factory, and added logic associating a user's abilities with that work. (See note on test coverage below.)Reviewer instructions
metadata.csv
file, adding alicense
column and populating this column with the valueAll rights reserved
.All rights reserved (deprecated)
, and then runbundle exec rake gwss:replace_license_value
(in the appropriate environment). Verify that the license values have been updated for those works to the non-deprecatedAll rights reserved
.Test coverage
The current spec tests on this branch verify the visibility of the license field. I attempted to write a test for the
Edit
functionality in the UI, but I can't seem to get that working. A logged incontent-admin
user can access theEdit
form for the work and click theSave changes
button, but a) the changes don't seem to persist, and b) the work then becomes inaccessible to the user, even though the visibility on the work itself is stillopen
.I can't tell if this stems from a Capybara issue, or from an issue with how we're creating test works. I adapted code from the
create_dummy_works
Rake task for adding a user's ability to a work; this step seemed necessary in order for the logged-in user to be able to access theEdit
page. But I note that the works created with FactoryBot lack a value for thestate
field, which normally would contain a reference to a Fedora object -- could this be a problem?I haven't tried creating the work through Capybara actions; if the problem lies with FactoryBot, presumably, this approach would fix it. I'm happy to keep working on this, but perhaps @alepbloyd and I can coordinate efforts.