Skip to content
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

1.17.0 breaks phantomjs #733

Closed
vampolo opened this issue Jan 20, 2015 · 6 comments
Closed

1.17.0 breaks phantomjs #733

vampolo opened this issue Jan 20, 2015 · 6 comments

Comments

@vampolo
Copy link

vampolo commented Jan 20, 2015

Hi,

just updated qunit and my phantomjs gets stuck in:

PhantomJS 1.9.8 (Linux) ERROR: 'TypeError: 'null' is not an object (evaluating 'toolbar.appendChild') - http://localhost:9876/base/node_modules/qunitjs/qunit/qunit.js?0db9af2b5ad31c46fe2cfa82bbe2761c44bb36f8'
@lin7sh
Copy link

lin7sh commented Jan 20, 2015

Just Ignore this comment, My guess is wrong

I guess this break does not cause by version 1.17, you may have old test runner html file(like the one used in 1.11.0)
try to change

<h1 id="qunit-header">Tests</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>

to just

<div id="qunit"></div>

@SomethingSexy
Copy link

I mentioned this in #732 but I am getting the same error.

@leobalter
Copy link
Member

Working on it, thanks for reporting.

Setting <div id="qunit"></div> can be used as a workaround, but that was a regression and needs to be fixed.

I'm closing this one as this is a duplicate of #732

@jlonardi
Copy link

This does not happen only on phantomjs. I am running qunit tests using karma and after qunit updated to 1.17.0 getting following errors.
Chrome:

Chrome
Chrome 41.0.2272 (Windows 7) ERROR
Uncaught TypeError: Cannot read property 'appendChild' of null
Firefox
Firefox 35.0.0 (Windows 7) ERROR
TypeError: toolbar is null

@vampolo
Copy link
Author

vampolo commented Jan 20, 2015

I'm a bit puzzled.

Should i apply the fix described by @mkoxio <div id="qunit"></div> or should i wait for the fix ?

@leobalter
Copy link
Member

Better wait for the fix, but you can use the new qunit markup at anytime.

from

<h1 id="qunit-header">Tests</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>

to

<div id="qunit"></div>

leobalter pushed a commit to leobalter/qunit that referenced this issue Jan 20, 2015
After applying the test filter in the HTML Reporter, a error were
introduced when the toolbar element wasn't present at the DOM.

Two tests html files are now created to allow testing the legacy
QUnit markup and also to prevent tests from failing if the markup
is not present.

Fix qunitjs#732
Closes qunitjs#731
Ref qunitjs#733
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants