-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[ui] Add tests for recently visited assets #20321
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @clairelin135 and the rest of your teammates on Graphite |
Deploy preview for dagit-core-storybook ready! ✅ Preview Built with commit 5718898. |
f64b3fc
to
0e3f279
Compare
4be4ae9
to
402da36
Compare
0e3f279
to
cf105b2
Compare
402da36
to
8513e6c
Compare
await waitFor(() => { | ||
expect(screen.queryByText('Loading assets…')).toBeNull(); | ||
}); | ||
// Second render displays the page in a loaded state |
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.
expect(fetchRecentlyVisitedAssetsFromLocalStorage()).toEqual([]);
to confirm it doesn't save it until after the loading finishes
cf105b2
to
bfc4326
Compare
8513e6c
to
bc3d7f2
Compare
assetKey, | ||
}, | ||
data: { | ||
assetOrError: { |
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.
buildAssetNotFoundError
for next time
Adds tests to preserve logic in #20266 that stores the N most recently-viewed assets: - Assert that when an asset is viewed, its asset key is stored in local storage - Assert that if a user tries to view a nonexistent asset, nothing is added to local storage Let me know if more detailed tests are needed, i.e. tests asserting LRU cache behavior.
Adds tests to preserve logic in #20266 that stores the N most recently-viewed assets:
Let me know if more detailed tests are needed, i.e. tests asserting LRU cache behavior.