Disable HeaderView singleton checks for js-tests

Review Request #11412 — Created Jan. 28, 2021 and updated

david
Review Board
master
7725573...
reviewboard

Some updates to the pages framework on master had made the HeaderView a
singleton object. This caused conflicts when running the tests, since
a HeaderView is instantiated by the test page, and then each of the
individual pages would create additional ones when they were being
tested.

The tests for the individual pages are pretty isolated, and access the
HeaderView through their stored attributes instead of as a singleton.
It's therefore safe to have multiple ones when we're in the context of
the test runner. This change adds spies in the right place to suppress
the warnings.

Ran the JS test suite and saw that a bunch of warnings about duplicate
singleton objects no longer showed up.

Description From Last Updated

Is it worth maybe doing this once in the base setup code for the test runner, since it's so common?

chipx86chipx86
Checks run (2 succeeded)
flake8 passed.
JSHint passed.
chipx86
  1. 
      
  2. Is it worth maybe doing this once in the base setup code for the test runner, since it's so common?

    1. I think I'd rather keep them localized to the page test cases.

  3. 
      
Loading...