Compatibility with jQuery Mobile#204

Labels

Milestone

Assignee

4 participants

I'm just in the middle of implementing some Jasmine tests for a jQuery mobile application I'm working on, I've run into an error that I managed to track down to adding the jQuery mobile library, the error is as follows:

I'd prefer to use Jasmine for this application instead of qUnit as I think its more flexible and easier to implement in CI and explain to the BA's and PM's.. however after tinkering with this problem for a couple of hours and some futile searches on google I still havent been able to solve it so I'm starting to consider moving on.

Here is the stack-overflow URL in case there is a workaround come up from the discussion or whoever solves it wants to claim brownie points there:

Can you paste in the context around line 1769 of the jasmine.js that you're using? It doesn't appear to be HEAD. If I had to guess I'd say it's this line:

if (self.blocks[self.index].abort) {
self.abort = true;
}

which suggests some of your blocks might be empty?

I also notice you're jasmine.getEnv().execute()-ing without waiting for the DOM page ready to fire. Try wrapping your execute in $(function() { }) to wait until the page ready fires and see if that helps (refer to the example for more info).

My only guess is that this is somehow related to the extensive DOM manipulation carried out inside jQueryMobile, which basically walks through the HTML page and recreates the DOM and applies styling according to special formatting rules based on data-role="X" attributes. Im not sure wether this is helpful but you can read more on: