This repository was archived by the owner on Oct 8, 2021. It is now read-only.
File tree 2 files changed +69
-0
lines changed
2 files changed +69
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!doctype html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="utf-8 ">
5
+ < meta name ="viewport " content ="width=device-width, initial-scale=1 ">
6
+ < title > jQuery Mobile Panel Test Suite</ title >
7
+
8
+ < script src ="../../../external/requirejs/require.js "> </ script >
9
+ < script src ="../../../js/requirejs.config.js "> </ script >
10
+ < script src ="../../../js/jquery.tag.inserter.js "> </ script >
11
+ < script src ="../../jquery.setNameSpace.js "> </ script >
12
+ < script src ="../../../tests/jquery.testHelper.js "> </ script >
13
+
14
+ < link rel ="stylesheet " href ="../../../css/themes/default/jquery.mobile.css "/>
15
+ < link rel ="stylesheet " href ="../../../external/qunit/qunit.css "/>
16
+ < link rel ="stylesheet " href ="../../jqm-tests.css "/>
17
+ < script src ="../../../external/qunit/qunit.js "> </ script >
18
+ < script >
19
+ $ . testHelper . asyncLoad ( [
20
+ [
21
+ "widgets/panel" ,
22
+ "widgets/page"
23
+ ] ,
24
+ [ "init" ] ,
25
+ [
26
+ "panel_stale_height_core.js"
27
+ ]
28
+ ] ) ;
29
+ </ script >
30
+
31
+ < script src ="../../swarminject.js "> </ script >
32
+ </ head >
33
+ < body class ="ui-body-b ">
34
+ < div id ="qunit "> </ div >
35
+
36
+ < div data-nstest-role ="page ">
37
+ < div data-nstest-role ="panel " id ="stale-height-panel ">
38
+ < p > The panel</ p >
39
+ </ div >
40
+ < a href ="#stale-height-panel " id ="stale-height-panel-link "> Open panel</ a >
41
+ </ div >
42
+
43
+ </ body >
Original file line number Diff line number Diff line change
1
+ asyncTest ( "Closing a panel removes the modal's height from its inline CSS" , function ( ) {
2
+ var eventNs = ".closingAPanelRemovesModalsHeightFromItsInlineCSS" ,
3
+ panel = $ ( "#stale-height-panel" ) ,
4
+ link = $ ( "#stale-height-panel-link" ) ,
5
+ modal = $ ( ".ui-panel-dismiss" ) ;
6
+
7
+ $ . testHelper . detailedEventCascade ( [
8
+ function ( ) {
9
+ link . click ( ) ;
10
+ } ,
11
+ {
12
+ panelopen : { src : panel , event : "panelopen" + eventNs + "1" }
13
+ } ,
14
+ function ( ) {
15
+ panel . panel ( "close" ) ;
16
+ } ,
17
+ {
18
+ panelclose : { src : panel , event : "panelclose" + eventNs + "2" }
19
+ } ,
20
+ function ( ) {
21
+ deepEqual ( ( modal . attr ( "style" ) || "" ) . match ( / h e i g h t : \s * [ 0 - 9 ] / ) , null ,
22
+ "style attribute does not include a height field" ) ;
23
+ start ( ) ;
24
+ }
25
+ ] ) ;
26
+ } ) ;
You can’t perform that action at this time.
0 commit comments