-
Notifications
You must be signed in to change notification settings - Fork 3.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
fix: Map type Variables selector shows keys, not values #15354
Conversation
|
||
expect(dropdownItems.length).toBe(Object.keys(values).length) | ||
expect(dropdownItems).toEqual(Object.keys(values)) |
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.
❤️
fireEvent.click(getByLabelText('Value')) | ||
fireEvent.click(getByTestId('dropdown--button')) | ||
Object.keys(variableValues).forEach(variableKey => { | ||
expect(getByText(variableKey)).toBeTruthy() |
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.
❤️
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.
Looks great :)
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.
👍
Thanks y'all! |
6dbcbda
to
fb65f5c
Compare
add test for hydrateVars dashboard variable dropdown test: inspect values, not just array length add RTL test for variable dropdown changes lint fix: Disable saving threshold check if no threshold selected (#15348) * Prevent check saving if no thresholds * Add tests * Add changes to changelog * make optional props optional * use false instead of null for boolean changelog fix(ui): ignore false change events in VariableForm (#15317) closes #15059 the issue is to persist user data across variable type selection interfaces within the variable editor. this commit pushes all of the variable editor information down to redux to allow persistence outside of the view state until the user clicks "cancel" or "create" in the interface.
fb65f5c
to
78244ce
Compare
Closes #14054
Map variable types are key-value pairs. Previously, the dashboard variable dropdown showed the keys (correct behavior), but the query variable dropdown would show values. Both now show keys.
Testing instructions (assuming you have variables):