Fixed unit test compatibility problems on Internet Explorer and Edge.

Review Request #9454 — Created Dec. 18, 2017 and submitted

Review Board

Unit tests were failing on Edge, partly due to missing ES6 features and
partly due to subtle browser differences. This change fixes those up,
allowing unit tests to work properly on all supported browsers.

Ran unit tests on Chrome, Firefox, Edge, and Internet Explorer.

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
  2. Does .is(':visible') not work on Edge? We use that a bunch.

    1. So it's weird, I haven't been able to figure this out, but basically in the context of this test environment, the tbody (for $whitespaceChunk) has an offsetWidth and offsetHeight of 0. This confuses the :visible support, making it always appear hidden, unconditionally. This only happens if the element starts off as hidden. Showing/hiding it later doesn't change these offsets. I've tried all sorts of things to change them, but it doesn't happen. So we can reliably check that the display has changed, but just not through :visible in this particular case.

      It works fine for the parent table. Seems like it's just an IE bug. I'm really confused about it. Tried doing a delay before the tests, to see if the DOM had to settle. Tried manipulating other properties. Nothing.

      This is also only in tests -- I've verified the bug does not impact things in actual use of the feature.

      Going to update the other instances and add comments about this.

    2. It took hitting publish on that reply to spark an idea, and I realize now what was wrong. I'll have a proper fix in a min.

  1. Ship It!
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (9759f9d)