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
Round offset to the nearest integer in tests #2142
Conversation
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.
Though it solves the issue on some setups, it still does not work everywhere.
For instance it doesn't pass for me in FF 60.0.2 (64-bit) @ Win 10.
The following gets reported:
Error details for tests/plugins/autocomplete/view
test get caret rect (inline)
Values should be equal.
Expected: 7 (number)
Actual: 8 (number)
test get caret rect with repositioned offset host (classic)
Values should be equal.
Expected: 7 (number)
Actual: 6.8000030517578125 (number)
test get caret rect with repositioned offset host (inline)
Values should be equal.
Expected: 7 (number)
Actual: 8 (number)
The feature works correctly, the problem is with tests on FF. I suggest we ignore this for now and fix it correctly in next minor release. |
Some more insights on failing test - it fails only when run from the dashboard. It passes if ran individually. It depends on screen resolution, it works when Here's a dump of
|
Simple change from |
What is the purpose of this pull request?
Failing test fix
What changes did you make?
I added
Math.ceil
to some assertions as Firefox sometimes returns non-integers.Closes #2141.