From cc307ec9020dc21aa15b2b13222a381b8d7a7269 Mon Sep 17 00:00:00 2001 From: John Bender Date: Sat, 15 Jan 2011 23:15:17 -0800 Subject: [PATCH] tests for large select dialog issue --- tests/unit/select/index.html | 120 +++++++++++++++++++++++++++++ tests/unit/select/select_events.js | 25 ++++++ tests/unit/slider/index.html | 3 +- 3 files changed, 146 insertions(+), 2 deletions(-) create mode 100644 tests/unit/select/index.html create mode 100644 tests/unit/select/select_events.js diff --git a/tests/unit/select/index.html b/tests/unit/select/index.html new file mode 100644 index 00000000..0d932231 --- /dev/null +++ b/tests/unit/select/index.html @@ -0,0 +1,120 @@ + + + + + jQuery Mobile Select Events Test Suite + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

jQuery Mobile Select Event Test Suite

+

+

+
    +
+ + + +
+
+ + +
+
+ diff --git a/tests/unit/select/select_events.js b/tests/unit/select/select_events.js new file mode 100644 index 00000000..f8483c1d --- /dev/null +++ b/tests/unit/select/select_events.js @@ -0,0 +1,25 @@ +/* + * mobile select unit tests + */ + +(function($){ + var mouseUpTouchEnd = $.support.touch ? "touchend" : "mouseup"; + + module('jquery.mobile.select.js'); + + test( "a large select menu should come up in a dialog many times", function(){ + var menu, select = $("#select-choice-many-container a"); + + // bring up the dialog + select.trigger(mouseUpTouchEnd); + menu = $("#select-choice-many-menu"); + same(menu.parents('.ui-dialog').length, 1); + + // select and close the dialog + menu.find('li').click(); + + //bring up the dialog again + select.trigger(mouseUpTouchEnd); + same(menu.parents('.ui-dialog').length, 1); + }); +})(jQuery); \ No newline at end of file diff --git a/tests/unit/slider/index.html b/tests/unit/slider/index.html index 16d283bf..e791bba1 100644 --- a/tests/unit/slider/index.html +++ b/tests/unit/slider/index.html @@ -1,4 +1,4 @@ - + @@ -46,7 +46,6 @@

-