-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Updated controller.scatter.test.js to test default tooltip callbacks #5967
Updated controller.scatter.test.js to test default tooltip callbacks #5967
Conversation
@Madrussian did you see I'm not sure that this test really belongs in |
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.
@Madrussian it totally makes sense to have it in controller.scatter.test.js
since it's testing scatter defaults callbacks defined in the scatter controller. Just a minor change to make it simpler.
But do we need to test the tooltip functionality again? Maybe we should just test that the default config matches what we expect? Like in https://github.com/chartjs/Chart.js/blob/master/test/specs/scale.time.tests.js#L54 |
We are not really testing tooltip functionalities but that the default options are correctly consumed.
Testing defaults as in the time scale doesn't guarantee that we don't break the current behavior, which is an empty title and |
- This moves the mouse over the drawn point and verifies that there is no title in the tooltip and that the body contains expected content.
4ca06b3
to
b11d643
Compare
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.
Left one minor comment. Am ok with the content of the test
Thanks @Madrussian |
This moves the mouse over the drawn point and verifies that there is no title in the tooltip and that the body contains expected content.
What changed
no title in the tooltip and that the body contains expected.
Reason for change
Testing