-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat(lxl-web): Add debug mode for relevancy scoring #1204
Conversation
d392eb5
to
132d464
Compare
@@ -16,8 +17,10 @@ export const load = async ({ params, url, locals, fetch }) => { | |||
redirect(303, `/`); // redirect to home page if no search params are given | |||
} | |||
|
|||
const debug = locals.userSettings?.debug.includes(DebugFlags.ES_SCORE) ? '&_debug=esScore' : ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what's causing the test to fail.
Try changing it to
const debug = locals.userSettings?.debug?.includes(DebugFlags.ES_SCORE) ? '&_debug=esScore' : '';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because: the test in question is changing the facet sorting, and thereby creating a settings cookie in userSettings. So it has locals.userSettings
but not debug
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! That was it. Missed it when changing it from a boolean to an array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Add debug mode for relevancy scoring.
?_debug=esScore
, disable with?_debug=false
Tickets involved
LWS-296