Skip to content
Browse files

[popup unit tests] Removing sequence page -> popup1 -> dialog -> popu…

…p2 <- back <- back from popup tests, because it was moved to sequence tests
  • Loading branch information...
1 parent 7f09ec6 commit 99b48c50eb46b96cfcd7fd99119ec93b2ad5d996 @gabrielschulhof gabrielschulhof committed Oct 4, 2012
Showing with 0 additions and 79 deletions.
  1. +0 −79 tests/unit/popup/popup_core.js
View
79 tests/unit/popup/popup_core.js
@@ -289,85 +289,6 @@
]);
});
- asyncTest( "Sequence page -> popup -> dialog -> popup works", function() {
- var originallyActivePage = $.mobile.activePage[ 0 ], $popup = $( "#test-popup" );
-
- if( !$popup.data( "popup" ).options.history ) {
- expect( 1 )
- ok( true, "hash change disabled" );
- start();
- return;
- }
-
- expect( 15 );
- $.testHelper.detailedEventCascade([
- function() {
- $( "#popup-sequence-test" ).popup( "open" );
- },
-
- {
- opened: { src: $( "#popup-sequence-test" ), event: "popupafteropen.sequenceTestStep1" },
- hashchange: { src: $( window ), event: "hashchange.sequenceTestStep1" }
- },
-
- function( result ) {
- ok( !result.opened.timedOut, "Popup has emitted 'popupafteropen'" );
- ok( !result.hashchange.timedOut, "A 'hashchange' event has occurred" );
- $( "#popup-sequence-test-open-dialog" ).click();
- },
-
- {
- closed: { src: $( "#popup-sequence-test" ), event: "popupafterclose.sequenceTestStep2" },
- pageload: { src: $.mobile.pageContainer, event: "pageload.sequenceTestStep2" },
- pagechange: { src: $.mobile.pageContainer, event: "pagechange.sequenceTestStep3" }
- },
-
- function( result ) {
- ok( !result.closed.timedOut, "Popup has emitted 'popupafterclose'" );
- ok( !result.pageload.timedOut, "A 'pageload' event (presumably to load the dialog) has occurred" );
- ok( $( "#popup-sequence-test-dialog" ).length > 0, "The dialog has been loaded successfully" );
- ok( !result.pagechange.timedOut, "A 'pagechange' event has occurred" );
- ok( $.mobile.activePage[ 0 ] === $( "#popup-sequence-test-dialog" )[ 0 ], "The dialog is the active page" );
- $( "a[href='#popup-sequence-test-popup-inside-dialog']" ).click();
- },
-
- {
- opened: { src: function() { return $( "#popup-sequence-test-popup-inside-dialog" ); }, event: "popupafteropen.sequenceTestStep3" },
- hashchange: { src: $( window ), event: "hashchange.sequenceTestStep3" }
- },
-
- function( result ) {
- ok( !result.opened.timedOut, "Popup inside dialog has emitted 'popupafteropen'" );
- ok( !result.hashchange.timedOut, "Popup inside dialog has caused a 'hashchange'" );
- window.history.back();
- },
-
- {
- close: { src: function() { return $( "#popup-sequence-test-popup-inside-dialog" ); }, event: "popupafterclose.sequenceTestStep4" },
- hashchange: { src: $( window ), event: "hashchange.sequenceTestStep4" }
- },
-
- function( result ) {
- ok( !result.close.timedOut, "Popup inside dialog has emitted 'popupafterclose'" );
- ok( !result.hashchange.timedOut, "The closing of the inside popup has resulted in a 'hashchange'" );
- ok( $.mobile.activePage[ 0 ] === $( "#popup-sequence-test-dialog" )[ 0 ], "The dialog is once more the active page" );
- window.history.back();
- },
-
- {
- pagechange: { src: $.mobile.pageContainer, event: "pagechange.sequenceTestStep5" },
- hashchange: { src: $( window ), event: "hashchange.sequenceTestStep5" }
- },
-
- function( result ) {
- ok( !result.pagechange.timedOut, "Going back from the dialog has resulted in a 'pagechange'" );
- ok( !result.hashchange.timedOut, "Going back from the dialog has resulted in a 'hashchange'" );
- ok( originallyActivePage === $.mobile.activePage[ 0 ], "After going back from the dialog, the originally active page is active once more" );
- setTimeout( function() { start(); }, 300 );
- }
- ]);
- });
-
asyncTest( "Popup focused after open", function() {
var $link = $( "#open-test-popup" ), $popup = $( "#test-popup" );

0 comments on commit 99b48c5

Please sign in to comment.
Something went wrong with that request. Please try again.