UPSE-386: Update to optionally include 'favorite' flag in portlet sea…#2678
UPSE-386: Update to optionally include 'favorite' flag in portlet sea…#2678bjagg merged 1 commit intouPortal-Project:masterfrom
Conversation
Sonatype Lift is retiringSonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console. |
| ## | ||
| ## Flag to enable or disable the display of the favorite flag in the results | ||
| ## | ||
| org.apereo.portal.rest.search.PortletsSearchStrategy.favoriteFlagScore:true |
There was a problem hiding this comment.
Hmm, I set this to true but should it instead be 'false' by default?
There was a problem hiding this comment.
Since this is a new property I would be okay with it defaulting to true
64e0020 to
e5c7932
Compare
cbeach47
left a comment
There was a problem hiding this comment.
Changes look good @groybal ! Leaving the new API config as true works as long as the UX doesn't break with the new field present. Can you confirm the UX works with this new field?
For the tests, can you enhance https://github.com/uPortal-Project/uPortal-start/blob/master/tests/api/search-v5_0.spec.ts with the new field? Even if it's just checking the favorite flag is false, it'd be good. If it's simple/quick, it'd be great to create a new test that favorites a portlet and then confirm the API search call reflect that. Just create a PR in uPortal-start with the change, and once uPortal is released, we can merge in the uPortal-start testing PR.
Note: To run the playwright tests, build uPortal locally, then hook that local build into uPortal-start, and spin up uPortal. Once it's running, then run the uPortal-start gradle task playwrightRun .
I have not noticed any issues in the UX with the new field. |
cbeach47
left a comment
There was a problem hiding this comment.
LGTM, and thanks for adding the uP-start PW tests!
…rch results
Checklist
portal.propertiesCHANGES.mdDescription of change
The portlets search API ( /uPortal/api/v5-0/portal/search?q={search term}*&type=portlets) has been updated to include "favorite" property in the results.
A new property has been added to enable/disable this:
org.apereo.portal.rest.search.PortletsSearchStrategy.displayFavoriteFlagThere was no existing unit test class for PortletsSearchStrategy. A brief attempt to create one was made, but it was determined that it would take to much time and require some refactoring.