diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2023-03-30 09:56:33 +0200 |
---|---|---|
committer | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2023-05-10 10:53:57 +0200 |
commit | 546214e86956804a1b02da173a4c6c5ddea11454 (patch) | |
tree | a686011bcdbb11a42ed2a2b0c7b7e961b0e22593 /tests | |
parent | f68d655aff81273d431d5e58bc8af775fc9bd231 (diff) | |
download | jquery-ui-546214e86956804a1b02da173a4c6c5ddea11454.tar.gz jquery-ui-546214e86956804a1b02da173a4c6c5ddea11454.zip |
Build: Fork vendors to remove QUnit deprecated API usage
Changes:
* add `tests/lib/vendor/**/*` to `.eslintignore`
* move `qunit-composite` to `tests/lib` so that we can modify it
* move `qunit-assert-classes` to `tests/lib` so that we can modify it
* move `qunit-assert-close` to `tests/lib` so that we can modify it
* replace `assert.push` with `assert.pushResult`
* remove usage of `QUnit.extend`
Closes gh-2157
Diffstat (limited to 'tests')
36 files changed, 920 insertions, 69 deletions
diff --git a/tests/lib/bootstrap.js b/tests/lib/bootstrap.js index 277fecca7..a5bb1711b 100644 --- a/tests/lib/bootstrap.js +++ b/tests/lib/bootstrap.js @@ -12,8 +12,8 @@ requirejs.config( { "jquery-simulate": "../../../external/jquery-simulate/jquery.simulate", "lib": "../../lib", "phantom-bridge": "../../../node_modules/grunt-contrib-qunit/phantomjs/bridge", - "qunit-assert-classes": "../../../external/qunit-assert-classes/qunit-assert-classes", - "qunit-assert-close": "../../../external/qunit-assert-close/qunit-assert-close", + "qunit-assert-classes": "../../lib/vendor/qunit-assert-classes/qunit-assert-classes", + "qunit-assert-close": "../../lib/vendor/qunit-assert-close/qunit-assert-close", "qunit": "../../../external/qunit/qunit", "testswarm": "https://swarm.jquery.org/js/inject.js?" + ( new Date() ).getTime(), "ui": "../../../ui" diff --git a/tests/lib/qunit-assert-domequal.js b/tests/lib/qunit-assert-domequal.js index bdad9844c..066eb203b 100644 --- a/tests/lib/qunit-assert-domequal.js +++ b/tests/lib/qunit-assert-domequal.js @@ -15,11 +15,16 @@ var domEqual = QUnit.assert.domEqual = function( selector, modifier, message ) { var assert = this; // Get current state prior to modifier - var expected = extract( selector, message ); + var expected = extract( assert, selector, message ); function done() { - var actual = extract( selector, message ); - assert.push( QUnit.equiv( actual, expected ), actual, expected, message ); + var actual = extract( assert, selector, message ); + assert.pushResult( { + result: QUnit.equiv( actual, expected ), + actual: actual, + expected: expected, + message: message + } ); } // Run modifier (async or sync), then compare state via done() @@ -116,11 +121,15 @@ function jQueryVersionSince( version ) { return compareVersions( $.fn.jquery, version ) >= 0; } -function extract( selector, message ) { +function extract( assert, selector, message ) { var elem = $( selector ); if ( !elem.length ) { - QUnit.push( false, null, null, - "domEqual failed, can't extract " + selector + ", message was: " + message ); + assert.pushResult( { + result: false, + actual: null, + expected: null, + message: "domEqual failed, can't extract " + selector + ", message was: " + message + } ); return; } @@ -190,7 +199,7 @@ function extract( selector, message ) { children = elem.children(); if ( children.length ) { result.children = elem.children().map( function() { - return extract( $( this ) ); + return extract( assert, $( this ) ); } ).get(); } else { result.text = elem.text(); diff --git a/tests/lib/vendor/qunit-assert-classes/LICENSE.txt b/tests/lib/vendor/qunit-assert-classes/LICENSE.txt new file mode 100644 index 000000000..938db0368 --- /dev/null +++ b/tests/lib/vendor/qunit-assert-classes/LICENSE.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Alexander Schmitz + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/tests/lib/vendor/qunit-assert-classes/qunit-assert-classes.js b/tests/lib/vendor/qunit-assert-classes/qunit-assert-classes.js new file mode 100644 index 000000000..3461f1d90 --- /dev/null +++ b/tests/lib/vendor/qunit-assert-classes/qunit-assert-classes.js @@ -0,0 +1,245 @@ +// With custom modifications - all are marked with +// a "Custom modification" comment. +( function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define( [ + "qunit" + ], factory ); + } else { + + // Browser globals + factory( QUnit ); + } +}( function( QUnit ) { + + function inArray( haystack, needle ) { + for ( var i = 0; i < haystack.length; i++ ) { + if ( + ( needle instanceof RegExp && needle.test( haystack[ i ] ) )|| + ( typeof needle === "string" && haystack[ i ] === needle ) + ) { + return true; + } + } + return false; + } + + function check( element, search ) { + var i, classAttribute, elementClassArray, + missing = [], + found = []; + + if ( element.jquery && element.length !== 1 ) { + throw new Error( "Class checks can only be performed on a single element on a collection" ); + } + + element = element.jquery ? element[ 0 ] : element; + classAttribute = element.getAttribute( "class" ); + + if ( classAttribute ) { + elementClassArray = splitClasses( classAttribute ); + if ( search instanceof RegExp ) { + if ( inArray( elementClassArray, search ) ) { + found.push( search ); + } else { + missing.push( search ); + } + } else { + for( i = 0; i < search.length; i++ ) { + if ( !inArray( elementClassArray, search[ i ] ) ) { + missing.push( search[ i ] ); + } else { + found.push( search[ i ] ); + } + } + } + } else { + missing = search; + } + + return { + missing: missing, + found: found, + element: element, + classAttribute: classAttribute + }; + } + + function splitClasses( classes ) { + return classes.match( /\S+/g ) || []; + } + + function pluralize( message, classes ) { + return message + ( classes.length > 1 ? "es" : "" ); + } + + // Custom modification: removing QUnit.extend + var key; + var qunitAssertExtensions = { + hasClasses: function( element, classes, message ) { + var classArray = splitClasses( classes ), + results = check( element, classArray ); + + message = message || pluralize( "Element must have class", classArray ); + + // Custom modification: push -> pushResult + this.pushResult( { + result: !results.missing.length, + actual: results.found.join( " " ), + expected: classes, + message: message + } ); + }, + lacksClasses: function( element, classes, message ) { + var classArray = splitClasses( classes ), + results = check( element, classArray ); + + message = message || pluralize( "Element must not have class", classArray ); + + // Custom modification: push -> pushResult + this.pushResult( { + result: !results.found.length, + actual: results.found.join( " " ), + expected: classes, + message: message + } ); + }, + hasClassesStrict: function( element, classes, message ) { + var result, + classArray = splitClasses( classes ), + results = check( element, classArray ); + + message = message || pluralize( "Element must only have class", classArray ); + + result = !results.missing.length && results.element.getAttribute( "class" ) && + splitClasses( results.element.getAttribute( "class" ) ).length === + results.found.length; + + // Custom modification: push -> pushResult + this.pushResult( { + result: result, + actual: results.found.join( " " ), + expected: classes, + message: message + } ); + }, + hasClassRegex: function( element, regex, message ) { + var results = check( element, regex ); + + message = message || "Element must have class matching " + regex; + + // Custom modification: push -> pushResult + this.pushResult( { + result: !!results.found.length, + actual: results.found.join( " " ), + expected: regex, + message: message + } ); + }, + lacksClassRegex: function( element, regex, message ) { + var results = check( element, regex ); + + message = message || "Element must not have class matching " + regex; + + // Custom modification: push -> pushResult + this.pushResult( { + result: results.missing.length, + actual: results.missing.join( " " ), + expected: regex, + message: message + } ); + }, + hasClassStart: function( element, partialClass, message ) { + var results = check( element, new RegExp( "^" + partialClass ) ); + + message = message || "Element must have class starting with " + partialClass; + + // Custom modification: push -> pushResult + this.pushResult( { + result: results.found.length, + actual: results.found.join( " " ), + expected: partialClass, + message: message + } ); + }, + lacksClassStart: function( element, partialClass, message ) { + var results = check( element, new RegExp( "^" + partialClass ) ); + + message = message || "Element must not have class starting with " + partialClass; + + // Custom modification: push -> pushResult + this.pushResult( { + result: results.missing.length, + actual: results.missing.join( " " ), + expected: partialClass, + message: message + } ); + }, + hasClassPartial: function( element, partialClass, message ) { + var results = check( element, new RegExp( partialClass ) ); + + message = message || "Element must have class containing '" + partialClass + "'"; + + // Custom modification: push -> pushResult + this.pushResult( { + result: results.found.length, + actual: results.found.join( " " ), + expected: partialClass, + message: message + } ); + }, + lacksClassPartial: function( element, partialClass, message ) { + var results = check( element, new RegExp( partialClass ) ); + + message = message || "Element must not have class containing '" + partialClass + "'"; + + // Custom modification: push -> pushResult + this.pushResult( { + result: results.missing.length, + actual: results.missing.join( " " ), + expected: partialClass, + message: message + } ); + }, + lacksAllClasses: function( element, message ) { + element = element.jquery ? element[ 0 ] : element; + + var classAttribute = element.getAttribute( "class" ) || "", + classes = splitClasses( classAttribute ); + + message = message || "Element must not have any classes"; + + // Custom modification: push -> pushResult + this.pushResult( { + result: !classes.length, + actual: !classes.length, + expected: true, + message: message + } ); + }, + hasSomeClass: function( element, message ) { + element = element.jquery ? element[ 0 ] : element; + + var classAttribute = element.getAttribute( "class" ) || "", + classes = splitClasses( classAttribute ); + + message = message || "Element must have a class"; + + // Custom modification: push -> pushResult + this.pushResult( { + result: classes.length, + actual: classes.length, + expected: true, + message: message + } ); + } + }; + + // Custom modification: removing QUnit.extend + for ( key in qunitAssertExtensions ) { + QUnit.assert[ key ] = qunitAssertExtensions[ key ]; + } + +} ) ); diff --git a/tests/lib/vendor/qunit-assert-close/MIT-LICENSE.txt b/tests/lib/vendor/qunit-assert-close/MIT-LICENSE.txt new file mode 100644 index 000000000..aed5dc97e --- /dev/null +++ b/tests/lib/vendor/qunit-assert-close/MIT-LICENSE.txt @@ -0,0 +1,21 @@ +Copyright jQuery Foundation and other contributors +http://jquery.com/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/tests/lib/vendor/qunit-assert-close/qunit-assert-close.js b/tests/lib/vendor/qunit-assert-close/qunit-assert-close.js new file mode 100644 index 000000000..69d405205 --- /dev/null +++ b/tests/lib/vendor/qunit-assert-close/qunit-assert-close.js @@ -0,0 +1,209 @@ +// With custom modifications - all are marked with +// a "Custom modification" comment. +(function(factory) { + + // NOTE: + // All techniques except for the "browser globals" fallback will extend the + // provided QUnit object but return the isolated API methods + + // For AMD: Register as an anonymous AMD module with a named dependency on "qunit". + if (typeof define === "function" && define.amd) { + define(["qunit"], factory); + } + // For Node.js + else if (typeof module !== "undefined" && module && module.exports && typeof require === "function") { + module.exports = factory(require("qunitjs")); + } + + // Custom modification: remove the non-Node.js CommonJS part due to its + // usage of QUnit.extend. + // + // For browser globals + else { + factory(QUnit); + } + +}(function(QUnit) { + + /** + * Find an appropriate `Assert` context to `push` results to. + * @param * context - An unknown context, possibly `Assert`, `Test`, or neither + * @private + */ + function _getPushContext(context) { + var pushContext; + + if (context && typeof context.push === "function") { + // `context` is an `Assert` context + pushContext = context; + } + else if (context && context.assert && typeof context.assert.push === "function") { + // `context` is a `Test` context + pushContext = context.assert; + } + else if ( + QUnit && QUnit.config && QUnit.config.current && QUnit.config.current.assert && + typeof QUnit.config.current.assert.push === "function" + ) { + // `context` is an unknown context but we can find the `Assert` context via QUnit + pushContext = QUnit.config.current.assert; + } + else if (QUnit && typeof QUnit.push === "function") { + pushContext = QUnit.push; + } + else { + throw new Error("Could not find the QUnit `Assert` context to push results"); + } + + return pushContext; + } + + /** + * Checks that the first two arguments are equal, or are numbers close enough to be considered equal + * based on a specified maximum allowable difference. + * + * @example assert.close(3.141, Math.PI, 0.001); + * + * @param Number actual + * @param Number expected + * @param Number maxDifference (the maximum inclusive difference allowed between the actual and expected numbers) + * @param String message (optional) + */ + function close(actual, expected, maxDifference, message) { + var actualDiff = (actual === expected) ? 0 : Math.abs(actual - expected), + result = actualDiff <= maxDifference, + pushContext = _getPushContext(this); + + message = message || (actual + " should be within " + maxDifference + " (inclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff)); + + // Custom modification: push -> pushResult + pushContext.pushResult({ + result: result, + actual: actual, + expected: expected, + message: message + }); + } + + + /** + * Checks that the first two arguments are equal, or are numbers close enough to be considered equal + * based on a specified maximum allowable difference percentage. + * + * @example assert.close.percent(155, 150, 3.4); // Difference is ~3.33% + * + * @param Number actual + * @param Number expected + * @param Number maxPercentDifference (the maximum inclusive difference percentage allowed between the actual and expected numbers) + * @param String message (optional) + */ + close.percent = function closePercent(actual, expected, maxPercentDifference, message) { + var actualDiff, result, + pushContext = _getPushContext(this); + + if (actual === expected) { + actualDiff = 0; + result = actualDiff <= maxPercentDifference; + } + else if (actual !== 0 && expected !== 0 && expected !== Infinity && expected !== -Infinity) { + actualDiff = Math.abs(100 * (actual - expected) / expected); + result = actualDiff <= maxPercentDifference; + } + else { + // Dividing by zero (0)! Should return `false` unless the max percentage was `Infinity` + actualDiff = Infinity; + result = maxPercentDifference === Infinity; + } + message = message || (actual + " should be within " + maxPercentDifference + "% (inclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff + "%")); + + // Custom modification: push -> pushResult + pushContext.pushResult({ + result: result, + actual: actual, + expected: expected, + message: message + }); + }; + + + /** + * Checks that the first two arguments are numbers with differences greater than the specified + * minimum difference. + * + * @example assert.notClose(3.1, Math.PI, 0.001); + * + * @param Number actual + * @param Number expected + * @param Number minDifference (the minimum exclusive difference allowed between the actual and expected numbers) + * @param String message (optional) + */ + function notClose(actual, expected, minDifference, message) { + var actualDiff = Math.abs(actual - expected), + result = actualDiff > minDifference, + pushContext = _getPushContext(this); + + message = message || (actual + " should not be within " + minDifference + " (exclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff)); + + // Custom modification: push -> pushResult + pushContext.pushResult({ + result: result, + actual: actual, + expected: expected, + message: message + }); + } + + + /** + * Checks that the first two arguments are numbers with differences greater than the specified + * minimum difference percentage. + * + * @example assert.notClose.percent(156, 150, 3.5); // Difference is 4.0% + * + * @param Number actual + * @param Number expected + * @param Number minPercentDifference (the minimum exclusive difference percentage allowed between the actual and expected numbers) + * @param String message (optional) + */ + notClose.percent = function notClosePercent(actual, expected, minPercentDifference, message) { + var actualDiff, result, + pushContext = _getPushContext(this); + + if (actual === expected) { + actualDiff = 0; + result = actualDiff > minPercentDifference; + } + else if (actual !== 0 && expected !== 0 && expected !== Infinity && expected !== -Infinity) { + actualDiff = Math.abs(100 * (actual - expected) / expected); + result = actualDiff > minPercentDifference; + } + else { + // Dividing by zero (0)! Should only return `true` if the min percentage was `Infinity` + actualDiff = Infinity; + result = minPercentDifference !== Infinity; + } + message = message || (actual + " should not be within " + minPercentDifference + "% (exclusive) of " + expected + (result ? "" : ". Actual: " + actualDiff + "%")); + + // Custom modification: push -> pushResult + pushContext.pushResult({ + result: result, + actual: actual, + expected: expected, + message: message + }); + }; + + var key; + var api = { + close: close, + notClose: notClose, + closePercent: close.percent, + notClosePercent: notClose.percent + }; + + for (key in api) { + QUnit.assert[key] = api[key]; + } + + return api; +})); diff --git a/tests/lib/vendor/qunit-composite/LICENSE.txt b/tests/lib/vendor/qunit-composite/LICENSE.txt new file mode 100644 index 000000000..155d8e869 --- /dev/null +++ b/tests/lib/vendor/qunit-composite/LICENSE.txt @@ -0,0 +1,36 @@ +Copyright jQuery Foundation and other contributors, https://jquery.org/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/JamesMGreene/qunit-composite + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +All files located in the node_modules directory are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. diff --git a/tests/lib/vendor/qunit-composite/qunit-composite.css b/tests/lib/vendor/qunit-composite/qunit-composite.css new file mode 100644 index 000000000..a5d06ce77 --- /dev/null +++ b/tests/lib/vendor/qunit-composite/qunit-composite.css @@ -0,0 +1,47 @@ +.qunit-composite-suite { + position: fixed; + bottom: 0; + left: 0; + + margin: 0; + padding: 0; + border-width: 1px 0 0; + height: 45%; + width: 100%; + + background: #fff; +} + +#qunit-testsuites { + margin: 0; + padding: 0.5em 1.0em; + font-family: "Helvetica Neue Light","HelveticaNeue-Light","Helvetica Neue",Calibri,Helvetica,Arial,sans-serif; + font-size: small; + background-color: #d2e0e6; + border-bottom: 1px solid #fff; +} + +#qunit-testsuites a { + color: #00c; + text-decoration: none; +} + +#qunit-testsuites a:hover { + text-decoration: underline; +} + +#qunit-testsuites > li { + display: inline-block; +} + +#qunit-testsuites > li:first-child::before { + content: "Suites: "; +} + +#qunit-testsuites > li + li::before { + content: "|\a0"; +} + +#qunit-testsuites > li::after { + content: "\a0"; +} diff --git a/tests/lib/vendor/qunit-composite/qunit-composite.js b/tests/lib/vendor/qunit-composite/qunit-composite.js new file mode 100644 index 000000000..042d024b4 --- /dev/null +++ b/tests/lib/vendor/qunit-composite/qunit-composite.js @@ -0,0 +1,236 @@ +/** + * QUnit Composite + * + * With custom modifications - all are marked with + * a "Custom modification" comment. + * + * https://github.com/JamesMGreene/qunit-composite + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * https://jquery.org/license/ + */ +(function( factory ) { + if ( typeof define === "function" && define.amd ) { + define( [ "qunit" ], factory ); + } else { + factory( QUnit ); + } +}(function( QUnit ) { +var iframe, hasBound, resumeTests, suiteAssert, + modules = 1, + executingComposite = false; + +function hasClass( elem, name ) { + return ( " " + elem.className + " " ).indexOf( " " + name + " " ) > -1; +} + +function addClass( elem, name ) { + if ( !hasClass( elem, name ) ) { + elem.className += ( elem.className ? " " : "" ) + name; + } +} + +function addEvent( elem, type, fn ) { + if ( elem.addEventListener ) { + // Standards-based browsers + elem.addEventListener( type, fn, false ); + } else if ( elem.attachEvent ) { + // support: IE <9 + elem.attachEvent( "on" + type, fn ); + } +} + +function runSuite( suite ) { + var path; + + if ( QUnit.is( "object", suite ) ) { + path = suite.path; + suite = suite.name; + } else { + path = suite; + } + + QUnit.test( suite, function( assert ) { + resumeTests = assert.async(); + suiteAssert = assert; + iframe.setAttribute( "src", path ); + // QUnit.start is called from the child iframe's QUnit.done hook. + }); +} + +function initIframe() { + var iframeWin, + body = document.body; + + function onIframeLoad() { + var moduleName, testName, + count = 0; + + if ( !iframe.src ) { + return; + } + + // Deal with QUnit being loaded asynchronously via AMD + if ( !iframeWin.QUnit && iframeWin.define && iframeWin.define.amd ) { + return iframeWin.require( [ "qunit" ], onIframeLoad ); + } + + iframeWin.QUnit.moduleStart(function( data ) { + // Capture module name for messages + moduleName = data.name; + }); + + iframeWin.QUnit.testStart(function( data ) { + // Capture test name for messages + testName = data.name; + }); + iframeWin.QUnit.testDone(function() { + testName = undefined; + }); + + iframeWin.QUnit.log(function( data ) { + if (testName === undefined) { + return; + } + // Pass all test details through to the main page + var message = ( moduleName ? moduleName + ": " : "" ) + testName + ": " + ( data.message || ( data.result ? "okay" : "failed" ) ); + suiteAssert.expect( ++count ); + suiteAssert.pushResult( { + result: data.result, + actual: data.actual, + expected: data.expected, + message: message + } ); + }); + + // Continue the outer test when the iframe's test is done + iframeWin.QUnit.done(function() { + resumeTests(); + }); + } + + iframe = document.createElement( "iframe" ); + iframe.className = "qunit-composite-suite"; + body.appendChild( iframe ); + + addEvent( iframe, "load", onIframeLoad ); + + iframeWin = iframe.contentWindow; +} + +function appendSuitesToHeader( suites ) { + var i, suitesLen, suite, path, name, suitesEl, testResultEl, + newSuiteListItemEl, newSuiteLinkEl; + + suitesEl = document.getElementById("qunit-testsuites"); + + if (!suitesEl) { + testResultEl = document.getElementById("qunit-testresult"); + + if (!testResultEl) { + // QUnit has not been set up yet. Defer until QUnit is ready. + QUnit.begin(function () { + appendSuitesToHeader(suites); + }); + return; + } + + suitesEl = document.createElement("ul"); + suitesEl.id = "qunit-testsuites"; + testResultEl.parentNode.insertBefore(suitesEl, testResultEl); + } + + for (i = 0, suitesLen = suites.length; i < suitesLen; ++i) { + suite = suites[i]; + newSuiteLinkEl = document.createElement("a"); + newSuiteLinkEl.innerHTML = suite.name || suite; + newSuiteLinkEl.href = suite.path || suite; + + newSuiteListItemEl = document.createElement("li"); + newSuiteListItemEl.appendChild(newSuiteLinkEl); + + suitesEl.appendChild(newSuiteListItemEl); + } +} + +/** + * @param {string} [name] Module name to group these test suites. + * @param {Array} suites List of suites where each suite + * may either be a string (path to the html test page), + * or an object with a path and name property. + */ +QUnit.testSuites = function( name, suites ) { + var i, suitesLen; + + if ( arguments.length === 1 ) { + suites = name; + name = "Composition #" + modules++; + } + suitesLen = suites.length; + + appendSuitesToHeader(suites); + + if ( !hasBound ) { + hasBound = true; + QUnit.begin( initIframe ); + + // TODO: Would be better to use something like QUnit.once( 'moduleDone' ) + // after the last test suite. + QUnit.moduleDone( function () { + executingComposite = false; + } ); + + QUnit.done(function() { + iframe.style.display = "none"; + }); + } + + QUnit.module( name, { + beforeEach: function () { + executingComposite = true; + } + }); + + for ( i = 0; i < suitesLen; i++ ) { + runSuite( suites[ i ] ); + } +}; + +QUnit.testDone(function( data ) { + if ( !executingComposite ) { + return; + } + + var i, len, + testId = data.testId, + current = document.getElementById( "qunit-test-output-" + testId ), + children = current && current.children, + src = iframe.src; + + if (!(current && children)) { + return; + } + + addEvent( current, "dblclick", function( e ) { + var target = e && e.target ? e.target : window.event.srcElement; + if ( target.nodeName.toLowerCase() === "span" || target.nodeName.toLowerCase() === "b" ) { + target = target.parentNode; + } + if ( window.location && target.nodeName.toLowerCase() === "strong" ) { + window.location = src; + } + }); + + // Undo QUnit's auto-expansion for bad tests + for ( i = 0, len = children.length; i < len; i++ ) { + if ( children[ i ].nodeName.toLowerCase() === "ol" ) { + addClass( children[ i ], "qunit-collapsed" ); + } + } + + // Update Rerun link to point to the standalone test suite page + current.getElementsByTagName( "a" )[ 0 ].href = src; +}); + +})); diff --git a/tests/unit/accordion/all.html b/tests/unit/accordion/all.html index 3c247cdae..71593dd39 100644 --- a/tests/unit/accordion/all.html +++ b/tests/unit/accordion/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/all.html b/tests/unit/all.html index 22f60f7b5..3a39956f0 100644 --- a/tests/unit/all.html +++ b/tests/unit/all.html @@ -7,9 +7,9 @@ <script src="../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../external/qunit/qunit.js"></script> - <script src="../../external/qunit-composite/qunit-composite.js"></script> + <script src="../lib/vendor/qunit-composite/qunit-composite.js"></script> <script> (function() { diff --git a/tests/unit/autocomplete/all.html b/tests/unit/autocomplete/all.html index 4ff90fe3c..94678956a 100644 --- a/tests/unit/autocomplete/all.html +++ b/tests/unit/autocomplete/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/button/all.html b/tests/unit/button/all.html index c370837b8..2d9f4a396 100644 --- a/tests/unit/button/all.html +++ b/tests/unit/button/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/checkboxradio/all.html b/tests/unit/checkboxradio/all.html index 71a65d9ee..68d599942 100644 --- a/tests/unit/checkboxradio/all.html +++ b/tests/unit/checkboxradio/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/controlgroup/all.html b/tests/unit/controlgroup/all.html index 737144acd..8409dc90c 100644 --- a/tests/unit/controlgroup/all.html +++ b/tests/unit/controlgroup/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/core/all.html b/tests/unit/core/all.html index c7834b81a..1fe23e195 100644 --- a/tests/unit/core/all.html +++ b/tests/unit/core/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/core/selector.js b/tests/unit/core/selector.js index 314cfd570..062c7a6cc 100644 --- a/tests/unit/core/selector.js +++ b/tests/unit/core/selector.js @@ -11,23 +11,39 @@ define( [ QUnit.module( "core - selectors", { afterEach: helper.moduleAfterEach } ); QUnit.assert.isFocusable = function( selector, msg ) { - this.push( $( selector ).is( ":focusable" ), null, null, - msg + " - selector " + selector + " is focusable" ); + this.pushResult( { + result: $( selector ).is( ":focusable" ), + actual: null, + expected: null, + message: msg + " - selector " + selector + " is focusable" + } ); }; QUnit.assert.isNotFocusable = function( selector, msg ) { - this.push( $( selector ).length && !$( selector ).is( ":focusable" ), null, null, - msg + " - selector " + selector + " is not focusable" ); + this.pushResult( { + result: $( selector ).length && !$( selector ).is( ":focusable" ), + actual: null, + expected: null, + message: msg + " - selector " + selector + " is not focusable" + } ); }; QUnit.assert.isTabbable = function( selector, msg ) { - this.push( $( selector ).is( ":tabbable" ), null, null, - msg + " - selector " + selector + " is tabbable" ); + this.pushResult( { + result: $( selector ).is( ":tabbable" ), + actual: null, + expected: null, + message: msg + " - selector " + selector + " is tabbable" + } ); }; QUnit.assert.isNotTabbable = function( selector, msg ) { - this.push( $( selector ).length && !$( selector ).is( ":tabbable" ), null, null, - msg + " - selector " + selector + " is not tabbable" ); + this.pushResult( { + result: $( selector ).length && !$( selector ).is( ":tabbable" ), + actual: null, + expected: null, + message: msg + " - selector " + selector + " is not tabbable" + } ); }; QUnit.test( "data", function( assert ) { diff --git a/tests/unit/datepicker/all.html b/tests/unit/datepicker/all.html index d2299a0f5..b3eb6a31a 100644 --- a/tests/unit/datepicker/all.html +++ b/tests/unit/datepicker/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/dialog/all.html b/tests/unit/dialog/all.html index 009b4a38d..059398995 100644 --- a/tests/unit/dialog/all.html +++ b/tests/unit/dialog/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/draggable/all.html b/tests/unit/draggable/all.html index 9bdc0d881..b785b67ea 100644 --- a/tests/unit/draggable/all.html +++ b/tests/unit/draggable/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/droppable/all.html b/tests/unit/droppable/all.html index 4934e13d1..f6be092ed 100644 --- a/tests/unit/droppable/all.html +++ b/tests/unit/droppable/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/effects/all.html b/tests/unit/effects/all.html index b043b6223..0de2b3798 100644 --- a/tests/unit/effects/all.html +++ b/tests/unit/effects/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/effects/core.js b/tests/unit/effects/core.js index 187f5355a..94321e636 100644 --- a/tests/unit/effects/core.js +++ b/tests/unit/effects/core.js @@ -23,11 +23,21 @@ define( [ "use strict"; QUnit.assert.present = function( value, array, message ) { - this.push( jQuery.inArray( value, array ) !== -1, value, array, message ); + this.pushResult( { + result: jQuery.inArray( value, array ) !== -1, + actual: value, + expected: array, + message: message + } ); }; QUnit.assert.notPresent = function( value, array, message ) { - this.push( jQuery.inArray( value, array ) === -1, value, array, message ); + this.pushResult( { + result: jQuery.inArray( value, array ) === -1, + actual: value, + expected: array, + message: message + } ); }; // MinDuration is used for "short" animate tests where we are only concerned about the final diff --git a/tests/unit/form-reset-mixin/all.html b/tests/unit/form-reset-mixin/all.html index 9acf969e3..38eeca95f 100644 --- a/tests/unit/form-reset-mixin/all.html +++ b/tests/unit/form-reset-mixin/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/menu/all.html b/tests/unit/menu/all.html index b8f7b3f37..f01c3ad39 100644 --- a/tests/unit/menu/all.html +++ b/tests/unit/menu/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/position/all.html b/tests/unit/position/all.html index 82e5cd9bc..43ad67386 100644 --- a/tests/unit/position/all.html +++ b/tests/unit/position/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/progressbar/all.html b/tests/unit/progressbar/all.html index b20bdd27e..ba2d79931 100644 --- a/tests/unit/progressbar/all.html +++ b/tests/unit/progressbar/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/resizable/all.html b/tests/unit/resizable/all.html index 486f26696..f219a5967 100644 --- a/tests/unit/resizable/all.html +++ b/tests/unit/resizable/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/selectable/all.html b/tests/unit/selectable/all.html index 6f5cc5760..92dcbc730 100644 --- a/tests/unit/selectable/all.html +++ b/tests/unit/selectable/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/selectmenu/all.html b/tests/unit/selectmenu/all.html index d4e339f96..f9eabaf9a 100644 --- a/tests/unit/selectmenu/all.html +++ b/tests/unit/selectmenu/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/slider/all.html b/tests/unit/slider/all.html index 17d375ab4..aeff8d08d 100644 --- a/tests/unit/slider/all.html +++ b/tests/unit/slider/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/sortable/all.html b/tests/unit/sortable/all.html index cb08860bc..8841e9ccd 100644 --- a/tests/unit/sortable/all.html +++ b/tests/unit/sortable/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/spinner/all.html b/tests/unit/spinner/all.html index 2c64e1dce..b8269074b 100644 --- a/tests/unit/spinner/all.html +++ b/tests/unit/spinner/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/tabs/all.html b/tests/unit/tabs/all.html index 25f7bf3fd..81f54ce75 100644 --- a/tests/unit/tabs/all.html +++ b/tests/unit/tabs/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/tooltip/all.html b/tests/unit/tooltip/all.html index e87a76203..d0470c064 100644 --- a/tests/unit/tooltip/all.html +++ b/tests/unit/tooltip/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> diff --git a/tests/unit/widget/all.html b/tests/unit/widget/all.html index 7ef570bd1..336c8347a 100644 --- a/tests/unit/widget/all.html +++ b/tests/unit/widget/all.html @@ -7,9 +7,9 @@ <script src="../../../external/jquery/jquery.js"></script> <link rel="stylesheet" href="../../../external/qunit/qunit.css"> - <link rel="stylesheet" href="../../../external/qunit-composite/qunit-composite.css"> + <link rel="stylesheet" href="../../lib/vendor/qunit-composite/qunit-composite.css"> <script src="../../../external/qunit/qunit.js"></script> - <script src="../../../external/qunit-composite/qunit-composite.js"></script> + <script src="../../lib/vendor/qunit-composite/qunit-composite.js"></script> <script src="../subsuite.js"></script> <script> |