From b694409e76181dbfdfec9419d9c3f688ff183a53 Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Fri, 16 Nov 2012 19:33:55 +0100 Subject: Dialog: Extend visual test to verify DOM position restore on destroy; overhaul unit test for destroy method. --- tests/visual/dialog/complex-dialogs.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tests/visual') 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(); }); @@ -91,13 +96,13 @@

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.

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.

-Outside link

This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.

+

@@ -110,5 +115,7 @@
+Outside link + -- cgit v1.2.3