aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dialog.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2008-12-11 02:25:51 +0000
committerScott González <scott.gonzalez@gmail.com>2008-12-11 02:25:51 +0000
commit9eda8e4cb9ed2498a8e894474d806d1fe50a8895 (patch)
treea6cf898c77050900ad4b94a549767cd29cf47829 /tests/dialog.js
parent06ed0691cf1551bac05566da627f4381330183b4 (diff)
downloadjquery-ui-9eda8e4cb9ed2498a8e894474d806d1fe50a8895.tar.gz
jquery-ui-9eda8e4cb9ed2498a8e894474d806d1fe50a8895.zip
Dialog: Fixed #3638: Added closeText option (default 'close').
Diffstat (limited to 'tests/dialog.js')
-rw-r--r--tests/dialog.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/dialog.js b/tests/dialog.js
index 0c398105e..ddc32e1b8 100644
--- a/tests/dialog.js
+++ b/tests/dialog.js
@@ -10,6 +10,8 @@ var defaults = {
autoOpen: true,
autoResize: true,
buttons: {},
+ closeOnEscape: true,
+ closeText: 'close',
disabled: false,
dialogClass: undefined,
draggable: true,
@@ -326,6 +328,29 @@ test("buttons", function() {
el.remove();
});
+test("closeOnEscape", function() {
+ ok(false, 'missing test');
+});
+
+test("closeText", function() {
+ expect(3);
+
+ el = $('<div></div>').dialog();
+ equals(dlg().find('.ui-dialog-titlebar-close span').text(), 'close',
+ 'default close text');
+ el.remove();
+
+ el = $('<div></div>').dialog({ closeText: "foo" });
+ equals(dlg().find('.ui-dialog-titlebar-close span').text(), 'foo',
+ 'closeText on init');
+ el.remove();
+
+ el = $('<div></div>').dialog().dialog('option', 'closeText', 'bar');
+ equals(dlg().find('.ui-dialog-titlebar-close span').text(), 'bar',
+ 'closeText via option method');
+ el.remove();
+});
+
test("dialogClass", function() {
expect(4);