Permalink
Browse files

[sequence tests] Evaluate selectors used as event sources at the time…

… when events are expected - not earlier, because the selectors might evaluate to nothing, as the page where the corresponding elements are defined is not yet AJAX-ed in
  • Loading branch information...
gabrielschulhof committed Oct 1, 2012
1 parent bf13712 commit 16e5a1ef53f56544714001fa09b3c6c7cb3e11ab
Showing with 3 additions and 3 deletions.
  1. +3 −3 tests/unit/navigation/sequence-tests/sequence_tests.js
@@ -57,7 +57,7 @@
$( "#openPopup" ).click();
},
{
- popupafteropen: { src: $( "#thePopup" ), event: "popupafteropen.returnFromPopupStep1" },
+ popupafteropen: { src: function() { return $( "#thePopup" ); }, event: "popupafteropen.returnFromPopupStep1" },
navigate: { src: $.mobile.pageContainer, event: "navigate.returnFromPopupStep1" }
},
function( result ) {
@@ -66,7 +66,7 @@
$( "#thePopup" ).parent().prev().click();
},
{
- popupafterclose: { src: $( "#thePopup" ), event: "popupafterclose.returnFromPopupStep2" },
+ popupafterclose: { src: function() { return $( "#thePopup" ); }, event: "popupafterclose.returnFromPopupStep2" },
navigate: { src: $.mobile.pageContainer, event: "navigate.returnFromPopupStep2" }
},
function( result ) {
@@ -132,7 +132,7 @@
$( "#openPopup" ).click();
},
{
- popupafteropen: { src: $( "#thePopup" ), event: "popupafteropen.GoingFromAPopupToAnotherPageStep1" },
+ popupafteropen: { src: function() { return $( "#thePopup" ); }, event: "popupafteropen.GoingFromAPopupToAnotherPageStep1" },
navigate: { src: $.mobile.pageContainer, event: "navigate.GoingFromAPopupToAnotherPageStep1" }
},
function( result ) {

0 comments on commit 16e5a1e

Please sign in to comment.