Skip to content

Commit

Permalink
More test directory cleanup:
Browse files Browse the repository at this point in the history
- Move helpers.js to tests/functional since it's currently only being used there.
  It could be used by the unit tests in the future though.
- Move boilerplate.js and boilerplateOnload.js to tests/functional
- Moving place-clip.html and place-margin.html to tests/functional, although they
  might eventually end up as unit tests.
- Remove module.js and runTests.html.
- Move video.swf to tests/resources, refs ibm-js/deliteful#439

Refs ibm-js/deliteful#439.
Refs #357.
  • Loading branch information
wkeese committed Jan 8, 2015
1 parent 09f27ca commit 62608bb
Show file tree
Hide file tree
Showing 19 changed files with 18 additions and 41 deletions.
4 changes: 2 additions & 2 deletions tests/functional/BackgroundIframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<title>Dojo Toolkit - Background Iframe test</title>

<script type="text/javascript" src="../boilerplate.js"></script>
<script type="text/javascript" src="boilerplate.js"></script>

<script type="text/javascript">
require([
Expand Down Expand Up @@ -129,7 +129,7 @@
<div id="two_flash">Mouse over this to see a different tooltip</div>
</td>
<td>
<embed id="flash" src="../video.swf" width="400" height="300"/>
<embed id="flash" src="resources/video.swf" width="400" height="300"/>
</td>
</tr>
</table>
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/DialogUnderlay.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<title>DialogUnderlay Test</title>
<script type="text/javascript" src="../boilerplate.js"></script>
<script type="text/javascript" src="boilerplate.js"></script>
<script language="JavaScript" type="text/javascript">
var ready = false; // set to true when the test page is ready

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/DojoParser.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
h3 {color : black;}
</style>
<link rel="stylesheet" href="../../../dijit/themes/dijit.css"/>
<script src="../boilerplate.js"></script>
<script src="boilerplate.js"></script>
<script type="text/javascript">
readyDijit = false, readyDelite = false, dojoWidgetsLength = 0, dijitRegistry = null; // set readies to true when the test page is ready
require(["delite/Widget", "delite/samples/ExampleWidget", "delite/register", "dojo/domReady!"],
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/HasDropDown.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
color: white;
}
</style>
<script type="text/javascript" src="../boilerplate.js"></script>
<script type="text/javascript" src="boilerplate.js"></script>
<script language="JavaScript" type="text/javascript">
var ready = false; // set to true when the test page is ready

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/KeyNavTests.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<title>KeyNav Tests</title>
<script type="text/javascript" src="../boilerplate.js"></script>
<script type="text/javascript" src="boilerplate.js"></script>
<script language="JavaScript" type="text/javascript">
var ready = false; // set to true when the test page is ready
require([
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/TabIndex.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
display: block;
}
</style>
<script type="text/javascript" src="../boilerplate.js"></script>
<script type="text/javascript" src="boilerplate.js"></script>
<script language="JavaScript" type="text/javascript">
var ready = false; // set to true when the test page is ready
var timeoutInterval = 1000;
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/Viewport.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<title>Viewport Test</title>
<script type="text/javascript" src="../boilerplate.js"></script>
<script type="text/javascript" src="boilerplate.js"></script>
<script language="JavaScript" type="text/javascript">
var ready = false; // set to true when the test page is ready
require([
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/Widget.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<title>Widget Functional Tests</title>
<script type="text/javascript" src="../boilerplate.js"></script>
<script type="text/javascript" src="boilerplate.js"></script>
<style>
my-content-pane {
display: block;
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/activationTracker.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<head>
<title>delite/activationTracker automated test</title>

<script type="text/javascript" src="../boilerplate.js"></script>
<script type="text/javascript" src="boilerplate.js"></script>

<style>
form {
Expand Down
4 changes: 2 additions & 2 deletions tests/boilerplate.js → tests/functional/boilerplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ for (i = 0; (script = scripts[i]); i++) {
// Setup configuration options for the loader
/* global require:true */
require = {
baseUrl: testDir + "../../",
baseUrl: testDir + "../../..",
packages: [
// TODO: when all tests converted from doh to intern, remove entry for doh
{name: "doh", location: "util/doh"}
Expand All @@ -79,7 +79,7 @@ for (var key in overrides) {
}

// Output the boilerplate text to load the loader.
document.write("<script type='text/javascript' src='" + testDir + "../../requirejs/require.js'></script>");
document.write("<script type='text/javascript' src='" + testDir + "../../../requirejs/require.js'></script>");

// On IE9 the following inlined script will run before dojo has finished loading, leading to an error because require()
// isn't defined yet. Workaround it by putting the code in a separate file.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/helpers.js → tests/functional/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ define([
"lie/dist/lie",
"dojo/dom-attr", "dojo/dom-class", "dojo/dom-geometry", "dojo/dom-style",
"dojo/_base/kernel", "dojo/on", "dojo/query",
"delite/a11y" // isTabNavigable, _isElementShown
"../../a11y" // isTabNavigable, _isElementShown
], function (Promise, domAttr, domClass, domGeometry, domStyle, kernel, on, query, a11y) {


Expand Down
2 changes: 1 addition & 1 deletion tests/place-clip.html → tests/functional/place-clip.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
require([
"doh/runner",
"dojo/dom", "dojo/dom-geometry", "dojo/window",
"delite/place", "dojo/parser", "requirejs-domready/domReady!"
"../../place", "dojo/parser", "requirejs-domready/domReady!"
], function (doh, dom, domGeometry, winUtils, place, parser) {

parser.parse();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
require([
"doh/runner",
"dojo/dom", "dojo/dom-geometry", "dojo/window",
"delite/place", "requirejs-domready/domReady!"
"../../place", "requirejs-domready/domReady!"
], function (doh, dom, domGeometry, winUtils, place) {

// The around nodes
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
<title>popup functional test</title>

<script src="../boilerplate.js"></script>
<script src="boilerplate.js"></script>

<style type="text/css">
body {
Expand Down Expand Up @@ -56,7 +56,7 @@

require([
"delite/popup", "delite/register", "delite/Widget",
"delite/tests/helpers", "delite/activationTracker", "requirejs-domready/domReady!"
"delite/tests/functional/helpers", "delite/activationTracker", "requirejs-domready/domReady!"
], function (popupUtil, register, Widget, helpers) {
tabOrder = helpers.tabOrder; // used by tests/functional/popup.js (TODO: stop using?)
glblPopupUtil = popupUtil; // used by tests/functional/popup.js
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/popupClickBehind.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>popup "click behind" functional test</title>

<script src="../boilerplate.js"></script>
<script src="boilerplate.js"></script>

<style type="text/css">
div {
Expand Down
File renamed without changes.
13 changes: 0 additions & 13 deletions tests/module.js

This file was deleted.

10 changes: 0 additions & 10 deletions tests/runTests.html

This file was deleted.

0 comments on commit 62608bb

Please sign in to comment.