From 90fb45dffafc2e891b1ebca948ad33e6b94de112 Mon Sep 17 00:00:00 2001 From: Scott González Date: Thu, 7 Jan 2010 03:19:50 +0000 Subject: Merged in /branches/dev r3251:3620 (excluding autocomplete, modal, tooltip, menu; including menu static tests). --- tests/jquery.simulate.js | 300 +++++----- tests/static/button/default.html | 129 ++++ tests/static/menu/default.html | 38 ++ tests/unit/accordion/accordion_core.js | 2 +- tests/unit/accordion/accordion_options.js | 13 +- tests/unit/button/button.html | 56 ++ tests/unit/button/button_core.js | 70 +++ tests/unit/button/button_defaults.js | 15 + tests/unit/button/button_events.js | 17 + tests/unit/button/button_methods.js | 15 + tests/unit/button/button_options.js | 69 +++ tests/unit/button/button_tickets.js | 10 + tests/unit/core/core.js | 36 -- tests/unit/datepicker/datepicker_core.js | 5 + tests/unit/dialog/dialog_core.js | 5 + tests/unit/position/position_core.js | 666 ++++++++++----------- tests/unit/testsuite.js | 64 +- tests/unit/widget/widget.html | 24 + tests/unit/widget/widget.js | 168 ++++++ .../accordion/accordion_option_fillSpace_true.html | 102 ++-- tests/visual/accordion/accordion_ticket_4322.html | 148 ++--- tests/visual/accordion/accordion_ticket_4444.html | 100 ++-- tests/visual/button/default.html | 137 +++++ tests/visual/dialog/dialog_option_modal_false.html | 2 +- tests/visual/dialog/dialog_option_modal_true.html | 2 +- tests/visual/index.html | 1 + tests/visual/sortable/sortable_ticket_4551.html | 106 ++-- 27 files changed, 1486 insertions(+), 814 deletions(-) create mode 100644 tests/static/button/default.html create mode 100644 tests/static/menu/default.html create mode 100644 tests/unit/button/button.html create mode 100644 tests/unit/button/button_core.js create mode 100644 tests/unit/button/button_defaults.js create mode 100644 tests/unit/button/button_events.js create mode 100644 tests/unit/button/button_methods.js create mode 100644 tests/unit/button/button_options.js create mode 100644 tests/unit/button/button_tickets.js create mode 100644 tests/unit/widget/widget.html create mode 100644 tests/unit/widget/widget.js create mode 100644 tests/visual/button/default.html (limited to 'tests') diff --git a/tests/jquery.simulate.js b/tests/jquery.simulate.js index 939320668..7be499e17 100644 --- a/tests/jquery.simulate.js +++ b/tests/jquery.simulate.js @@ -1,150 +1,150 @@ -/* - * jquery.simulate - simulate browser mouse and keyboard events - * - * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - */ - -;(function($) { - -$.fn.extend({ - simulate: function(type, options) { - return this.each(function() { - var opt = $.extend({}, $.simulate.defaults, options || {}); - new $.simulate(this, type, opt); - }); - } -}); - -$.simulate = function(el, type, options) { - this.target = el; - this.options = options; - - if (/^drag$/.test(type)) { - this[type].apply(this, [this.target, options]); - } else { - this.simulateEvent(el, type, options); - } -} - -$.extend($.simulate.prototype, { - simulateEvent: function(el, type, options) { - var evt = this.createEvent(type, options); - this.dispatchEvent(el, type, evt, options); - return evt; - }, - createEvent: function(type, options) { - if (/^mouse(over|out|down|up|move)|(dbl)?click$/.test(type)) { - return this.mouseEvent(type, options); - } else if (/^key(up|down|press)$/.test(type)) { - return this.keyboardEvent(type, options); - } - }, - mouseEvent: function(type, options) { - var evt; - var e = $.extend({ - bubbles: true, cancelable: (type != "mousemove"), view: window, detail: 0, - screenX: 0, screenY: 0, clientX: 0, clientY: 0, - ctrlKey: false, altKey: false, shiftKey: false, metaKey: false, - button: 0, relatedTarget: undefined - }, options); - - var relatedTarget = $(e.relatedTarget)[0]; - - if ($.isFunction(document.createEvent)) { - evt = document.createEvent("MouseEvents"); - evt.initMouseEvent(type, e.bubbles, e.cancelable, e.view, e.detail, - e.screenX, e.screenY, e.clientX, e.clientY, - e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, - e.button, e.relatedTarget || document.body.parentNode); - } else if (document.createEventObject) { - evt = document.createEventObject(); - $.extend(evt, e); - evt.button = { 0:1, 1:4, 2:2 }[evt.button] || evt.button; - } - return evt; - }, - keyboardEvent: function(type, options) { - var evt; - - var e = $.extend({ bubbles: true, cancelable: true, view: window, - ctrlKey: false, altKey: false, shiftKey: false, metaKey: false, - keyCode: 0, charCode: 0 - }, options); - - if ($.isFunction(document.createEvent)) { - try { - evt = document.createEvent("KeyEvents"); - evt.initKeyEvent(type, e.bubbles, e.cancelable, e.view, - e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, - e.keyCode, e.charCode); - } catch(err) { - evt = document.createEvent("Events"); - evt.initEvent(type, e.bubbles, e.cancelable); - $.extend(evt, { view: e.view, - ctrlKey: e.ctrlKey, altKey: e.altKey, shiftKey: e.shiftKey, metaKey: e.metaKey, - keyCode: e.keyCode, charCode: e.charCode - }); - } - } else if (document.createEventObject) { - evt = document.createEventObject(); - $.extend(evt, e); - } - if ($.browser.msie || $.browser.opera) { - evt.keyCode = (e.charCode > 0) ? e.charCode : e.keyCode; - evt.charCode = undefined; - } - return evt; - }, - - dispatchEvent: function(el, type, evt) { - if (el.dispatchEvent) { - el.dispatchEvent(evt); - } else if (el.fireEvent) { - el.fireEvent('on' + type, evt); - } - return evt; - }, - - drag: function(el) { - var self = this, center = this.findCenter(this.target), - options = this.options, x = Math.floor(center.x), y = Math.floor(center.y), - dx = options.dx || 0, dy = options.dy || 0, target = this.target; - var coord = { clientX: x, clientY: y }; - this.simulateEvent(target, "mousedown", coord); - coord = { clientX: x + 1, clientY: y + 1 }; - this.simulateEvent(document, "mousemove", coord); - coord = { clientX: x + dx, clientY: y + dy }; - this.simulateEvent(document, "mousemove", coord); - this.simulateEvent(document, "mousemove", coord); - this.simulateEvent(target, "mouseup", coord); - }, - findCenter: function(el) { - var el = $(this.target), o = el.offset(); - return { - x: o.left + el.outerWidth() / 2, - y: o.top + el.outerHeight() / 2 - }; - } -}); - -$.extend($.simulate, { - defaults: { - speed: 'sync' - }, - VK_TAB: 9, - VK_ENTER: 13, - VK_ESC: 27, - VK_PGUP: 33, - VK_PGDN: 34, - VK_END: 35, - VK_HOME: 36, - VK_LEFT: 37, - VK_UP: 38, - VK_RIGHT: 39, - VK_DOWN: 40 -}); - -})(jQuery); +/* + * jquery.simulate - simulate browser mouse and keyboard events + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + */ + +;(function($) { + +$.fn.extend({ + simulate: function(type, options) { + return this.each(function() { + var opt = $.extend({}, $.simulate.defaults, options || {}); + new $.simulate(this, type, opt); + }); + } +}); + +$.simulate = function(el, type, options) { + this.target = el; + this.options = options; + + if (/^drag$/.test(type)) { + this[type].apply(this, [this.target, options]); + } else { + this.simulateEvent(el, type, options); + } +} + +$.extend($.simulate.prototype, { + simulateEvent: function(el, type, options) { + var evt = this.createEvent(type, options); + this.dispatchEvent(el, type, evt, options); + return evt; + }, + createEvent: function(type, options) { + if (/^mouse(over|out|down|up|move)|(dbl)?click$/.test(type)) { + return this.mouseEvent(type, options); + } else if (/^key(up|down|press)$/.test(type)) { + return this.keyboardEvent(type, options); + } + }, + mouseEvent: function(type, options) { + var evt; + var e = $.extend({ + bubbles: true, cancelable: (type != "mousemove"), view: window, detail: 0, + screenX: 0, screenY: 0, clientX: 0, clientY: 0, + ctrlKey: false, altKey: false, shiftKey: false, metaKey: false, + button: 0, relatedTarget: undefined + }, options); + + var relatedTarget = $(e.relatedTarget)[0]; + + if ($.isFunction(document.createEvent)) { + evt = document.createEvent("MouseEvents"); + evt.initMouseEvent(type, e.bubbles, e.cancelable, e.view, e.detail, + e.screenX, e.screenY, e.clientX, e.clientY, + e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, + e.button, e.relatedTarget || document.body.parentNode); + } else if (document.createEventObject) { + evt = document.createEventObject(); + $.extend(evt, e); + evt.button = { 0:1, 1:4, 2:2 }[evt.button] || evt.button; + } + return evt; + }, + keyboardEvent: function(type, options) { + var evt; + + var e = $.extend({ bubbles: true, cancelable: true, view: window, + ctrlKey: false, altKey: false, shiftKey: false, metaKey: false, + keyCode: 0, charCode: 0 + }, options); + + if ($.isFunction(document.createEvent)) { + try { + evt = document.createEvent("KeyEvents"); + evt.initKeyEvent(type, e.bubbles, e.cancelable, e.view, + e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, + e.keyCode, e.charCode); + } catch(err) { + evt = document.createEvent("Events"); + evt.initEvent(type, e.bubbles, e.cancelable); + $.extend(evt, { view: e.view, + ctrlKey: e.ctrlKey, altKey: e.altKey, shiftKey: e.shiftKey, metaKey: e.metaKey, + keyCode: e.keyCode, charCode: e.charCode + }); + } + } else if (document.createEventObject) { + evt = document.createEventObject(); + $.extend(evt, e); + } + if ($.browser.msie || $.browser.opera) { + evt.keyCode = (e.charCode > 0) ? e.charCode : e.keyCode; + evt.charCode = undefined; + } + return evt; + }, + + dispatchEvent: function(el, type, evt) { + if (el.dispatchEvent) { + el.dispatchEvent(evt); + } else if (el.fireEvent) { + el.fireEvent('on' + type, evt); + } + return evt; + }, + + drag: function(el) { + var self = this, center = this.findCenter(this.target), + options = this.options, x = Math.floor(center.x), y = Math.floor(center.y), + dx = options.dx || 0, dy = options.dy || 0, target = this.target; + var coord = { clientX: x, clientY: y }; + this.simulateEvent(target, "mousedown", coord); + coord = { clientX: x + 1, clientY: y + 1 }; + this.simulateEvent(document, "mousemove", coord); + coord = { clientX: x + dx, clientY: y + dy }; + this.simulateEvent(document, "mousemove", coord); + this.simulateEvent(document, "mousemove", coord); + this.simulateEvent(target, "mouseup", coord); + }, + findCenter: function(el) { + var el = $(this.target), o = el.offset(); + return { + x: o.left + el.outerWidth() / 2, + y: o.top + el.outerHeight() / 2 + }; + } +}); + +$.extend($.simulate, { + defaults: { + speed: 'sync' + }, + VK_TAB: 9, + VK_ENTER: 13, + VK_ESC: 27, + VK_PGUP: 33, + VK_PGDN: 34, + VK_END: 35, + VK_HOME: 36, + VK_LEFT: 37, + VK_UP: 38, + VK_RIGHT: 39, + VK_DOWN: 40 +}); + +})(jQuery); diff --git a/tests/static/button/default.html b/tests/static/button/default.html new file mode 100644 index 000000000..1d1ce80fc --- /dev/null +++ b/tests/static/button/default.html @@ -0,0 +1,129 @@ + + + + Button Static Test : Default + + + + + + + + + +

Using button elements

+ +
+ + + + + + + + + +
+ +

Using anchor elements

+ +
+ + Button + + + + + Button + + + + + Button + + + + + Button + + + + + + Button + + +
+ + + +

Using label elements (used when proxying to radio or check inputs)

+ +
+ + + + + + + + + +
+ + +

Button Sets

+ +
+ + + +
+ + + + + + + diff --git a/tests/static/menu/default.html b/tests/static/menu/default.html new file mode 100644 index 000000000..2830433e3 --- /dev/null +++ b/tests/static/menu/default.html @@ -0,0 +1,38 @@ + + + + Menu Static Test : Default + + + + + + + + + + + + + + diff --git a/tests/unit/accordion/accordion_core.js b/tests/unit/accordion/accordion_core.js index 797ead864..47d2509e6 100644 --- a/tests/unit/accordion/accordion_core.js +++ b/tests/unit/accordion/accordion_core.js @@ -5,7 +5,7 @@ (function($) { -jQuery.ui.accordion.defaults.animated = false; +$.ui.accordion.prototype.options.animated = false; function state(accordion) { var args = $.makeArray(arguments).slice(1); diff --git a/tests/unit/accordion/accordion_options.js b/tests/unit/accordion/accordion_options.js index b77cb787e..ddb2c38cb 100644 --- a/tests/unit/accordion/accordion_options.js +++ b/tests/unit/accordion/accordion_options.js @@ -127,19 +127,20 @@ test("{ header: '> li > :first-child,> :not(li):even' }, default", function() { }); test("{ icons: false }", function() { + var list = $("#list1"); function icons(on) { - same($("#list1 span.ui-icon").length, on ? 3 : 0); - same( $("#list1").hasClass("ui-accordion-icons"), on ); + same($("span.ui-icon", list).length, on ? 3 : 0); + same( list.hasClass("ui-accordion-icons"), on ); } - $("#list1").accordion(); + list.accordion(); icons(true); - $("#list1").accordion("destroy").accordion({ + list.accordion("destroy").accordion({ icons: false }); icons(false); - $("#list1").accordion("option", "icons", $.ui.accordion.defaults.icons); + list.accordion("option", "icons", $.ui.accordion.prototype.options.icons); icons(true); - $("#list1").accordion("option", "icons", false); + list.accordion("option", "icons", false); icons(false); }); diff --git a/tests/unit/button/button.html b/tests/unit/button/button.html new file mode 100644 index 000000000..5017c9bc6 --- /dev/null +++ b/tests/unit/button/button.html @@ -0,0 +1,56 @@ + + + + jQuery UI Button Test Suite + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ + + +
+
+
+ + + +
+
+
+
+ + + +
+
+ + + +
+
+ + + diff --git a/tests/unit/button/button_core.js b/tests/unit/button/button_core.js new file mode 100644 index 000000000..12016627f --- /dev/null +++ b/tests/unit/button/button_core.js @@ -0,0 +1,70 @@ +/* + * button_core.js + */ + + +(function($) { + +module("button: core"); + +test("checkbox", function() { + var input = $("#check"); + label = $("label[for=check]"); + ok( input.is(":visble") ); + ok( label.is(":not(.ui-button)") ); + input.button(); + ok( input.is(":hidden") ); + ok( label.is(".ui-button") ); +}); + +test("radios", function() { + var inputs = $("#radio0 input"); + labels = $("#radio0 label"); + ok( inputs.is(":visble") ); + ok( labels.is(":not(.ui-button)") ); + inputs.button(); + ok( inputs.is(":hidden") ); + ok( labels.is(".ui-button") ); +}); + +function assert(noForm, form1, form2) { + ok( $("#radio0 .ui-button" + noForm).is(".ui-state-active") ); + ok( $("#radio1 .ui-button" + form1).is(".ui-state-active") ); + ok( $("#radio2 .ui-button" + form2).is(".ui-state-active") ); +} + +test("radio groups", function() { + $(":radio").button(); + assert(":eq(0)", ":eq(1)", ":eq(2)"); + + // click outside of forms + $("#radio0 .ui-button:eq(1)").click(); + assert(":eq(1)", ":eq(1)", ":eq(2)"); + + // click in first form + $("#radio1 .ui-button:eq(0)").click(); + assert(":eq(1)", ":eq(0)", ":eq(2)"); + + // click in second form + $("#radio2 .ui-button:eq(0)").click(); + assert(":eq(1)", ":eq(0)", ":eq(0)"); +}); + +test("input type submit, don't create child elements", function() { + var input = $("#submit") + same( input.children().length, 0 ); + input.button(); + same( input.children().length, 0 ); +}); + +test("buttonset", function() { + var set = $("#radio1").buttonset(); + ok( set.is(".ui-button-set") ); + same( set.children(".ui-button").length, 3 ); + same( set.children("input:radio:hidden").length, 3 ); + ok( set.children("label:eq(0)").is(".ui-button.ui-corner-left:not(.ui-corner-all)") ); + ok( set.children("label:eq(1)").is(".ui-button:not(.ui-corner-all)") ); + ok( set.children("label:eq(2)").is(".ui-button.ui-corner-right:not(.ui-corner-all)") ); +}); + +})(jQuery); diff --git a/tests/unit/button/button_defaults.js b/tests/unit/button/button_defaults.js new file mode 100644 index 000000000..f0152e3c2 --- /dev/null +++ b/tests/unit/button/button_defaults.js @@ -0,0 +1,15 @@ +/* + * button_defaults.js + */ + +var button_defaults = { + disabled: false, + text: true, + label: null, + icons: { + primary: null, + secondary: null + } +}; + +commonWidgetTests('button', { defaults: button_defaults }); diff --git a/tests/unit/button/button_events.js b/tests/unit/button/button_events.js new file mode 100644 index 000000000..17f505458 --- /dev/null +++ b/tests/unit/button/button_events.js @@ -0,0 +1,17 @@ +/* + * button_events.js + */ +(function($) { + +module("button: events"); + +test("click-through", function() { + expect(2); + var set = $("#radio1").buttonset(); + set.find("input:first").click(function() { + ok( true ); + }); + ok( set.find("label:first").click().is(".ui-button") ); +}); + +})(jQuery); diff --git a/tests/unit/button/button_methods.js b/tests/unit/button/button_methods.js new file mode 100644 index 000000000..a162a8930 --- /dev/null +++ b/tests/unit/button/button_methods.js @@ -0,0 +1,15 @@ +/* + * button_methods.js + */ +(function($) { + + +module("button: methods"); + +test("destroy", function() { + var beforeHtml = $("#button").parent().html(); + var afterHtml = $("#button").button().button("destroy").parent().html(); + same( beforeHtml, afterHtml ); +}); + +})(jQuery); diff --git a/tests/unit/button/button_options.js b/tests/unit/button/button_options.js new file mode 100644 index 000000000..f44679a34 --- /dev/null +++ b/tests/unit/button/button_options.js @@ -0,0 +1,69 @@ +/* + * button_options.js + */ +(function($) { + +module("button: options"); + +test("text false without icon", function() { + $("#button").button({ + text: false + }); + ok( $("#button").is(".ui-button-text-only:not(.ui-button-icon-only)") ); + + $("#button").button("destroy"); +}); + +test("text false with icon", function() { + $("#button").button({ + text: false, + icons: { + primary: "iconclass" + } + }); + ok( $("#button").is(".ui-button-icon-only:not(.ui-button-text):has(span.ui-icon.iconclass)") ); + + $("#button").button("destroy"); +}); + +test("label, default", function() { + $("#button").button(); + same( $("#button").text(), "Label" ); + + $("#button").button("destroy"); +}); + +test("label", function() { + $("#button").button({ + label: "xxx" + }); + same( $("#button").text(), "xxx" ); + + $("#button").button("destroy"); +}); + +test("label default with input type submit", function() { + same( $("#submit").button().val(), "Label" ); +}); + +test("label with input type submit", function() { + var label = $("#submit").button({ + label: "xxx" + }).val(); + same( label, "xxx" ); +}); + +test("icons", function() { + $("#button").button({ + text: false, + icons: { + primary: "iconclass", + secondary: "iconclass2" + } + }); + ok( $("#button").is(":has(span.ui-icon.ui-button-icon-primary.iconclass):has(span.ui-icon.ui-button-icon-secondary.iconclass2)") ); + + $("#button").button("destroy"); +}); + +})(jQuery); diff --git a/tests/unit/button/button_tickets.js b/tests/unit/button/button_tickets.js new file mode 100644 index 000000000..d3b981e21 --- /dev/null +++ b/tests/unit/button/button_tickets.js @@ -0,0 +1,10 @@ +/* + * button_tickets.js + */ +(function($) { + +module("button: tickets"); + + + +})(jQuery); diff --git a/tests/unit/core/core.js b/tests/unit/core/core.js index a35935c52..23292671a 100644 --- a/tests/unit/core/core.js +++ b/tests/unit/core/core.js @@ -57,40 +57,4 @@ test('zIndex', function() { equals($('#zIndexAutoNoParent').zIndex(), 0, 'zIndex never explicitly set in hierarchy'); }); -test('widget factory, merge multiple option arguments', function() { - expect(1); - $.widget("ui.widgetTest", { - _init: function() { - same(this.options, { - disabled: false, - option1: "value1", - option2: "value2", - option3: "value3", - option4: { - option4a: "valuea", - option4b: "valueb" - } - }); - } - }); - $("#main > :first").widgetTest({ - option1: "valuex", - option2: "valuex", - option3: "value3", - option4: { - option4a: "valuex" - } - }, { - option1: "value1", - option2: "value2", - option4: { - option4b: "valueb" - } - }, { - option4: { - option4a: "valuea" - } - }); -}); - })(jQuery); diff --git a/tests/unit/datepicker/datepicker_core.js b/tests/unit/datepicker/datepicker_core.js index f34c9fa06..9867022f7 100644 --- a/tests/unit/datepicker/datepicker_core.js +++ b/tests/unit/datepicker/datepicker_core.js @@ -47,6 +47,11 @@ module("datepicker: core", { } }); +test("widget method", function() { + var actual = $("#inp").datepicker().datepicker("widget")[0]; + same($("body > #ui-datepicker-div:last-child")[0], actual); +}); + test('baseStructure', function() { var inp = init('#inp'); inp.focus(); diff --git a/tests/unit/dialog/dialog_core.js b/tests/unit/dialog/dialog_core.js index 3924c1d7f..cf76045b4 100644 --- a/tests/unit/dialog/dialog_core.js +++ b/tests/unit/dialog/dialog_core.js @@ -147,4 +147,9 @@ test("ARIA", function() { el.remove(); }); +test("widget method", function() { + var dialog = $("
").appendTo("#main").dialog(); + same(dialog.parent()[0], dialog.dialog("widget")[0]); +}); + })(jQuery); diff --git a/tests/unit/position/position_core.js b/tests/unit/position/position_core.js index f05a2e804..705a7ec34 100644 --- a/tests/unit/position/position_core.js +++ b/tests/unit/position/position_core.js @@ -1,333 +1,333 @@ -/* - * position_core.js - */ -(function($) { - -test('my, at, of', function() { - $('#elx').position({ - my: 'left top', - at: 'left top', - of: '#parentx', - collision: 'none' - }); - same($('#elx').offset(), { top: 40, left: 40 }, 'left top, left top'); - - $('#elx').position({ - my: 'left top', - at: 'left bottom', - of: '#parentx', - collision: 'none' - }); - same($('#elx').offset(), { top: 60, left: 40 }, 'left top, left bottom'); - - $('#elx').position({ - my: 'left', - at: 'bottom', - of: '#parentx', - collision: 'none' - }); - same($('#elx').offset(), { top: 55, left: 50 }, 'left, bottom'); - - $('#elx').position({ - my: 'left foo', - at: 'bar baz', - of: '#parentx', - collision: 'none' - }); - same($('#elx').offset(), { top: 45, left: 50 }, 'left foo, bar baz'); -}); - -test('multiple elements', function() { - var elements = $('#el1, #el2'); - var result = elements.position({ - my: 'left top', - at: 'left bottom', - of: '#parent', - collision: 'none' - }); - - same(result, elements); - var expected = {top: 10, left: 4}; - elements.each(function() { - same($(this).offset(), expected); - }); -}); - -test('positions', function() { - var definitions = []; - var offsets = { - left: 0, - center: 3, - right: 6, - top: 0, - center: 3, - bottom: 6 - }; - var start = { left: 4, top: 4 }; - $.each([0, 1], function(my) { - $.each(["top", "center", "bottom"], function(vindex, vertical) { - $.each(["left", "center", "right"], function(hindex, horizontal) { - definitions.push({ - my: my ? horizontal + " " + vertical : 'left top', - at: !my ? horizontal + " " + vertical : 'left top', - result: { - top: my ? start.top - offsets[vertical] : start.top + offsets[vertical], - left: my ? start.left - offsets[horizontal] : start.left + offsets[horizontal] - } - }); - }); - }); - }); - var el = $("#el1"); - $.each(definitions, function(index, definition) { - el.position({ - my: definition.my, - at: definition.at, - of: '#parent', - collision: 'none' - }); - same(el.offset(), definition.result, "Position via " + jsDump.parse({my:definition.my, at:definition.at})); - }); -}); - -test('of', function() { - $('#elx').position({ - my: 'left top', - at: 'left top', - of: '#parentx', - collision: 'none' - }); - same($('#elx').offset(), { top: 40, left: 40 }, 'selector'); - - $('#elx').position({ - my: 'left top', - at: 'left bottom', - of: $('#parentx'), - collision: 'none' - }); - same($('#elx').offset(), { top: 60, left: 40 }, 'jQuery object'); - - $('#elx').position({ - my: 'left top', - at: 'left top', - of: $('#parentx')[0], - collision: 'none' - }); - same($('#elx').offset(), { top: 40, left: 40 }, 'DOM element'); - - $('#elx').position({ - my: 'right bottom', - at: 'right bottom', - of: document, - collision: 'none' - }); - same($('#elx').offset(), { - top: $(document).height() - 10, - left: $(document).width() - 10 - }, 'document'); - - $('#elx').position({ - my: 'right bottom', - at: 'right bottom', - of: window, - collision: 'none' - }); - same($('#elx').offset(), { - top: $(window).height() - 10, - left: $(window).width() - 10 - }, 'window'); - - $(window).scrollTop(500).scrollLeft(200); - $('#elx').position({ - my: 'right bottom', - at: 'right bottom', - of: window, - collision: 'none' - }); - same($('#elx').offset(), { - top: $(window).height() + 500 - 10, - left: $(window).width() + 200 - 10 - }, 'window, scrolled'); - $(window).scrollTop(0).scrollLeft(0); - - var event = $.extend($.Event('someEvent'), { pageX: 200, pageY: 300 }); - $('#elx').position({ - my: 'left top', - at: 'left top', - of: event, - collision: 'none' - }); - same($('#elx').offset(), { - top: 300, - left: 200 - }, 'event - left top, left top'); - - event = $.extend($.Event('someEvent'), { pageX: 400, pageY: 600 }); - $('#elx').position({ - my: 'left top', - at: 'right bottom', - of: event, - collision: 'none' - }); - same($('#elx').offset(), { - top: 600, - left: 400 - }, 'event - left top, right bottom'); -}); - -test('offset', function() { - $('#elx').position({ - my: 'left top', - at: 'left bottom', - of: '#parentx', - offset: '10', - collision: 'none' - }); - same($('#elx').offset(), { top: 70, left: 50 }, 'single value'); - - $('#elx').position({ - my: 'left top', - at: 'left bottom', - of: '#parentx', - offset: '5 -3', - collision: 'none' - }); - same($('#elx').offset(), { top: 57, left: 45 }, 'two values'); - - $('#elx').position({ - my: 'left top', - at: 'left bottom', - of: '#parentx', - offset: '5px -3px', - collision: 'none' - }); - same($('#elx').offset(), { top: 57, left: 45 }, 'with units'); -}); - -test('by', function() { - expect(6); - - var count = 0, - elems = $('#el1, #el2'), - expectedPosition = { top: 40, left: 40 }, - originalPosition = elems.position({ - my: 'right bottom', - at: 'rigt bottom', - of: '#parentx', - collision: 'none' - }).offset(); - - elems.position({ - my: 'left top', - at: 'left top', - of: '#parentx', - by: function(position) { - same(this, elems[count], 'correct context for call #' + count); - same(position, expectedPosition, 'correct position for call #' + count); - count++; - } - }); - - elems.each(function() { - same($(this).offset(), originalPosition, 'elements not moved'); - }); -}); - -function collisionTest(config, result, msg) { - var elem = $("#elx").position($.extend({ - my: "left top", - at: "right bottom", - of: window - }, config)); - same(elem.offset(), result, msg); -} - -function collisionTest2(config, result, msg) { - collisionTest($.extend({ - my: "right bottom", - at: "left top" - }, config), result, msg); -} - -test("collision: fit, no offset", function() { - collisionTest({ - collision: "fit" - }, { top: $(window).height() - 10, left: $(window).width() - 10 }, "right bottom"); - - collisionTest2({ - collision: "fit" - }, { top: 0, left: 0 }, "left top"); -}); - -test("collision: fit, with offset", function() { - collisionTest({ - collision: "fit", - offset: "2 3" - }, { top: $(window).height() - 10, left: $(window).width() - 10 }, "right bottom"); - - collisionTest2({ - collision: "fit", - offset: "2 3" - }, { top: 0, left: 0 }, "left top, positive offset"); - - collisionTest2({ - collision: "fit", - offset: "-2 -3" - }, { top: 0, left: 0 }, "left top, negative offset"); -}); - -test("collision: flip, no offset", function() { - collisionTest({ - collision: "flip" - }, { top: -10, left: -10 }, "left top"); - - collisionTest2({ - collision: "flip" - }, { top: $(window).height(), left: $(window).width() }, "right bottom"); -}); - -test("collision: flip, with offset", function() { - collisionTest({ - collision: "flip", - offset: "2 3" - }, { top: -13, left: -12 }, "left top, with offset added"); - - collisionTest2({ - collision: "flip", - offset: "2 3" - }, { top: $(window).height() - 3, left: $(window).width() - 2 }, "bottom, positive offset"); - - collisionTest2({ - collision: "flip", - offset: "-2 -3" - }, { top: $(window).height() + 3, left: $(window).width() + 2 }, "right bottom, negative offset"); -}); - -test("collision: none, no offset", function() { - collisionTest({ - collision: "none" - }, { top: $(window).height(), left: $(window).width() }, "left top"); - - collisionTest2({ - collision: "none" - }, { top: -10, left: -10 }, "moved to the right bottom"); -}); - -test("collision: none, with offset", function() { - collisionTest({ - collision: "none", - offset: "2 3" - }, { top: $(window).height() + 3, left: $(window).width() + 2 }, "right bottom, with offset added"); - - collisionTest2({ - collision: "none", - offset: "2 3" - }, { top: -7, left: -8 }, "left top, positive offset"); - - collisionTest2({ - collision: "none", - offset: "-2 -3" - }, { top: -13, left: -12 }, "left top, negative offset"); -}); - -})(jQuery); +/* + * position_core.js + */ +(function($) { + +test('my, at, of', function() { + $('#elx').position({ + my: 'left top', + at: 'left top', + of: '#parentx', + collision: 'none' + }); + same($('#elx').offset(), { top: 40, left: 40 }, 'left top, left top'); + + $('#elx').position({ + my: 'left top', + at: 'left bottom', + of: '#parentx', + collision: 'none' + }); + same($('#elx').offset(), { top: 60, left: 40 }, 'left top, left bottom'); + + $('#elx').position({ + my: 'left', + at: 'bottom', + of: '#parentx', + collision: 'none' + }); + same($('#elx').offset(), { top: 55, left: 50 }, 'left, bottom'); + + $('#elx').position({ + my: 'left foo', + at: 'bar baz', + of: '#parentx', + collision: 'none' + }); + same($('#elx').offset(), { top: 45, left: 50 }, 'left foo, bar baz'); +}); + +test('multiple elements', function() { + var elements = $('#el1, #el2'); + var result = elements.position({ + my: 'left top', + at: 'left bottom', + of: '#parent', + collision: 'none' + }); + + same(result, elements); + var expected = {top: 10, left: 4}; + elements.each(function() { + same($(this).offset(), expected); + }); +}); + +test('positions', function() { + var definitions = []; + var offsets = { + left: 0, + center: 3, + right: 6, + top: 0, + center: 3, + bottom: 6 + }; + var start = { left: 4, top: 4 }; + $.each([0, 1], function(my) { + $.each(["top", "center", "bottom"], function(vindex, vertical) { + $.each(["left", "center", "right"], function(hindex, horizontal) { + definitions.push({ + my: my ? horizontal + " " + vertical : 'left top', + at: !my ? horizontal + " " + vertical : 'left top', + result: { + top: my ? start.top - offsets[vertical] : start.top + offsets[vertical], + left: my ? start.left - offsets[horizontal] : start.left + offsets[horizontal] + } + }); + }); + }); + }); + var el = $("#el1"); + $.each(definitions, function(index, definition) { + el.position({ + my: definition.my, + at: definition.at, + of: '#parent', + collision: 'none' + }); + same(el.offset(), definition.result, "Position via " + jsDump.parse({my:definition.my, at:definition.at})); + }); +}); + +test('of', function() { + $('#elx').position({ + my: 'left top', + at: 'left top', + of: '#parentx', + collision: 'none' + }); + same($('#elx').offset(), { top: 40, left: 40 }, 'selector'); + + $('#elx').position({ + my: 'left top', + at: 'left bottom', + of: $('#parentx'), + collision: 'none' + }); + same($('#elx').offset(), { top: 60, left: 40 }, 'jQuery object'); + + $('#elx').position({ + my: 'left top', + at: 'left top', + of: $('#parentx')[0], + collision: 'none' + }); + same($('#elx').offset(), { top: 40, left: 40 }, 'DOM element'); + + $('#elx').position({ + my: 'right bottom', + at: 'right bottom', + of: document, + collision: 'none' + }); + same($('#elx').offset(), { + top: $(document).height() - 10, + left: $(document).width() - 10 + }, 'document'); + + $('#elx').position({ + my: 'right bottom', + at: 'right bottom', + of: window, + collision: 'none' + }); + same($('#elx').offset(), { + top: $(window).height() - 10, + left: $(window).width() - 10 + }, 'window'); + + $(window).scrollTop(500).scrollLeft(200); + $('#elx').position({ + my: 'right bottom', + at: 'right bottom', + of: window, + collision: 'none' + }); + same($('#elx').offset(), { + top: $(window).height() + 500 - 10, + left: $(window).width() + 200 - 10 + }, 'window, scrolled'); + $(window).scrollTop(0).scrollLeft(0); + + var event = $.extend($.Event('someEvent'), { pageX: 200, pageY: 300 }); + $('#elx').position({ + my: 'left top', + at: 'left top', + of: event, + collision: 'none' + }); + same($('#elx').offset(), { + top: 300, + left: 200 + }, 'event - left top, left top'); + + event = $.extend($.Event('someEvent'), { pageX: 400, pageY: 600 }); + $('#elx').position({ + my: 'left top', + at: 'right bottom', + of: event, + collision: 'none' + }); + same($('#elx').offset(), { + top: 600, + left: 400 + }, 'event - left top, right bottom'); +}); + +test('offset', function() { + $('#elx').position({ + my: 'left top', + at: 'left bottom', + of: '#parentx', + offset: '10', + collision: 'none' + }); + same($('#elx').offset(), { top: 70, left: 50 }, 'single value'); + + $('#elx').position({ + my: 'left top', + at: 'left bottom', + of: '#parentx', + offset: '5 -3', + collision: 'none' + }); + same($('#elx').offset(), { top: 57, left: 45 }, 'two values'); + + $('#elx').position({ + my: 'left top', + at: 'left bottom', + of: '#parentx', + offset: '5px -3px', + collision: 'none' + }); + same($('#elx').offset(), { top: 57, left: 45 }, 'with units'); +}); + +test('using', function() { + expect(6); + + var count = 0, + elems = $('#el1, #el2'), + expectedPosition = { top: 40, left: 40 }, + originalPosition = elems.position({ + my: 'right bottom', + at: 'rigt bottom', + of: '#parentx', + collision: 'none' + }).offset(); + + elems.position({ + my: 'left top', + at: 'left top', + of: '#parentx', + using: function(position) { + same(this, elems[count], 'correct context for call #' + count); + same(position, expectedPosition, 'correct position for call #' + count); + count++; + } + }); + + elems.each(function() { + same($(this).offset(), originalPosition, 'elements not moved'); + }); +}); + +function collisionTest(config, result, msg) { + var elem = $("#elx").position($.extend({ + my: "left top", + at: "right bottom", + of: window + }, config)); + same(elem.offset(), result, msg); +} + +function collisionTest2(config, result, msg) { + collisionTest($.extend({ + my: "right bottom", + at: "left top" + }, config), result, msg); +} + +test("collision: fit, no offset", function() { + collisionTest({ + collision: "fit" + }, { top: $(window).height() - 10, left: $(window).width() - 10 }, "right bottom"); + + collisionTest2({ + collision: "fit" + }, { top: 0, left: 0 }, "left top"); +}); + +test("collision: fit, with offset", function() { + collisionTest({ + collision: "fit", + offset: "2 3" + }, { top: $(window).height() - 10, left: $(window).width() - 10 }, "right bottom"); + + collisionTest2({ + collision: "fit", + offset: "2 3" + }, { top: 0, left: 0 }, "left top, positive offset"); + + collisionTest2({ + collision: "fit", + offset: "-2 -3" + }, { top: 0, left: 0 }, "left top, negative offset"); +}); + +test("collision: flip, no offset", function() { + collisionTest({ + collision: "flip" + }, { top: -10, left: -10 }, "left top"); + + collisionTest2({ + collision: "flip" + }, { top: $(window).height(), left: $(window).width() }, "right bottom"); +}); + +test("collision: flip, with offset", function() { + collisionTest({ + collision: "flip", + offset: "2 3" + }, { top: -13, left: -12 }, "left top, with offset added"); + + collisionTest2({ + collision: "flip", + offset: "2 3" + }, { top: $(window).height() - 3, left: $(window).width() - 2 }, "bottom, positive offset"); + + collisionTest2({ + collision: "flip", + offset: "-2 -3" + }, { top: $(window).height() + 3, left: $(window).width() + 2 }, "right bottom, negative offset"); +}); + +test("collision: none, no offset", function() { + collisionTest({ + collision: "none" + }, { top: $(window).height(), left: $(window).width() }, "left top"); + + collisionTest2({ + collision: "none" + }, { top: -10, left: -10 }, "moved to the right bottom"); +}); + +test("collision: none, with offset", function() { + collisionTest({ + collision: "none", + offset: "2 3" + }, { top: $(window).height() + 3, left: $(window).width() + 2 }, "right bottom, with offset added"); + + collisionTest2({ + collision: "none", + offset: "2 3" + }, { top: -7, left: -8 }, "left top, positive offset"); + + collisionTest2({ + collision: "none", + offset: "-2 -3" + }, { top: -13, left: -12 }, "left top, negative offset"); +}); + +})(jQuery); diff --git a/tests/unit/testsuite.js b/tests/unit/testsuite.js index 345a5a106..81390d59b 100644 --- a/tests/unit/testsuite.js +++ b/tests/unit/testsuite.js @@ -3,15 +3,14 @@ var hasDuplicate = false; function testWidgetDefaults(widget, defaults) { var pluginDefaults = $.extend({}, - $.widget.defaults, - $.ui[widget].defaults + $.ui[widget].prototype.options ); - // ensure that all defualts have the correct value + // ensure that all defaults have the correct value test('defined defaults', function() { $.each(defaults, function(key, val) { if ($.isFunction(val)) { - ok(val !== undefined); + ok(val !== undefined, key); return; } same(pluginDefaults[key], val, key); @@ -24,72 +23,21 @@ function testWidgetDefaults(widget, defaults) { ok(key in defaults, key); }); }); - - // defaults after init - test('defaults on init', function() { - var el = $('
')[widget](), - instance = el.data(widget); - - $.each(defaults, function(key, val) { - if ($.isFunction(val)) { - ok(val !== undefined); - return; - } - same(instance.options[key], val, key); - }); - el.remove(); - }); -} - -function testSettingOptions(widget, options) { - test('option values', function() { - var el = $('
')[widget](), - instance = el.data(widget); - - $.each(options, function(i, option) { - $.each({ - 'null': null, - 'false': false, - 'true': true, - zero: 0, - number: 1, - 'empty string': '', - string: 'string', - 'empty array': [], - array: ['array'], - 'empty object': {}, - object: {obj: 'ect'}, - date: new Date(), - regexp: /regexp/, - 'function': function() {} - }, function(type, val) { - el[widget]('option', option, val); - same(instance.options[option], val, option + ': ' + type); - }); - }); - - el.remove(); - }); } function testWidgetOverrides(widget) { test('$.widget overrides', function() { - $.each(['option', '_getData', '_trigger'], function(i, method) { - ok($.widget.prototype[method] == $.ui[widget].prototype[method], + $.each(['_widgetInit', 'option', '_trigger'], function(i, method) { + ok($.Widget.prototype[method] == $.ui[widget].prototype[method], 'should not override ' + method); }); }); } + function commonWidgetTests(widget, settings) { - var options = []; - $.each(settings.defaults, function(option) { - options.push(option); - }); - module(widget + ": common widget"); testWidgetDefaults(widget, settings.defaults); - testSettingOptions(widget, options); testWidgetOverrides(widget); } diff --git a/tests/unit/widget/widget.html b/tests/unit/widget/widget.html new file mode 100644 index 000000000..f28f24ca7 --- /dev/null +++ b/tests/unit/widget/widget.html @@ -0,0 +1,24 @@ + + + + jQuery UI Widget Test Suite + + + + + + + + + + + + + + +
+ +
+ + + diff --git a/tests/unit/widget/widget.js b/tests/unit/widget/widget.js new file mode 100644 index 000000000..3e7d9aaa6 --- /dev/null +++ b/tests/unit/widget/widget.js @@ -0,0 +1,168 @@ +/* + * widget unit tests + */ +(function($) { + +module('widget factory', { + teardown: function() { + delete $.ui.testWidget; + } +}); + +test('widget creation', function() { + var myPrototype = { + _init: function() {}, + creationTest: function() {} + }; + + $.widget('ui.testWidget', myPrototype); + ok($.isFunction($.ui.testWidget), 'constructor was created'); + equals('object', typeof $.ui.testWidget.prototype, 'prototype was created'); + equals($.ui.testWidget.prototype._init, myPrototype._init, 'init function is copied over'); + equals($.ui.testWidget.prototype.creationTest, myPrototype.creationTest, 'random function is copied over'); + equals($.ui.testWidget.prototype.option, $.Widget.prototype.option, 'option method copied over from base widget'); +}); + +test('jQuery usage', function() { + expect(10); + + var shouldInit = false; + + $.widget('ui.testWidget', { + getterSetterVal: 5, + _init: function() { + ok(shouldInit, 'init called on instantiation'); + }, + methodWithParams: function(param1, param2) { + ok(true, 'method called via .pluginName(methodName)'); + equals(param1, 'value1', 'parameter passed via .pluginName(methodName, param)'); + equals(param2, 'value2', 'multiple parameter passed via .pluginName(methodName, param, param)'); + + return this; + }, + getterSetterMethod: function(val) { + if (val) { + this.getterSetterVal = val; + } else { + return this.getterSetterVal; + } + } + }); + + shouldInit = true; + var elem = $('
').testWidget(); + shouldInit = false; + + var instance = elem.data('testWidget'); + equals(typeof instance, 'object', 'instance stored in .data(pluginName)'); + equals(instance.element[0], elem[0], 'element stored on widget'); + var ret = elem.testWidget('methodWithParams', 'value1', 'value2'); + equals(ret, elem, 'jQuery object returned from method call'); + + ret = elem.testWidget('getterSetterMethod'); + equals(ret, 5, 'getter/setter can act as getter'); + ret = elem.testWidget('getterSetterMethod', 30); + equals(ret, elem, 'getter/setter method can be chainable'); + equals(instance.getterSetterVal, 30, 'getter/setter can act as setter'); +}); + +test('direct usage', function() { + expect(9); + + var shouldInit = false; + + $.widget('ui.testWidget', { + getterSetterVal: 5, + _init: function() { + ok(shouldInit, 'init called on instantiation'); + }, + methodWithParams: function(param1, param2) { + ok(true, 'method called via .pluginName(methodName)'); + equals(param1, 'value1', 'parameter passed via .pluginName(methodName, param)'); + equals(param2, 'value2', 'multiple parameter passed via .pluginName(methodName, param, param)'); + + return this; + }, + getterSetterMethod: function(val) { + if (val) { + this.getterSetterVal = val; + } else { + return this.getterSetterVal; + } + } + }); + + var elem = $('
')[0]; + + shouldInit = true; + var instance = new $.ui.testWidget({}, elem); + shouldInit = false; + + equals($(elem).data('testWidget'), instance, 'instance stored in .data(pluginName)'); + equals(instance.element[0], elem, 'element stored on widget'); + + var ret = instance.methodWithParams('value1', 'value2'); + equals(ret, instance, 'plugin returned from method call'); + + ret = instance.getterSetterMethod(); + equals(ret, 5, 'getter/setter can act as getter'); + instance.getterSetterMethod(30); + equals(instance.getterSetterVal, 30, 'getter/setter can act as setter'); +}); + +test('merge multiple option arguments', function() { + expect(1); + $.widget("ui.testWidget", { + _init: function() { + same(this.options, { + disabled: false, + option1: "value1", + option2: "value2", + option3: "value3", + option4: { + option4a: "valuea", + option4b: "valueb" + } + }); + } + }); + $("
").testWidget({ + option1: "valuex", + option2: "valuex", + option3: "value3", + option4: { + option4a: "valuex" + } + }, { + option1: "value1", + option2: "value2", + option4: { + option4b: "valueb" + } + }, { + option4: { + option4a: "valuea" + } + }); +}); + +test(".widget() - base", function() { + $.widget("ui.testWidget", { + _init: function() {} + }); + var div = $("
").testWidget() + same(div[0], div.testWidget("widget")[0]); +}); + +test(".widget() - overriden", function() { + var wrapper = $("
"); + $.widget("ui.testWidget", { + _init: function() {}, + widget: function() { + return wrapper; + } + }); + same(wrapper[0], $("
").testWidget().testWidget("widget")[0]); +}); + +})(jQuery); diff --git a/tests/visual/accordion/accordion_option_fillSpace_true.html b/tests/visual/accordion/accordion_option_fillSpace_true.html index d03420523..5bcee045b 100644 --- a/tests/visual/accordion/accordion_option_fillSpace_true.html +++ b/tests/visual/accordion/accordion_option_fillSpace_true.html @@ -1,51 +1,51 @@ - - - - Accordion Visual Test : Accordion option autoHeight true - - - - - - - - - - -
-
-

Accordion Header 1

-
- Accordion Content 1 -
-

Accordion Header 2

-
- Accordion Content 2 -

paragraph

-

paragraph

-

paragraph

-

paragraph

-

paragraph

-

paragraph

-

paragraph

-
-

Accordion Header 3

-
- Accordion Content 3 -
    -
  • list item
  • -
  • list item
  • -
  • list item
  • -
-
-
-
- - - + + + + Accordion Visual Test : Accordion option autoHeight true + + + + + + + + + + +
+
+

Accordion Header 1

+
+ Accordion Content 1 +
+

Accordion Header 2

+
+ Accordion Content 2 +

paragraph

+

paragraph

+

paragraph

+

paragraph

+

paragraph

+

paragraph

+

paragraph

+
+

Accordion Header 3

+
+ Accordion Content 3 +
    +
  • list item
  • +
  • list item
  • +
  • list item
  • +
+
+
+
+ + + diff --git a/tests/visual/accordion/accordion_ticket_4322.html b/tests/visual/accordion/accordion_ticket_4322.html index 9d82f61ae..1bfe2a05d 100644 --- a/tests/visual/accordion/accordion_ticket_4322.html +++ b/tests/visual/accordion/accordion_ticket_4322.html @@ -1,74 +1,74 @@ - - - - Accordion Visual Test : Accordion ticket #4322 - - - - - - - - - - - -

#4322 - Accordion going smaller and smaller in IE 6

- -
-

Section 1

-
- -

- Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer - ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit - amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut - odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate. -

-
-

Section 2

-
-

- Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet - purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor - velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In - suscipit faucibus urna. -

-
-
- - content below - -
-

Section 1

-
- -

- Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer - ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit - amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut - odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate. -

-
-

Section 2

-
-

- Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet - purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor - velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In - suscipit faucibus urna. -

-
-
- - content below - - - - + + + + Accordion Visual Test : Accordion ticket #4322 + + + + + + + + + + + +

#4322 - Accordion going smaller and smaller in IE 6

+ +
+

Section 1

+
+ +

+ Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer + ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit + amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut + odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate. +

+
+

Section 2

+
+

+ Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet + purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor + velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In + suscipit faucibus urna. +

+
+
+ + content below + +
+

Section 1

+
+ +

+ Mauris mauris ante, blandit et, ultrices a, suscipit eget, quam. Integer + ut neque. Vivamus nisi metus, molestie vel, gravida in, condimentum sit + amet, nunc. Nam a nibh. Donec suscipit eros. Nam mi. Proin viverra leo ut + odio. Curabitur malesuada. Vestibulum a velit eu ante scelerisque vulputate. +

+
+

Section 2

+
+

+ Sed non urna. Donec et ante. Phasellus eu ligula. Vestibulum sit amet + purus. Vivamus hendrerit, dolor at aliquet laoreet, mauris turpis porttitor + velit, faucibus interdum tellus libero ac justo. Vivamus non quam. In + suscipit faucibus urna. +

+
+
+ + content below + + + + diff --git a/tests/visual/accordion/accordion_ticket_4444.html b/tests/visual/accordion/accordion_ticket_4444.html index 121bf0cef..4cce368d3 100644 --- a/tests/visual/accordion/accordion_ticket_4444.html +++ b/tests/visual/accordion/accordion_ticket_4444.html @@ -1,50 +1,50 @@ - - - - Accordion Visual Test : Accordion ticket #4444 - - - - - - - - - - -

#4444 - Accordion Content disappears with autoHeight set to false in IE 6

- -
-

Section 1

-
- Accordion Content 1
- Link Test #1 -
- -

Section 2

- -

Section 3

-
-

Accordion Content 3

-
    -
  • List item
  • -
  • List item
  • -
  • List item
  • -
  • List item
  • -
  • List item
  • -
  • List item
  • -
  • List item
  • -
-
-
- - - + + + + Accordion Visual Test : Accordion ticket #4444 + + + + + + + + + + +

#4444 - Accordion Content disappears with autoHeight set to false in IE 6

+ +
+

Section 1

+
+ Accordion Content 1
+ Link Test #1 +
+ +

Section 2

+ +

Section 3

+
+

Accordion Content 3

+
    +
  • List item
  • +
  • List item
  • +
  • List item
  • +
  • List item
  • +
  • List item
  • +
  • List item
  • +
  • List item
  • +
+
+
+ + + diff --git a/tests/visual/button/default.html b/tests/visual/button/default.html new file mode 100644 index 000000000..4eb457fc4 --- /dev/null +++ b/tests/visual/button/default.html @@ -0,0 +1,137 @@ + + + + Button Visual push: Default + + + + + + + + + + + + +
+
+ No icon + + +
+
+
+ With icon + + + + +
+
+ +
+ +
+ +
+ + + +
+
+
+ + + +
+
+
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + +
+ + +
+
+ + + + + diff --git a/tests/visual/dialog/dialog_option_modal_false.html b/tests/visual/dialog/dialog_option_modal_false.html index 2a77881d9..45dad2fc3 100644 --- a/tests/visual/dialog/dialog_option_modal_false.html +++ b/tests/visual/dialog/dialog_option_modal_false.html @@ -21,7 +21,7 @@ - +

Dialog Content

diff --git a/tests/visual/dialog/dialog_option_modal_true.html b/tests/visual/dialog/dialog_option_modal_true.html index 4ee3ded23..b6e10e0d0 100644 --- a/tests/visual/dialog/dialog_option_modal_true.html +++ b/tests/visual/dialog/dialog_option_modal_true.html @@ -21,7 +21,7 @@ - +

Dialog Content

diff --git a/tests/visual/index.html b/tests/visual/index.html index 8f322f627..465dbc021 100644 --- a/tests/visual/index.html +++ b/tests/visual/index.html @@ -25,6 +25,7 @@

Widgets

  • Accordion
  • +
  • Button
  • Datepicker
  • Dialog
  • Progressbar
  • diff --git a/tests/visual/sortable/sortable_ticket_4551.html b/tests/visual/sortable/sortable_ticket_4551.html index 8188d33f8..73f5791d6 100644 --- a/tests/visual/sortable/sortable_ticket_4551.html +++ b/tests/visual/sortable/sortable_ticket_4551.html @@ -1,53 +1,53 @@ - - - - Sortable Visual Test : Sortable ticket #4551 - - - - - - - - - - - - -

    #4551 - Sortable connectWith fails if item is floated

    - -
    -
    1
    -
    2
    -
    3
    -
    4
    -
    5
    -
    6
    -
    7
    -
    8
    -
    9
    -
    10
    -
    11
    -
    12
    -
    - -
    -
    - -
    -
    12
    -
    14
    -
    - - - + + + + Sortable Visual Test : Sortable ticket #4551 + + + + + + + + + + + + +

    #4551 - Sortable connectWith fails if item is floated

    + +
    +
    1
    +
    2
    +
    3
    +
    4
    +
    5
    +
    6
    +
    7
    +
    8
    +
    9
    +
    10
    +
    11
    +
    12
    +
    + +
    +
    + +
    +
    12
    +
    14
    +
    + + + -- cgit v1.2.3