aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorZiling Zhao <zizhao@cisco.com>2010-04-19 15:42:34 -0700
committerScott González <scott.gonzalez@gmail.com>2010-07-30 15:14:48 -0400
commitc5770c0e84b786ebe55a60034da0ff06dc02f422 (patch)
treee9e379ad55242652119fb96d02bd56f16e2c3768 /tests
parent90caa93a9b4b9b894b055cfb8dae0661ac7788b0 (diff)
downloadjquery-ui-c5770c0e84b786ebe55a60034da0ff06dc02f422.tar.gz
jquery-ui-c5770c0e84b786ebe55a60034da0ff06dc02f422.zip
Dialog: modified so that minWidth is respected. Fixes #5531 - dialog width should be at least minWidth on creation.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/dialog/dialog_tickets.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/unit/dialog/dialog_tickets.js b/tests/unit/dialog/dialog_tickets.js
index 296102c9b..dfa480fb7 100644
--- a/tests/unit/dialog/dialog_tickets.js
+++ b/tests/unit/dialog/dialog_tickets.js
@@ -40,4 +40,25 @@ test("#5184: isOpen in dialogclose event is true", function() {
el.remove();
});
+test("#5531: dialog width should be at least minWidth on creation", function () {
+ el = $('<div></div>').dialog({
+ width: 200,
+ minWidth: 300
+ });
+
+ equals(el.dialog('option', 'width'), 300, "width is minWidth");
+ el.dialog('option', 'width', 200);
+ equals(el.dialog('option', 'width'), 300, "width unchanged when set to < minWidth");
+ el.dialog('option', 'width', 320);
+ equals(el.dialog('option', 'width'), 320, "width changed if set to > minWidth");
+ el.remove();
+
+ el = $('<div></div>').dialog({
+ minWidth: 300
+ });
+ ok(el.dialog('option', 'width') >= 300, "width is at least 300");
+ el.remove();
+
+});
+
})(jQuery);