Skip to content
This repository has been archived by the owner on Nov 6, 2019. It is now read-only.

Some FocusTracker and TabBar unittests fail in master on OS X with latest Firefox #441

Open
telamonian opened this issue Oct 15, 2019 · 1 comment

Comments

@telamonian
Copy link

telamonian commented Oct 15, 2019

I'm using OS X 10.14, and the latest version of Firefox (69). On master, I recently noticed that a few dozen of the unittest for the FocusTracker and TabBar widgets were failing:

SUMMARY:
✔ 760 tests completed
✖ 34 tests failed

FAILED TESTS:
  @phosphor/widgets
    FocusTracker
      #currentChanged
        ✖ should be emitted when the current widget has changed
          Firefox 69.0.0 (Mac OS X 10.14.0)
        expected null to not equal null
        AssertionError@build/bundle.test.js:21511:13
        module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
        assertEqual@build/bundle.test.js:39849:12
        module.exports/ctx[name]@build/bundle.test.js:43285:25
        @build/bundle.test.js:31062:48


      #activeChanged
        ✖ should be emitted when the active widget has changed
          Firefox 69.0.0 (Mac OS X 10.14.0)
        expected null to not equal null
        AssertionError@build/bundle.test.js:21511:13
        module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
        assertEqual@build/bundle.test.js:39849:12
        module.exports/ctx[name]@build/bundle.test.js:43285:25
        @build/bundle.test.js:31093:48

...

The strange thing is that I don't see these failures when testing using Chrome, and I don't see the failures in the CI run on the commits I made in PR #437, even though the CI also uses Firefox. Not sure what's going on.

The rest of the unittest failure log
    ✖ should be emitted when the active widget is set to null
      Firefox 69.0.0 (Mac OS X 10.14.0)
    expected null to not equal null
    AssertionError@build/bundle.test.js:21511:13
    module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
    assertEqual@build/bundle.test.js:39849:12
    module.exports/ctx[name]@build/bundle.test.js:43285:25
    @build/bundle.test.js:31107:48


  #currentWidget
    ✖ should be set to the widget that gained focus
      Firefox 69.0.0 (Mac OS X 10.14.0)
    expected { Object (_flags, _layout, ...) } to equal { Object (_flags, _layout, ...) }
    AssertionError@build/bundle.test.js:21511:13
    module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
    assertEqual@build/bundle.test.js:39849:12
    module.exports/ctx[name]@build/bundle.test.js:43285:25
    @build/bundle.test.js:31146:57


    ✖ should revert to the previous widget if the current widget is removed
      Firefox 69.0.0 (Mac OS X 10.14.0)
    expected { Object (_flags, _layout, ...) } to equal { Object (_flags, _layout, ...) }
    AssertionError@build/bundle.test.js:21511:13
    module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
    assertEqual@build/bundle.test.js:39849:12
    module.exports/ctx[name]@build/bundle.test.js:43285:25
    @build/bundle.test.js:31156:57


  #activeWidget
    ✖ should be set to `null` when the active widget loses focus
      Firefox 69.0.0 (Mac OS X 10.14.0)
    expected { Object (_flags, _layout, ...) } to equal null
    AssertionError@build/bundle.test.js:21511:13
    module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
    assertEqual@build/bundle.test.js:39849:12
    module.exports/ctx[name]@build/bundle.test.js:43285:25
    @build/bundle.test.js:31186:56


    ✖ should be set to the widget that gained focus
      Firefox 69.0.0 (Mac OS X 10.14.0)
    expected { Object (_flags, _layout, ...) } to equal { Object (_flags, _layout, ...) }
    AssertionError@build/bundle.test.js:21511:13
    module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
    assertEqual@build/bundle.test.js:39849:12
    module.exports/ctx[name]@build/bundle.test.js:43285:25
    @build/bundle.test.js:31197:56


  #focusNumber()
    ✖ should give the highest number for the currentWidget
      Firefox 69.0.0 (Mac OS X 10.14.0)
    expected -1 to equal 1
    AssertionError@build/bundle.test.js:21511:13
    module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
    assertEqual@build/bundle.test.js:39849:12
    module.exports/ctx[name]@build/bundle.test.js:43285:25
    @build/bundle.test.js:31236:64


    ✖ should update when a widget gains focus
      Firefox 69.0.0 (Mac OS X 10.14.0)
    expected 0 to equal 2
    AssertionError@build/bundle.test.js:21511:13
    module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
    assertEqual@build/bundle.test.js:39849:12
    module.exports/ctx[name]@build/bundle.test.js:43285:25
    @build/bundle.test.js:31257:64


  #remove()
    ✖ should set the currentWidget to the previous one if the widget is the currentWidget
      Firefox 69.0.0 (Mac OS X 10.14.0)
    expected { Object (_flags, _layout, ...) } to equal { Object (_flags, _layout, ...) }
    AssertionError@build/bundle.test.js:21511:13
    module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
    assertEqual@build/bundle.test.js:39849:12
    module.exports/ctx[name]@build/bundle.test.js:43285:25
    @build/bundle.test.js:31318:57


TabBar
  #tabMoved
    ✖ should be emitted when a tab is moved right by the user
      Firefox 69.0.0 (Mac OS X 10.14.0)
    Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

    ✖ should be emitted when a tab is moved left by the user
      Firefox 69.0.0 (Mac OS X 10.14.0)
    Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

  #tabActivateRequested
    ✖ should be emitted when a tab is left pressed by the user
      Firefox 69.0.0 (Mac OS X 10.14.0)
    expected false to equal true
    AssertionError@build/bundle.test.js:21511:13
    module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
    assertEqual@build/bundle.test.js:39849:12
    module.exports/ctx[name]@build/bundle.test.js:43285:25
    @build/bundle.test.js:35414:42


    ✖ should make the tab current and emit the `currentChanged` signal
      Firefox 69.0.0 (Mac OS X 10.14.0)
    expected 1 to equal 2
    AssertionError@build/bundle.test.js:21511:13
    module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
    assertEqual@build/bundle.test.js:39849:12
    module.exports/ctx[name]@build/bundle.test.js:43285:25
    @build/bundle.test.js:35424:52


    ✖ should emit even if the pressed tab is the current tab
      Firefox 69.0.0 (Mac OS X 10.14.0)
    expected false to equal true
    AssertionError@build/bundle.test.js:21511:13
    module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
    assertEqual@build/bundle.test.js:39849:12
    module.exports/ctx[name]@build/bundle.test.js:43285:25
    @build/bundle.test.js:35435:42


  #tabCloseRequested
    ✖ should be emitted when a tab close icon is left clicked
      Firefox 69.0.0 (Mac OS X 10.14.0)
    expected false to equal true
    AssertionError@build/bundle.test.js:21511:13
    module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
    assertEqual@build/bundle.test.js:39849:12
    module.exports/ctx[name]@build/bundle.test.js:43285:25
    @build/bundle.test.js:35458:42


    ✖ should be emitted when a tab is middle clicked
      Firefox 69.0.0 (Mac OS X 10.14.0)
    expected false to equal true
    AssertionError@build/bundle.test.js:21511:13
    module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
    assertEqual@build/bundle.test.js:39849:12
    module.exports/ctx[name]@build/bundle.test.js:43285:25
    @build/bundle.test.js:35471:42


  #tabDetachRequested
    ✖ should be emitted when a tab is dragged beyond the detach threshold
      Firefox 69.0.0 (Mac OS X 10.14.0)
    expected false to equal true
    AssertionError@build/bundle.test.js:21511:13
    module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
    assertEqual@build/bundle.test.js:39849:12
    module.exports/ctx[name]@build/bundle.test.js:43285:25
    @build/bundle.test.js:35512:42


    ✖ should be handled by calling `releaseMouse` and removing the tab
      Firefox 69.0.0 (Mac OS X 10.14.0)
    expected false to equal true
    AssertionError@build/bundle.test.js:21511:13
    module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
    assertEqual@build/bundle.test.js:39849:12
    module.exports/ctx[name]@build/bundle.test.js:43285:25
    @build/bundle.test.js:35524:42


    ✖ should only be emitted once per drag cycle
      Firefox 69.0.0 (Mac OS X 10.14.0)
    expected 0 to equal 1
    AssertionError@build/bundle.test.js:21511:13
    module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
    assertEqual@build/bundle.test.js:39849:12
    module.exports/ctx[name]@build/bundle.test.js:43285:25
    @build/bundle.test.js:35536:42


    ✖ should add the `p-mod-dragging` class to the tab and the bar
      Firefox 69.0.0 (Mac OS X 10.14.0)
    expected false to equal true
    AssertionError@build/bundle.test.js:21511:13
    module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
    assertEqual@build/bundle.test.js:39849:12
    module.exports/ctx[name]@build/bundle.test.js:43285:25
    @build/bundle.test.js:35550:42


  #allowDeselect
    ✖ should determine whether a tab can be deselected by the user
      Firefox 69.0.0 (Mac OS X 10.14.0)
    expected 2 to equal -1
    AssertionError@build/bundle.test.js:21511:13
    module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
    assertEqual@build/bundle.test.js:39849:12
    module.exports/ctx[name]@build/bundle.test.js:43285:25
    @build/bundle.test.js:35595:52


  #handleEvent()
    left click
      ✖ should emit a tab close requested signal
        Firefox 69.0.0 (Mac OS X 10.14.0)
      expected false to equal true
      AssertionError@build/bundle.test.js:21511:13
      module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
      assertEqual@build/bundle.test.js:39849:12
      module.exports/ctx[name]@build/bundle.test.js:43285:25
      @build/bundle.test.js:35968:46


    middle click
      ✖ should emit a tab close requested signal
        Firefox 69.0.0 (Mac OS X 10.14.0)
      expected false to equal true
      AssertionError@build/bundle.test.js:21511:13
      module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
      assertEqual@build/bundle.test.js:39849:12
      module.exports/ctx[name]@build/bundle.test.js:43285:25
      @build/bundle.test.js:36010:46


    mousedown
      ✖ should add event listeners if the tabs are movable
        Firefox 69.0.0 (Mac OS X 10.14.0)
      expected -1 to not equal -1
      AssertionError@build/bundle.test.js:21511:13
      module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
      assertEqual@build/bundle.test.js:39849:12
      module.exports/ctx[name]@build/bundle.test.js:43285:25
      @build/bundle.test.js:36044:75


    mousemove
      ✖ should do nothing if there is a drag in progress
        Firefox 69.0.0 (Mac OS X 10.14.0)
      expected 0 to equal 1
      AssertionError@build/bundle.test.js:21511:13
      module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
      assertEqual@build/bundle.test.js:39849:12
      module.exports/ctx[name]@build/bundle.test.js:43285:25
      @build/bundle.test.js:36084:46


      ✖ should emit the detach requested signal if the threshold is exceeded
        Firefox 69.0.0 (Mac OS X 10.14.0)
      expected false to equal true
      AssertionError@build/bundle.test.js:21511:13
      module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
      assertEqual@build/bundle.test.js:39849:12
      module.exports/ctx[name]@build/bundle.test.js:43285:25
      @build/bundle.test.js:36112:46


      ✖ should bail if the signal handler aborted the drag
        Firefox 69.0.0 (Mac OS X 10.14.0)
      expected false to equal true
      AssertionError@build/bundle.test.js:21511:13
      module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
      assertEqual@build/bundle.test.js:39849:12
      module.exports/ctx[name]@build/bundle.test.js:43285:25
      @build/bundle.test.js:36123:46


      ✖ should update the positions of the tabs
        Firefox 69.0.0 (Mac OS X 10.14.0)
      expected false to equal true
      AssertionError@build/bundle.test.js:21511:13
      module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
      assertEqual@build/bundle.test.js:39849:12
      module.exports/ctx[name]@build/bundle.test.js:43285:25
      @build/bundle.test.js:36134:46


    mouseup
      ✖ should emit the `tabMoved` signal
        Firefox 69.0.0 (Mac OS X 10.14.0)
      Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

      ✖ should move the tab to its final position
        Firefox 69.0.0 (Mac OS X 10.14.0)
      Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

      ✖ should cancel a middle mouse release
        Firefox 69.0.0 (Mac OS X 10.14.0)
      expected false to equal true
      AssertionError@build/bundle.test.js:21511:13
      module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
      assertEqual@build/bundle.test.js:39849:12
      module.exports/ctx[name]@build/bundle.test.js:43285:25
      @build/bundle.test.js:36159:49


    keydown
      ✖ should prevent default
        Firefox 69.0.0 (Mac OS X 10.14.0)
      expected false to equal true
      AssertionError@build/bundle.test.js:21511:13
      module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
      assertEqual@build/bundle.test.js:39849:12
      module.exports/ctx[name]@build/bundle.test.js:43285:25
      @build/bundle.test.js:36167:49


    contextmenu
      ✖ should prevent default
        Firefox 69.0.0 (Mac OS X 10.14.0)
      expected false to equal true
      AssertionError@build/bundle.test.js:21511:13
      module.exports/Assertion.prototype.assert@build/bundle.test.js:39332:13
      assertEqual@build/bundle.test.js:39849:12
      module.exports/ctx[name]@build/bundle.test.js:43285:25
      @build/bundle.test.js:36181:49
@sccolbert
Copy link
Member

Thanks. Mocking events is hard, and subtle changes by browsers in how they handle offscreen rendering/events/focus can wreak havoc on our unit tests.

If something doesn't work when actually using the browser with a real keyboard and mouse, please let us know.

@sccolbert sccolbert changed the title Bug: some FocusTracker and TabBar unittests fail in master on OS X with latest Firefox Some FocusTracker and TabBar unittests fail in master on OS X with latest Firefox Oct 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants