-
Notifications
You must be signed in to change notification settings - Fork 529
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
Restore ability to search in Select fields #1805
Restore ability to search in Select fields #1805
Conversation
Let me fix the tests |
62c0257
to
0d1bd43
Compare
Codecov ReportAll modified lines are covered by tests ✅
📢 Thoughts on this report? Let us know!. |
e6e1568
to
6c4c170
Compare
|
6c4c170
to
bb36dbb
Compare
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
bb36dbb
to
388be22
Compare
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
388be22
to
7640a23
Compare
Signed-off-by: Prathamesh Mutkure <pmutkure009@gmail.com>
import { Select } from 'antd'; | ||
import SearchableSelect, { filterOptionsByLabel } from './SearchableSelect'; | ||
|
||
describe('SearchableSelect', () => { |
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.
You're missing the test of actually searching when typing. Instead of testing the internal findBy... function, you could've made those same tests from the perspective of the end user, who is typing into the field, not calling a 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.
Yes, that's how we initially planned to do it but isn't the part for showing matching options on the UI handled by Ant Design that is already tested? I can add an explicit UI test if that makes more sense
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.
Recently we broke the ability to search and no unit tests failed. If something changes in ant design regarding HOW filtering is supposed to be hooked up, no tests will fail again. So (a) we need to test for that, and (b) why restrict the input permission tests that you have to test inner function if we could test them end to end to the user facing behavior?
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.
Sure, that makes more sense
I am going to merge this so that it can make it into the next release, we can alter the tests in another PR. |
Which problem is this PR solving?
Description of the changes
How was this change tested?
Screenshot
Checklist
jaeger
:make lint test
jaeger-ui
:yarn lint
andyarn test