Collapsible: Changed $.testHelper.openPage to $.mobile.changepage. Fixed #4993 - Collapsible: Unit Tests failing on Windows Phone 7 #4995

Merged
merged 1 commit into from Nov 15, 2012

Conversation

Projects
None yet
2 participants
Contributor

elijahmanor commented Sep 13, 2012

Some of the Collapsible Unit tests (3-14) are failing on Windows Phone 7. This pull request addresses issue #4993.

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

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...

- $.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

Collapsible: Changed $.testHelper.openPage to $.mobile.changepage. Fixed
 #4993 - Collapsible: Unit Tests failing on Windows Phone 7

gseguin added a commit that referenced this pull request Nov 15, 2012

Merge pull request #4995 from appendto/collapsible-unit-tests-fail
Collapsible: Changed $.testHelper.openPage to $.mobile.changepage. Fixed #4993 - Collapsible: Unit Tests failing on Windows Phone 7

@gseguin gseguin merged commit 0843c54 into jquery:master Nov 15, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment