mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-13 09:03:10 +00:00
fixed up the failing unit test by ensuring the toolbars were shown before testing for transition classes.
This commit is contained in:
parent
68e7bc562d
commit
b70832981d
1 changed files with 27 additions and 9 deletions
|
|
@ -22,7 +22,7 @@
|
|||
window.scrollTo(0,0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// add meta viewport tag
|
||||
injectMeta();
|
||||
|
||||
|
|
@ -47,19 +47,37 @@
|
|||
|
||||
});
|
||||
|
||||
test( "Fixed header and footer transition classes are applied correctly", function(){
|
||||
asyncTest( "Fixed header and footer transition classes are applied correctly", function(){
|
||||
|
||||
expect( 6 );
|
||||
|
||||
$.testHelper.sequence([
|
||||
function(){
|
||||
scrollDown();
|
||||
},
|
||||
|
||||
function(){
|
||||
//show first
|
||||
$( '#classes-test-b, #classes-test-g, #classes-test-e,#classes-test-h,#classes-test-i,#classes-test-j' ).fixedtoolbar( "show" );
|
||||
},
|
||||
|
||||
function() {
|
||||
|
||||
ok( $( '#classes-test-g' ).hasClass('fade'), 'The fade class should be applied by default');
|
||||
ok( $( '#classes-test-b' ).hasClass('in'), 'The "in" class should be applied by default');
|
||||
ok( !$( '#classes-test-h' ).hasClass('fade'), 'The fade class should not be applied when the header has a data-transition of "none"');
|
||||
|
||||
ok( $( '#classes-test-g' ).hasClass('fade'), 'The fade class should be applied by default');
|
||||
ok( $( '#classes-test-g' ).hasClass('in'), 'The "in" class should be applied by default');
|
||||
ok( !$( '#classes-test-h' ).hasClass('fade'), 'The fade class should not be applied when the header has a data-transition of "none"');
|
||||
|
||||
ok( !$( '#classes-test-h' ).hasClass('in'), 'The "in" class should not be applied when the header has a data-transition of "none"');
|
||||
ok( $( '#classes-test-i' ).hasClass('slidedown'), 'The "slidedown" class should be applied when the header has a data-transition of "slide"');
|
||||
ok( $( '#classes-test-j' ).hasClass('slideup'), 'The "slideup" class should be applied when the footer has a data-transition of "slide"');
|
||||
ok( !$( '#classes-test-h' ).hasClass('in'), 'The "in" class should not be applied when the header has a data-transition of "none"');
|
||||
ok( $( '#classes-test-i' ).hasClass('slidedown'), 'The "slidedown" class should be applied when the header has a data-transition of "slide"');
|
||||
ok( $( '#classes-test-j' ).hasClass('slideup'), 'The "slideup" class should be applied when the footer has a data-transition of "slide"');
|
||||
|
||||
},
|
||||
|
||||
function(){
|
||||
scrollUp();
|
||||
start();
|
||||
}
|
||||
], 500);
|
||||
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue