From d0c11e932bec29bc271acf86db062e3a4d8d3797 Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Wed, 25 Jun 2008 10:01:24 +0000 Subject: fixed #3025 - dialog should have an autoResize option; default value: true --- tests/dialog.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'tests') diff --git a/tests/dialog.js b/tests/dialog.js index 161417e96..423cdea79 100644 --- a/tests/dialog.js +++ b/tests/dialog.js @@ -8,6 +8,7 @@ var defaults = { autoOpen: true, + autoResize: true, buttons: {}, disabled: false, dialogClass: null, @@ -200,6 +201,25 @@ test("autoOpen", function() { el.remove(); }); +test("autoResize", function() { + expect(2); + el = $('
content
content
content
content
content
').dialog({ autoResize: false }); + var expected = { height: el.height() }; + var handle = $(".ui-resizable-se", dlg()); + drag(handle, 50, 50); + var actual = { height: el.height() }; + compare2(actual, expected, '.dialog({ autoResize: false })'); + el.remove(); + el = $('
content
content
content
content
content
').dialog({ autoResize: true }); + var before = { width: el.width(), height: el.height() }; + var handle = $(".ui-resizable-se", dlg()); + drag(handle, 50, 50); + var expected = { width: before.width + 50, height: before.height + 50 }; + var actual = { width: el.width(), height: el.height() }; + compare2(actual, expected, '.dialog({ autoResize: true })'); + el.remove(); +}); + test("buttons", function() { expect(14); var buttons = { -- cgit v1.2.3