|
125 | 125 | var $popup = $( "#test-popup" ), |
126 | 126 | link = $( "a#open-test-popup" )[ 0 ]; |
127 | 127 |
|
128 | | - expect( 14 ); |
| 128 | + expect( 17 ); |
129 | 129 |
|
130 | 130 | $.testHelper.detailedEventCascade([ |
131 | 131 | function() { |
| 132 | + deepEqual( $( "#test-popup-popup:visible" ).length, 0, "Test popup is not initially :visible" ); |
132 | 133 | deepEqual( $.mobile.getAttribute( link, "aria-haspopup" ), true, "'aria-haspopup' attribute is set to true on link that opens the popup" ); |
133 | 134 | deepEqual( $.mobile.getAttribute( link, "aria-owns" ), "#test-popup", "'aria-owns' attribute is set to the ID of the owned popup ('#test-popup')" ); |
134 | 135 | deepEqual( $.mobile.getAttribute( link, "aria-expanded" ), false, "'aria-expanded' attribute is set to false when the popup is not open" ); |
|
143 | 144 | function( result ) { |
144 | 145 | var theOffset = $( "#test-popup p" ).offset(); |
145 | 146 |
|
| 147 | + deepEqual( $( "#test-popup-popup:visible" ).length, 1, "Test popup is :visible when open" ); |
146 | 148 | deepEqual( $.mobile.getAttribute( link, "aria-expanded" ), true, "'aria-expanded' attribute is set to true when the popup is open" ); |
147 | 149 | ok( !$popup.parent().prev().hasClass( "ui-screen-hidden" ), "Open popup screen is not hidden" ); |
148 | 150 | ok( $popup.attr( "class" ).match( /( |^)ui-body-[a-z]( |$)/ ), "Open popup has a valid overlay theme" ); |
|
162 | 164 | }, |
163 | 165 |
|
164 | 166 | function( result) { |
| 167 | + deepEqual( $( "#test-popup-popup:visible" ).length, 0, "Test popup is not :visible after it is closed" ); |
165 | 168 | deepEqual( $.mobile.getAttribute( link, "aria-expanded" ), false, "'aria-expanded' attribute is set to false when the popup is not open" ); |
166 | 169 | ok( !$popup.parent().hasClass( "in" ), "Closed popup container does not have class 'in'" ); |
167 | 170 | ok( $popup.parent().prev().hasClass( "ui-screen-hidden" ), "Closed popup screen is hidden" ); |
|
0 commit comments