ANW-1844: Render request modal conditionally based on pui_page_actions_request#3516
Merged
ANW-1844: Render request modal conditionally based on pui_page_actions_request#3516
pui_page_actions_request#3516Conversation
8774133 to
c67ca3a
Compare
188a2d2 to
d3b9e6d
Compare
thimios
requested changes
Apr 16, 2025
| describe 'Request modal', js: true do | ||
| before(:all) do | ||
| @resource = create(:resource, publish: true) | ||
| run_indexers |
Collaborator
There was a problem hiding this comment.
I don't think you need to run indexers since you are directly accessing the resource page in these specs
Collaborator
Author
There was a problem hiding this comment.
@thimios I'm not sure this suggestion is correct as the test broke after removing run_indexers, see https://github.com/archivesspace/archivesspace/actions/runs/14499815813/job/40676562268. Adding it back makes the test pass.
Collaborator
There was a problem hiding this comment.
@brianzelip you are right! My suggestion would work on the SUI feature specs but not on the PUI
fe38f23 to
ccd7816
Compare
ccd7816 to
1b75d27
Compare
thimios
approved these changes
Apr 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes ANW-1844 by not adding the PUI request modal to the DOM when
AppConfig[:pui_page_actions_request]isfalse.Solution
The following screenshot shows that the "Request" button is not present in the toolbar towards the top of the page. It also shows the browser dev tools confirming that
#request_modal, the CSS selector for the modal element containing the request form, is not present in the DOM.