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

Fixes the Single Use Link delete button. #6990

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bwatson78
Copy link
Contributor

Summary

Fixes the link by forcing the method to be DELETE (it was defaulting to GET, causing a routing error), allowing it to perform without expecting a redirect (the #destroy controller action has no directive for redirect, just a head :ok response), and a onclick alert response because clicking Delete produces no affirmation to the user.

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

  • Create a Single-Use Link on a FileSet's show page.
  • Refresh the page, and then click the pull-down of Single-Use Links.
  • Click the Delete button of the Link instance.
  • After clicking, an alert window should appear announcing that the request was sent.
  • Refresh the page and the link shouldn't appear in the pull-down anymore.

Type of change (for release notes)

  • notes-bugfix Bug Fixes

Changes proposed in this pull request:

  • adds remote=true to link.
  • adds method="DELETE" to link.
  • affirms user that request was sent after clicking.

@samvera/hyrax-code-reviewers

Copy link

Test Results

    13 files  ±0      13 suites  ±0   3h 2m 29s ⏱️ + 1m 32s
 6 836 tests +3   6 533 ✅ ±0  299 💤 ±0  4 ❌ +3 
18 100 runs  ±0  17 619 ✅  - 3  477 💤 ±0  4 ❌ +3 

For more details on these failures, see this check.

Results for commit 9a023dc. ± Comparison against base commit 2c73a9b.

This pull request removes 360 and adds 363 tests. Note that renamed tests count towards both.
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f3a996f6910>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f75e7536ce0>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007fc5074808e0>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f3a9b094610>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f75eb39f798>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007fc5074bf158>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy AdminSet: 144a6096-fd80-4d25-a14a-ac6ce8860f52
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: a9a1778b-21ad-4ce9-876c-2c1dda804374
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: a9a17cfb-093c-45c8-aa14-5981a36e31a5
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit AdminSet: c4b111c2-51e1-452a-9fb4-e5dfa8bff09b
…
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f3e3a1e6548>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f44fae54750>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007ff5755ea160>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f3e42a80520>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f44fa6817d0>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007ff579cb1e18>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy AdminSet: aa1bbd6a-0a78-4892-bd96-d963f24870ea
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: 9358d73e-001f-4251-8f0c-d3ba35bb58af
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: dd4a3c4c-38cb-404f-95e2-c1d9b9801b71
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit AdminSet: 1f401b5a-e87d-440b-8e31-78ecc45998ae
…

@dlpierce
Copy link
Contributor

I cannot replicate the problem on either dev or pg nurax. I'm seeing a DELETE request and 200 response in the browser's network log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants