Skip to content

Commit

Permalink
FLUID-5185: Updated QUnit
Browse files Browse the repository at this point in the history
Updated to QUnit v1.12.0 and QUnit Composite v1.0.1
  • Loading branch information
jobara committed Oct 21, 2013
1 parent 11714d2 commit 73c4c38
Show file tree
Hide file tree
Showing 10 changed files with 288 additions and 215 deletions.
3 changes: 2 additions & 1 deletion ReleaseNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ MIT License:
* jQuery javascript library v1.7.2 http://jquery.com/
* jQuery UI dialog, draggable, mouse, position, slider, and tabs javascript widgets v1.8.18: http://ui.jquery.com/
* jQuery UI tooltip (pre-release from jQuery UI 1.9 branch) https://github.com/jquery/jquery-ui/tree/tooltip
* jQuery QUnit: http://docs.jquery.com/QUnit
* jQuery QUnit v1.12.0 http://qunitjs.com
* jQuery QUnit Composite v1.0.1 https://github.com/jquery/qunit-composite
* jQuery Mockjax: https://github.com/appendto/jquery-mockjax
* jQuery Chili code highlighter v2.2 http://code.google.com/p/jquery-chili-js/
* jQuery UI AriaTabs v12.07.10 https://github.com/fnagel/jQuery-Accessible-RIA/tree/master/Tabs
Expand Down
10 changes: 7 additions & 3 deletions src/tests/all-tests.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<!-- Stupid bloody escaping rules:
find . -name "*-test.html" | awk '{print "\""$1"\","}' -->
<script>
QUnit.testSuites([
QUnit.testSuites("Framework Tests", [
"./framework-tests/core/html/FluidJS-test.html",
"./framework-tests/core/html/FluidJSStandalone-test.html",
"./framework-tests/core/html/keyboard-a11y-test.html",
Expand Down Expand Up @@ -39,8 +39,12 @@
"./framework-tests/preferences/html/Store-test.html",
"./framework-tests/preferences/html/UIEnhancer-test.html",
"./framework-tests/preferences/html/PrefsEditor-test.html",
"./framework-tests/preferences/html/URLUtilities-test.html",
"./test-core/testTests/html/Testing-test.html",
"./framework-tests/preferences/html/URLUtilities-test.html"
]);
QUnit.testSuites("IoC Testing Framework Tests", [
"./test-core/testTests/html/Testing-test.html"
]);
QUnit.testSuites("Component Tests", [
"./component-tests/inlineEdit/html/InlineEdit-test.html",
"./component-tests/pager/html/PagedTable-test.html",
"./component-tests/pager/html/Pager-test.html",
Expand Down
4 changes: 2 additions & 2 deletions src/tests/framework-tests/preferences/all-tests.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Preferences Editor complete tests runner</title>
<title>Preferences Framework complete tests runner</title>

<link rel="stylesheet" href="../../lib/qunit/css/qunit.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../lib/qunit/addons/composite/qunit-composite.css">
Expand All @@ -11,7 +11,7 @@
<!-- Stupid bloody escaping rules:
find . -name "*-test.html" | awk '{print "\""$1"\","}' -->
<script>
QUnit.testSuites([
QUnit.testSuites("Preferences Framework Tests", [
"./html/AuxBuilder-test.html",
"./html/Builder-test.html",
"./html/CSSGenerator-test.html",
Expand Down
2 changes: 0 additions & 2 deletions src/tests/lib/qunit/VERSION

This file was deleted.

32 changes: 24 additions & 8 deletions src/tests/lib/qunit/addons/composite/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Composite - A QUnit addon for running multiple test files
================================
# QUnit Composite [![Build Status](https://travis-ci.org/jquery/qunit-composite.png)](https://travis-ci.org/jquery/qunit-composite) [![NPM version](https://badge.fury.io/js/qunit-composite.png)](http://badge.fury.io/js/qunit-composite)

Composite is a QUnit addon that, when handed an array of files, will
Composite is a QUnit plugin that, when handed an array of files, will
open each of those files inside of an iframe, run the tests, and
display the results as a single suite of QUnit tests.

Expand All @@ -11,16 +10,33 @@ outside the composite runner.
If you want to see what assertion failed in a long list of assertions,
just use the regular "Hide passed tests" checkbox.

### Usage ###
## Usage

Load QUnit itself as usual _plus_ `qunit-composite.css` and `qunit-composite.js`,
then specify the test suites to load using `QUnit.testSuites`:

```js
QUnit.testSuites([
"test-file-1.html",
"test-file-2.html",
"example-test-1.html",
"example-test-2.html",
// optionally provide a name and path
{ name: "Test File 3", path: "test-file-3.html" }
{ name: "Example Test 3", path: "example-test-3.html" }
]);
```
```

Optionally, give the composed module a name (defaults to "Composition #1"):

```
QUnit.testSuites( "Example tests", [
"example-test-1.html",
"example-test-2.html"
]);
```

## Notes
- Although it is possible to do so, we do not recommend mixing QUnit Composite suites (`QUnit.testSuites`) on the same page
as regular tests and modules (`QUnit.test`/`test`, `QUnit.module`/`module`).
- The QUnit Composite plugin can be used for testing suites on the "file://" protocol **unless** any of the referenced suites
are outside of the test page's directory (e.g. `../otherTest.html`) due to web security restrictions. You can work around this
restriction by running them in Google Chrome or [PhantomJS](http://phantomjs.org), _with web security disabled_ &mdash; or,
of course, by not referencing suites outside of the current test page's directory.
34 changes: 0 additions & 34 deletions src/tests/lib/qunit/addons/composite/index.html

This file was deleted.

4 changes: 2 additions & 2 deletions src/tests/lib/qunit/addons/composite/qunit-composite.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
iframe.qunit-subsuite {
.qunit-composite-suite {
position: fixed;
bottom: 0;
left: 0;
Expand All @@ -10,4 +10,4 @@ iframe.qunit-subsuite {
width: 100%;

background: #fff;
}
}
Loading

0 comments on commit 73c4c38

Please sign in to comment.