jquery/jquery-mobile — pull request #4995 by elijahmanor (2012-09-13 17:20:08+00:00)
Title: Collapsible: Changed $.testHelper.openPage to $.mobile.changepage. Fixed #4993 - Collapsible: Unit Tests failing on Windows Phone 7

Some of the Collapsible Unit tests (3-14) are failing on Windows Phone 7.

The code that is being tested works fine on the actual device when I took the samples and ran them outside of the unit test environment.

![Failing Unit Tests](http://f.cl.ly/items/3C0D2X1K47281y2e2V1G/collapsible-before-240x400.png)

By changing `$.testHelper.openPage()` to `$.mobile.changePage()` it resolved all of the failures. It appears the assertions were being made before jQuery Mobile had a chance to enhance the DOM.

Here is an example of one of the changes I made...

```diff
- $.testHelper.openPage( "#basic-collapsible-test" );
+ $.mobile.changePage( $( "#basic-collapsible-test" ) );
```

After making the above changes all of the unit tests run and pass successfully as seen below

![Passing Unit Tests](http://f.cl.ly/items/0w0h0328091y0E1W1g0Q/collapsible-after-240x400.png)