-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[App Search] Load curation settings at root /curations/ path #115690
[App Search] Load curation settings at root /curations/ path #115690
Conversation
…ationsLogic.actions.loadCurations()
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
@@ -126,14 +126,14 @@ describe('Curations', () => { | |||
|
|||
describe('loading state', () => { | |||
it('renders a full-page loading state on initial page load', () => { | |||
setMockValues({ ...values, dataLoading: true, curations: [] }); | |||
setMockValues({ ...values, dataLoading: true }); |
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.
Fun fact: this will mock both CurationsSettingsLogic.values.dataLoading
and CurationsLogic.valaues.dataLoading
at the same time, because they share a prop name, and all of our mocked properties share the same object. So there's actually not a way to test each of those individually. We'd need to 1) update the value name in one or both of these logic files or 2) refactor setMockValues
so that it is possible to associate a mocked value with a specific logic.
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.
"Fun"
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.
I vote for refactoring setMockValues
to use namespaces. It would fix this issue, and then we'd also no longer need to add comments to our tests specifying which logic values are associated with.
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.
Hey Byron, I'm approving this. There is a small typo in a test description but looks good otherwise. Also in the process of pulling this down to test it but Optimizer is running slow, but I'm approving either way.
@@ -126,14 +126,14 @@ describe('Curations', () => { | |||
|
|||
describe('loading state', () => { | |||
it('renders a full-page loading state on initial page load', () => { | |||
setMockValues({ ...values, dataLoading: true, curations: [] }); | |||
setMockValues({ ...values, dataLoading: true }); |
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.
"Fun"
@@ -126,14 +126,14 @@ describe('Curations', () => { | |||
|
|||
describe('loading state', () => { | |||
it('renders a full-page loading state on initial page load', () => { | |||
setMockValues({ ...values, dataLoading: true, curations: [] }); | |||
setMockValues({ ...values, dataLoading: true }); |
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.
I vote for refactoring setMockValues
to use namespaces. It would fix this issue, and then we'd also no longer need to add comments to our tests specifying which logic values are associated with.
expect(MOCK_ACTIONS.loadCurationsSettings).toHaveBeenCalledTimes(1); | ||
}); | ||
|
||
it('skips loading curation settings when log retention is enabled', () => { |
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.
it('skips loading curation settings when log retention is enabled', () => { | |
it('skips loading curation settings when log retention is disabled', () => { |
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.
Fixed in ca74603
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
#115803) Co-authored-by: Byron Hulcher <[email protected]>
…lastic#115690)" This reverts commit c9bca2c.
…115690)" (#116462) (#116497) Co-authored-by: Byron Hulcher <[email protected]>
Summary
This will prevent us from showing the Suggestions table on the Curations Overview page when the user has disabled suggesstions.
Checklist