nikgoodley-ibboost / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

Make it so you can load an HTML instead of only JS files (hacky way to get it working) #424

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Right now it's impossible to load a HTML containing many tests or iframes, like 
to run tests against multiple jQuery versions. 

I'm doing a hack, loading the "test" js file (called loader.js), that only 
contains an AJAX call, and acquiring the HTML content and appending it to the 
runner frame, but jstestdriver complains about it having no "tests", and also, 
the problem is, the runner frame has a bunch of javascript in the head, and my 
runner.html also have a lot of javascript in the head of the HTML, and it ends 
up getting overwritten. 

So, I decided to create an iframe, and guess what, it can't, because 
jstestdriver global is missing from the iframe. 

I'm using 

    serve:
      - tests/runner.html

    load:
      - tests/loader.js

Right now, I'm stuck. I got two files, the runner.html, that also creates 
multiple iframes, each one with a different jQuery version, passing the version 
to the file frame.html. I ended up using webdriverjs, node and selenium, but I 
can't get the results INSIDE the Phpstorm IDE (in neither webdriver nor 
js-test-driver), which defeats continuous integration part (run test on source 
change).  

Original issue reported on code.google.com by pa...@singularwebdesign.com.br on 10 Feb 2013 at 9:54