diff --git a/tests/unit/select/cached-tests.html b/tests/unit/select/cached-tests.html
new file mode 100644
index 00000000..5fd212b5
--- /dev/null
+++ b/tests/unit/select/cached-tests.html
@@ -0,0 +1,27 @@
+
+
+
+
+
+ jQuery Mobile Select Events Test Suite
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/unit/select/select_cached.js b/tests/unit/select/select_cached.js
new file mode 100644
index 00000000..dbc9f219
--- /dev/null
+++ b/tests/unit/select/select_cached.js
@@ -0,0 +1,70 @@
+/*
+ * mobile select unit tests
+ */
+
+(function($){
+ var resetHash;
+
+ resetHash = function(timeout){
+ $.testHelper.openPage( location.hash.indexOf("#default") >= 0 ? "#" : "#default" );
+ };
+
+ // https://github.com/jquery/jquery-mobile/issues/2181
+ asyncTest( "dialog sized select should alter the value of its parent select", function(){
+ var selectButton, value;
+
+ $.testHelper.pageSequence([
+ resetHash,
+
+ function(){
+ $.mobile.changePage( "cached.html" );
+ },
+
+ function(){
+ selectButton = $( "#cached-page-select" ).siblings( 'a' );
+ selectButton.click();
+ },
+
+ function(){
+ ok( $.mobile.activePage.hasClass('ui-dialog'), "the dialog came up" );
+ var option = $.mobile.activePage.find( "li a" ).not(":contains('" + selectButton.text() + "')").last();
+ value = option.text();
+ option.click();
+ },
+
+ function(){
+ same( value, selectButton.text(), "the selected value is propogated back to the button text" );
+ start();
+ }
+ ]);
+ });
+
+ // https://github.com/jquery/jquery-mobile/issues/2181
+ asyncTest( "dialog sized select should prevent the removal of its parent page from the dom", function(){
+ var selectButton, parentPageId;
+
+ expect( 2 );
+
+ $.testHelper.pageSequence([
+ resetHash,
+
+ function(){
+ $.mobile.changePage( "cached.html" );
+ },
+
+ function(){
+ selectButton = $.mobile.activePage.find( "#cached-page-select" ).siblings( 'a' );
+ parentPageId = $.mobile.activePage.attr( 'id' );
+ same( $("#" + parentPageId).length, 1, "establish the parent page exists" );
+ selectButton.click();
+ },
+
+ function(){
+ same( $( "#" + parentPageId).length, 1, "make sure parent page is still there after opening the dialog" );
+ $.mobile.activePage.find( "li a" ).last().click();
+ },
+
+ start
+ ]);
+ });
+})(jQuery);
\ No newline at end of file
diff --git a/tests/unit/select/select_core.js b/tests/unit/select/select_core.js
index ea804997..f32c345c 100644
--- a/tests/unit/select/select_core.js
+++ b/tests/unit/select/select_core.js
@@ -253,62 +253,4 @@
same( select.selectmenu( 'option', 'disabled' ), false, "disbaled option set" );
});
- // https://github.com/jquery/jquery-mobile/issues/2181
- asyncTest( "dialog sized select should alter the value of its parent select", function(){
- var selectButton, value;
-
- $.testHelper.pageSequence([
- resetHash,
-
- function(){
- $.mobile.changePage( "cached.html" );
- },
-
- function(){
- selectButton = $( "#cached-page-select" ).siblings( 'a' );
- selectButton.click();
- },
-
- function(){
- ok( $.mobile.activePage.hasClass('ui-dialog'), "the dialog came up" );
- var option = $.mobile.activePage.find( "li a" ).not(":contains('" + selectButton.text() + "')").last();
- value = option.text();
- option.click();
- },
-
- function(){
- same( value, selectButton.text(), "the selected value is propogated back to the button text" );
- start();
- }
- ]);
- });
-
- // https://github.com/jquery/jquery-mobile/issues/2181
- asyncTest( "dialog sized select should prevent the removal of its parent page from the dom", function(){
- var selectButton, parentPageId;
-
- expect( 2 );
-
- $.testHelper.pageSequence([
- resetHash,
-
- function(){
- $.mobile.changePage( "cached.html" );
- },
-
- function(){
- selectButton = $.mobile.activePage.find( "#cached-page-select" ).siblings( 'a' );
- parentPageId = $.mobile.activePage.attr( 'id' );
- same( $("#" + parentPageId).length, 1, "establish the parent page exists" );
- selectButton.click();
- },
-
- function(){
- same( $( "#" + parentPageId).length, 1, "make sure parent page is still there after opening the dialog" );
- $.mobile.activePage.find( "li a" ).last().click();
- },
-
- start
- ]);
- });
})(jQuery);