Skip to content

Conversation

@scottgonzalez
Copy link
Member

Tests were failing in IE 10-11 with values that were off by 0.01 pixels.

@mention-bot
Copy link

@scottgonzalez, thanks for your PR! By analyzing the annotation information on this pull request, we identified @jzaefferer, @mikesherov and @arschmitz to be potential reviewers

Tests were failing in IE 10-11 with values that were off by 0.01 pixels.
actualDH = heightAfter - heightBefore;
actualDW = widthAfter - widthBefore;

assert.ok( Math.abs(actualDH - dh) <= 1 && Math.abs(actualDW - dw) <= 1, "resized[50, 50] " + msg );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using two assert.close() calls instead? It already does the Math.abs and comparison stuff.

Something like this (didn't test):

assert.close(actualDH, dh, 1, "...");
assert.close(actualDW, dw, 1, "...");

Would provide much more useful output for failures.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to, and I can, but it means updating every test that uses this helper to adjust the expected count.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, if we're going to do that, we should update the helper above, and probably many other places. Didn't seem worth it right now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Let's add a TODO comment then, for whenever we end up having to adjust all the tests anyway.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Let's add a TODO comment then, for whenever we end up having to adjust all the tests anyway.

Done.

@jzaefferer
Copy link
Member

👍

@scottgonzalez scottgonzalez deleted the dialog-test-resize branch August 31, 2016 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants