aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dialog.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dialog.js')
-rw-r--r--tests/dialog.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/dialog.js b/tests/dialog.js
index b5fbfa6ee..b6362aa4e 100644
--- a/tests/dialog.js
+++ b/tests/dialog.js
@@ -193,6 +193,30 @@ test("defaults", function() {
el.remove();
});
+test("title id", function() {
+ expect(3);
+
+ var titleId;
+
+ // reset the uuid so we know what values to expect
+ $.ui.dialog.uuid = 0;
+
+ el = $('<div/>').dialog();
+ titleId = dlg().find('.ui-dialog-title').attr('id');
+ equals(titleId, 'ui-dialog-title-1', 'auto-numbered title id');
+ el.remove();
+
+ el = $('<div/>').dialog();
+ titleId = dlg().find('.ui-dialog-title').attr('id');
+ equals(titleId, 'ui-dialog-title-2', 'auto-numbered title id');
+ el.remove();
+
+ el = $('<div id="foo"/>').dialog();
+ titleId = dlg().find('.ui-dialog-title').attr('id');
+ equals(titleId, 'ui-dialog-title-foo', 'carried over title id');
+ el.remove();
+});
+
module("dialog: Options");
test("autoOpen", function() {