From: Felix Nagel Date: Thu, 30 May 2013 19:21:44 +0000 (+0200) Subject: Selectmenu tests: test if close event is fired when selectmenu is closed by click... X-Git-Tag: 1.11.0-beta.1~160^2~57 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e7d200f308f477a39dc4dfce5ee693143fb5602f;p=jquery-ui.git Selectmenu tests: test if close event is fired when selectmenu is closed by click on body --- diff --git a/tests/unit/selectmenu/selectmenu_events.js b/tests/unit/selectmenu/selectmenu_events.js index f1622adb9..4d98c9dde 100644 --- a/tests/unit/selectmenu/selectmenu_events.js +++ b/tests/unit/selectmenu/selectmenu_events.js @@ -32,7 +32,7 @@ test( "change", function () { test( "close", function () { - expect( 2 ); + expect( 4 ); this.element.selectmenu({ close: function ( event, ui ) { @@ -40,8 +40,11 @@ test( "close", function () { equal( event.type, "selectmenuclose", "event type set to selectmenuclose" ); } }); - + this.element.selectmenu( "open" ).selectmenu( "close" ); + + this.element.selectmenu( "open" ); + $( "body" ).simulate( "click" ); });