TheProjecter / phantomjs-qunit-runner

Automatically exported from code.google.com/p/phantomjs-qunit-runner
0 stars 0 forks source link

Add ability to use fixtures #9

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It would be nice to be able to define fixtures to use against the javascript 
since it is running against phantomjs.  The fixtures would define html that 
would be loaded up in the phantomjs page object and allow the javascript to do 
stuff to the html and then have the qunit tests run against what was done.

For example, if there is a file in the source directory:
foo.js
You can already do a test file:
fooTests.js
But you should also be able to do a fixture file:
fooFixture.html

The phantomjs-qunit-runner.js script would need to load this html into a page 
object, and the qunit tests should have access to that page object.

Original issue reported on code.google.com by br...@newtonius.com on 28 May 2012 at 10:00

GoogleCodeExporter commented 8 years ago
I put some work into this and am getting close to a solution.  The parameters 
passed to the runner js script will need to change to pass in an optional 
fixture.  The only problem I'm still trying to work out is how to get jQuery's 
$(document).ready() to fire.

Original comment by br...@newtonius.com on 29 May 2012 at 1:24

GoogleCodeExporter commented 8 years ago
What is the status of this? Can I now provide qunit-fixture html for phantom to 
use with my tests?

Thanks
Brian

Original comment by brian.ha...@gmail.com on 8 Oct 2012 at 6:38