-
Notifications
You must be signed in to change notification settings - Fork 1
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(DataSource): Persist the last selected data source #60
Conversation
}); | ||
|
||
describe('if there is NO data source uid in the URL', () => { | ||
describe('if there is a data source in local storage', () => { |
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.
New unit test
expect(apiClient.baseUrl).toBe(expectedApiBaseUrl); | ||
}); | ||
}); | ||
function setupMocks(options?: { appUrl?: string; bootData?: Record<string, any>; dataSources?: Record<string, any> }) { |
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 took the opportunity to refactor these tests by creating the setupMocks
helper function.
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
✨ Description
Related issue(s): #42
📖 Summary of the changes
Now, when a user selects a different data source in the UI, it is stored in local storage.
This value is then used as default when the user revisits the Explore Profiles app.
🧪 How to test?
Manually, in an instance with multiple data sources: