From 14e0450dc70441c70d4e3be16f9aaaf36fcc1d59 Mon Sep 17 00:00:00 2001 From: Scott González Date: Fri, 19 Sep 2008 18:28:31 +0000 Subject: Dialog: Added an id to the title span (needed for ARIA support). --- tests/dialog.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tests') 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 = $('
').dialog(); + titleId = dlg().find('.ui-dialog-title').attr('id'); + equals(titleId, 'ui-dialog-title-1', 'auto-numbered title id'); + el.remove(); + + el = $('
').dialog(); + titleId = dlg().find('.ui-dialog-title').attr('id'); + equals(titleId, 'ui-dialog-title-2', 'auto-numbered title id'); + el.remove(); + + el = $('
').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() { -- cgit v1.2.3