Jasmine / Chorus 3.1 JS error and Output

29 views
Skip to first unread message

Shell (Aridhia Informatics)

unread,
Mar 28, 2014, 8:47:11 AM3/28/14
to choru...@googlegroups.com
Hi guys,

We're currently exploring Chorus 3.1 and the potential migration of our application to that codebase. While it appears 3.1 is still in active development, we're trying to get the Jasmine tests to run. We're not particularly familiar with Jasmine (especially 2.0), but we're seeing output that we'd like the verify as being correct. In the Chorus 2.x output we get a table with lists of complete and failed tests, but in 3.1, we get the attached output.

Is this to be expected? Should all the tests pass, would this page be blank? Or are we seeing an artefact of development code? (up to date as of 2014-03-28).

We're also seeing the following error message at the end of the tests:

Uncaught NotFoundError: Failed to execute 'appendChild' on 'Node': The new child element is null.

S.
Screen Shot 2014-03-28 at 12.42.36.png

Robbie GIll

unread,
Mar 28, 2014, 1:28:31 PM3/28/14
to choru...@googlegroups.com
Hey Shell,

All specs should be passing with latest code. After a bit of experimentation, I've reproduced what you are seeing by deleting the $CHORUS_HOME/spec/javascripts/fixtures/backbone directory.

Have you run the rspec suite yet (or at minimum rake backbone_fixtures)? It seems we are currently producing a less than helpful error if the fixtures have not been generated.

Generating the json fixtures should clear this up for you.

As for jasmine 2.0: 

The red x indicates test failure and green dots for passed in the browser. The lists of passes and failures is displayed when the the suite finishes. (see attached)
Our reporter for phantom displays dots with color representing test duration and prints failure messages immediately for failures.

In general we are running the full suite in phantom and more targeted tests in the browser while developing as I find the suite in phantom to be a bit snappier. I did run the full suite in Chrome this morning and all specs passed.
As you may know, scripts for running in phantom are available in the repo and 'jaz' is a useful alias: alias jaz='phantomjs $CHORUS_HOME/spec/run-phantom-jasmine.js 8888'

-Robbie
jaz.png

Shell (Aridhia Informatics)

unread,
Mar 28, 2014, 4:49:45 PM3/28/14
to choru...@googlegroups.com
Hi Robbie,

Your are correct, I hadn't yet tried running rspec, so I'll pick that up on Monday.

Thanks for taking the time to walk through the Jasmine 2.0 bits. Think we have what we need now to get everything up and running. The jaz alias looks useful.

It's certainly interesting to hear of your testing regime too. For various reasons we currently do not run Jasmine tests, but going forward I think this is something we'll want (have!) to do. There will be interesting task of adapting/augmenting them to work with our UI... It has a fair few structural changes (HTML5/Twitter Bootstrap patterns).

S.
Reply all
Reply to author
Forward
0 new messages