diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-11-16 19:33:55 +0100 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-11-26 10:28:23 +0100 |
commit | b694409e76181dbfdfec9419d9c3f688ff183a53 (patch) | |
tree | 122718b0b952f292025f07bbf86131ae17245f0e /tests/visual | |
parent | 999617343f7b813dc1c8d9c9048489e4d99d0470 (diff) | |
download | jquery-ui-b694409e76181dbfdfec9419d9c3f688ff183a53.tar.gz jquery-ui-b694409e76181dbfdfec9419d9c3f688ff183a53.zip |
Dialog: Extend visual test to verify DOM position restore on destroy; overhaul unit test for destroy method.
Diffstat (limited to 'tests/visual')
-rw-r--r-- | tests/visual/dialog/complex-dialogs.html | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/visual/dialog/complex-dialogs.html b/tests/visual/dialog/complex-dialogs.html index 46d2539c5..03bb160fb 100644 --- a/tests/visual/dialog/complex-dialogs.html +++ b/tests/visual/dialog/complex-dialogs.html @@ -24,7 +24,7 @@ $(function() { var dialog = $( "#dialog" ).dialog({ modal: true, - height: 300, + height: 350, width: 500, buttons: [ { @@ -82,6 +82,11 @@ ] }); + $( "#destroy-dialog" ).click(function() { + dialog.dialog( "destroy" ).show(); + $( this ).remove(); + }); + $( document ).tooltip(); }); </script> @@ -91,13 +96,13 @@ <p>WHAT: A modal dialog opening another modal dialog (including a datepicker), opening a non-modal dialog (including an autocomplete with tooltip applied). A regular link on the page, outside of the dialogs.</p> <p>EXPECTED: As long as a modal dialog is open, focus stays within the dialogs. Both mouse and keyboard interactions are captured and restricted to the dialog. When the nested modal dialog is open, the first modal dialog can't be interacted with, until the nested dialog is closed. When the third dialog is open (not modal), switching between the two dialogs is possible, both can be interacted with.</p> -<a href="#">Outside link</a> <button id="open-dialog">Reopen dialog</button> <div id="dialog" title="Basic dialog"> <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p> <p><button id="open-datepicker">Open another window with a datepicker.</button></p> + <p><button id="destroy-dialog">Self destruct</button></p> </div> <div id="dialog-datepicker" title="A dialog with a datepicker"> @@ -110,5 +115,7 @@ <input id="autocomplete" title="Try typing something!"> </div> +<a href="#">Outside link</a> + </body> </html> |