From 76b5c0a1e4f8817132e8d2b39bb330139566ee35 Mon Sep 17 00:00:00 2001 From: Michael Ridgway Date: Thu, 6 Sep 2012 00:17:59 -0700 Subject: [PATCH 01/17] Changed npm test and travis configuration to use arrow --- .travis.yml | 8 ++++++++ package.json | 4 +++- tests/run.js | 25 ++++++++++++++----------- 3 files changed, 25 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0515ff0b6..68d4d3281 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,14 @@ node_js: - 0.8 - 0.6 - 0.4 +before_script: + - "export DISPLAY=:99.0" + - "sh -e /etc/init.d/xvfb start" + - "wget http://selenium.googlecode.com/files/selenium-server-standalone-2.25.0.jar" + - "java -jar selenium-server-standalone-2.25.0.jar -p 4444 > /dev/null 2>&1 &" + - "cd node_modules/yahoo-arrow; npm install yui; cd ../..;" + - "sleep 5" +script: "./bin/mojito jslint -p && ./tests/run.js test -u --group server --driver nodejs && ./tests/run.js test -u --group client --driver selenium && ./tests/run.js test -f" notifications: email: recipients: diff --git a/package.json b/package.json index 074362b77..686041607 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,8 @@ "npm": ">= 1.0.0" }, "devDependencies": { + "node-static": "~0.6.1", + "yahoo-arrow": "~0.0.58" }, "homepage": "http://developer.yahoo.com/cocktails/mojito/", "repository": { @@ -57,7 +59,7 @@ "bugs": "https://github.com/yahoo/mojito/issues", "scripts": { "start": "./bin/mojito start", - "test": "./bin/mojito jslint -p && ./bin/mojito test" + "test": "./tests/run.js test -u --group server --driver nodejs && ./tests/run.js test -u --group client --driver selenium" }, "yahoo": { "bugzilla": { diff --git a/tests/run.js b/tests/run.js index 91955b560..ed97d8313 100755 --- a/tests/run.js +++ b/tests/run.js @@ -37,7 +37,7 @@ program.parse(process.argv); function test (cmd) { var series = []; - cmd.logLevel = cmd.logLevel || 'ERROR'; + cmd.logLevel = cmd.logLevel || 'WARN'; // Default to all tests if (!cmd.unit && !cmd.func) { cmd.unit = true; @@ -45,10 +45,10 @@ function test (cmd) { } cmd.unitBrowser = cmd.unitBrowser || cmd.browser || 'firefox'; cmd.funcBrowser = cmd.funcBrowser || cmd.browser || 'firefox'; + if (cmd.arrow) { + series.push(startArrowServer); + } if (cmd.unit) { - if (cmd.arrow) { - series.push(startArrowServer); - } if ('phantomjs' !== cmd.unitBrowser) { if (cmd.selenium) { series.push(function (callback) { @@ -91,7 +91,7 @@ function startArrowServer (callback) { process.stdout.write(data); }; console.log("---Starting Arrow Server---"); - var p = runCommand(cwd, "arrow_server", [], function () { + var p = runCommand(cwd, "node", [cwd+"/../node_modules/yahoo-arrow/arrow_server/server.js"], function () { // If this command returns called, then it failed to launch if (timeout) { clearTimeout(timeout); @@ -117,6 +117,7 @@ function runUnitTests (cmd, callback) { runCommand(cwd, "mkdir", [cwd + '/artifacts/arrowreport/'], function () { runCommand(cwd, "mkdir", [arrowReportDir], function () { var commandArgs = [ + cwd + "/../node_modules/yahoo-arrow/index.js", cwd + "/unit/**/*_descriptor.json", "--report=true", "--reportFolder=" + arrowReportDir @@ -132,7 +133,7 @@ function runUnitTests (cmd, callback) { var p = runCommand( cwd + '/unit', - "arrow", + "node", commandArgs, function (code) { callback(code); @@ -150,7 +151,7 @@ function build (cmd, callback) { console.log('---Building Apps---'); runCommand( cwd + '/func/applications/frameworkapp/common', - "mojito", + cwd + "/../bin/mojito", ['build', 'html5app', cwd + '/func/applications/frameworkapp/flatfile'], callback ); @@ -197,9 +198,9 @@ function deploy (cmd, callback) { function startArrowSelenium (browser, callback) { console.log("---Starting Arrow Selenium---"); - var commandArgs = []; + var commandArgs = [cwd+"/../node_modules/yahoo-arrow/arrow_selenium/selenium.js"]; commandArgs.push("--open=" + browser); - runCommand(cwd+"/func/applications/frameworkapp/common", "arrow_selenium", commandArgs, function () { + runCommand(cwd+"/func/applications/frameworkapp/common", "node", commandArgs, function () { callback(null); }); } @@ -211,6 +212,7 @@ function runFuncTests (cmd, callback) { runCommand(cwd, "mkdir", [cwd + '/artifacts/arrowreport/'], function () { runCommand(cwd, "mkdir", [arrowReportDir], function () { var commandArgs = [ + cwd + "/../node_modules/yahoo-arrow/index.js", cwd + "/func/**/*_descriptor.json", "--report=true", "--reportFolder=" + arrowReportDir @@ -226,7 +228,7 @@ function runFuncTests (cmd, callback) { var p = runCommand( cwd + '/func/', - "arrow", + "node", commandArgs, function (code) { callback(code); @@ -264,6 +266,7 @@ function finalize (err, results) { function runCommand (path, command, argv, callback) { callback = callback || function () {}; process.chdir(path); + console.log(command + ' ' + argv.join(' ')); var cmd = child.spawn(command, argv, { cwd: path, env: process.env @@ -297,7 +300,7 @@ function runCommand (path, command, argv, callback) { function runMojitoApp (basePath, path, port, params, callback) { params = params || ''; console.log('Starting ' + path + ' at port ' + port + ' with params ' + (params || 'empty')); - var p = runCommand(basePath + '/' + path, "mojito", ["start", port, "--context", params], function () {}); + var p = runCommand(basePath + '/' + path, cwd + "/../bin/mojito", ["start", port, "--context", params], function () {}); pids.push(p.pid); pidNames[p.pid] = libpath.basename(path) + ':' + port + (params ? '?' + params : ''); // Give each app a second to start From f86909f0ce0bab753efd9a080ece00a683f1d3d5 Mon Sep 17 00:00:00 2001 From: Michael Ridgway Date: Fri, 7 Sep 2012 11:22:33 -0700 Subject: [PATCH 02/17] Refactoring travis scripts --- .travis.yml | 10 ++-------- travis/README.md | 21 +++++++++++++++++++++ travis/before_script.sh | 6 ++++++ travis/script.sh | 1 + 4 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 travis/README.md create mode 100644 travis/before_script.sh create mode 100644 travis/script.sh diff --git a/.travis.yml b/.travis.yml index 68d4d3281..c4565a60c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,14 +3,8 @@ node_js: - 0.8 - 0.6 - 0.4 -before_script: - - "export DISPLAY=:99.0" - - "sh -e /etc/init.d/xvfb start" - - "wget http://selenium.googlecode.com/files/selenium-server-standalone-2.25.0.jar" - - "java -jar selenium-server-standalone-2.25.0.jar -p 4444 > /dev/null 2>&1 &" - - "cd node_modules/yahoo-arrow; npm install yui; cd ../..;" - - "sleep 5" -script: "./bin/mojito jslint -p && ./tests/run.js test -u --group server --driver nodejs && ./tests/run.js test -u --group client --driver selenium && ./tests/run.js test -f" +before_script: ./travis/before_script.sh +script: ./travis/script.sh notifications: email: recipients: diff --git a/travis/README.md b/travis/README.md new file mode 100644 index 000000000..5d852da69 --- /dev/null +++ b/travis/README.md @@ -0,0 +1,21 @@ +Mojito testing with TravisCI +==================================== + +This directory contains the scripts used to automate Mojito testing with TravisCI for our bleeding +branches, specifically those using the latest YUI version. + +Scripts +------- + + * `before.sh` - Runs in the `before_install` build step to clone and create the latest YUI npm package + * `install.sh` - Runs in the `install` build step to do an `npm install` for mojito dependencies + and `npm install` on YUI's `build-npm` (created from the above step) + * `travis.sh` - Runs the travis tests locally for testing, not used in the Travis build. + +Running the test locally +------------------------- + +Clone the repo, then: + + cd mojito; + ./travis/travis.sh \ No newline at end of file diff --git a/travis/before_script.sh b/travis/before_script.sh new file mode 100644 index 000000000..07ed4abda --- /dev/null +++ b/travis/before_script.sh @@ -0,0 +1,6 @@ +export DISPLAY=:99.0 +sh -e /etc/init.d/xvfb start +wget http://selenium.googlecode.com/files/selenium-server-standalone-2.25.0.jar +java -jar selenium-server-standalone-2.25.0.jar -p 4444 > /dev/null 2>&1 & +cd node_modules/yahoo-arrow; npm install yui; cd ../..; +sleep 5 \ No newline at end of file diff --git a/travis/script.sh b/travis/script.sh new file mode 100644 index 000000000..0a578559f --- /dev/null +++ b/travis/script.sh @@ -0,0 +1 @@ +./bin/mojito jslint -p && ./tests/run.js test -u --group server --driver nodejs && ./tests/run.js test -u --group client --driver selenium && ./tests/run.js test -f \ No newline at end of file From 680e8862993cb740c181126737e34ef4d71fca62 Mon Sep 17 00:00:00 2001 From: Michael Ridgway Date: Fri, 7 Sep 2012 11:40:28 -0700 Subject: [PATCH 03/17] Changing permissions of travis scripts --- travis/before_script.sh | 0 travis/script.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 travis/before_script.sh mode change 100644 => 100755 travis/script.sh diff --git a/travis/before_script.sh b/travis/before_script.sh old mode 100644 new mode 100755 diff --git a/travis/script.sh b/travis/script.sh old mode 100644 new mode 100755 From 4ad4f21eb8f4b0735f4d0e017845bb762744e45a Mon Sep 17 00:00:00 2001 From: Michael Ridgway Date: Mon, 10 Sep 2012 16:04:56 -0700 Subject: [PATCH 04/17] Fixed unreliable example tests --- tests/func/examples/developerguide/test_htmlframe.js | 2 +- tests/func/examples/input/test_merged1.js | 9 +-------- tests/func/examples/input/test_post1.js | 9 +-------- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/tests/func/examples/developerguide/test_htmlframe.js b/tests/func/examples/developerguide/test_htmlframe.js index ea23ffdf0..35bf83ee6 100644 --- a/tests/func/examples/developerguide/test_htmlframe.js +++ b/tests/func/examples/developerguide/test_htmlframe.js @@ -13,7 +13,7 @@ YUI({ "test htmlframe": function() { Y.Assert.areEqual("Framed Mojit", Y.one('h2').get('innerHTML')); - Y.Assert.areEqual("border: 10px solid rgb(61, 54, 45); -moz-border-radius: 10px 10px 10px 10px; margin-left: auto; margin-right: auto; padding: 10px 0px; background-color: rgb(247, 246, 244); text-align: center; font-weight: bold; font-size: 2em; color: rgb(255, 153, 0); width: 90%;", Y.one('h2').getAttribute('style')); + Y.Assert.areEqual("90%", Y.one('h2').getStyle('width')); } })); diff --git a/tests/func/examples/input/test_merged1.js b/tests/func/examples/input/test_merged1.js index e849d28bd..c7a9ffa6c 100644 --- a/tests/func/examples/input/test_merged1.js +++ b/tests/func/examples/input/test_merged1.js @@ -15,18 +15,11 @@ YUI({ Y.Assert.areEqual("Merged Parameters Example", Y.one('h1').get('innerHTML')); Y.Assert.areEqual("POST Parameters", Y.one('h2').get('innerHTML')); Y.Assert.areEqual("Submit for for example of POST processing.", Y.one('p').get('innerHTML')); - enterText(Y.one('#name'), "Everyone"); + Y.one('#name').set('value', "Everyone"); Y.one('#likes > option[value="ice cream"]').set('selected','selected'); } })); Y.Test.Runner.add(suite); - function enterText(node, str){ - for (var i = 0, length = str.length; i < length; i++) { - node.simulate("keypress", { - charCode: str.charCodeAt(i) - }); - } - } }); diff --git a/tests/func/examples/input/test_post1.js b/tests/func/examples/input/test_post1.js index d8e0110a2..45872b178 100644 --- a/tests/func/examples/input/test_post1.js +++ b/tests/func/examples/input/test_post1.js @@ -15,18 +15,11 @@ YUI({ Y.Assert.areEqual("Input Parameters Example", Y.one('h1').get('innerHTML')); Y.Assert.areEqual("POST Parameters", Y.one('h2').get('innerHTML')); Y.Assert.areEqual("Submit for for example of POST processing.", Y.one('p').get('innerHTML')); - enterText(Y.one('#name'), "Everyone"); + Y.one('#name').set('value', "Everyone"); Y.one('#likes > option[value="ice cream"]').set('selected','selected'); } })); Y.Test.Runner.add(suite); - function enterText(node, str){ - for (var i = 0, length = str.length; i < length; i++) { - node.simulate("keypress", { - charCode: str.charCodeAt(i) - }); - } - } }); From 1fe883379843a8d8bd00e6e8c630ffa2c02c66a7 Mon Sep 17 00:00:00 2001 From: Isao Yagi Date: Mon, 10 Sep 2012 17:34:09 -0700 Subject: [PATCH 05/17] release 0.4.4 (based on 0.4.3-103-gd6ea2ca) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 686041607..d99402c67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mojito", - "version": "0.4.3", + "version": "0.4.4", "description": "Mojito provides an architecture, components and tools for developers to build complex web applications faster.", "preferGlobal": true, "author": "Drew Folta ", From 8eb19930517f90eb012b4a550a7a585fe88475bd Mon Sep 17 00:00:00 2001 From: Michael Ridgway Date: Tue, 11 Sep 2012 11:54:12 -0700 Subject: [PATCH 06/17] Cleaned up functional tests and in some cases made them more stable --- .../common/commonclienttest_descriptor.json | 223 ++-- .../common/commonservertest_descriptor.json | 154 +-- .../func/common/html5apptest_descriptor.json | 230 ++-- tests/func/common/testacmojitdone10client.js | 2 +- tests/func/common/testacmojitdone10server.js | 2 +- tests/func/common/testacmojitdone1client.js | 2 +- tests/func/common/testacmojitdone1server.js | 2 +- tests/func/common/testacmojitdone2client.js | 2 +- tests/func/common/testacmojitdone2server.js | 2 +- tests/func/common/testacmojitdone3client.js | 2 +- tests/func/common/testacmojitdone3server.js | 2 +- tests/func/common/testacmojitdone4client.js | 2 +- tests/func/common/testacmojitdone4server.js | 2 +- tests/func/common/testacmojitdone5client.js | 2 +- tests/func/common/testacmojitdone5server.js | 2 +- tests/func/common/testacmojitdone6client.js | 2 +- tests/func/common/testacmojitdone6server.js | 2 +- tests/func/common/testacmojitdone7client.js | 2 +- tests/func/common/testacmojitdone7server.js | 2 +- tests/func/common/testacmojitdone8client.js | 2 +- tests/func/common/testacmojitdone8server.js | 2 +- tests/func/common/testacmojitdone9client.js | 2 +- tests/func/common/testacmojitdone9server.js | 2 +- tests/func/common/testacmojitflush10server.js | 2 +- tests/func/common/testacmojitflush1server.js | 2 +- tests/func/common/testacmojitflush2server.js | 2 +- tests/func/common/testacmojitflush3server.js | 2 +- tests/func/common/testacmojitflush4server.js | 2 +- tests/func/common/testacmojitflush5server.js | 2 +- tests/func/common/testacmojitflush6server.js | 2 +- tests/func/common/testacmojitflush7server.js | 2 +- tests/func/common/testacmojitflush8server.js | 2 +- tests/func/common/testacmojitflush9server.js | 2 +- .../func/common/testacmojitflushdoneserver.js | 2 +- tests/func/common/testacmojitnoparamclient.js | 2 +- tests/func/common/testacmojitserver.js | 2 +- .../func/common/testacpartialinvokeclient.js | 4 +- .../func/common/testacpartialinvokeserver.js | 2 +- .../func/common/testacpartialrenderclient.js | 2 +- .../func/common/testacpartialrenderserver.js | 2 +- ...stassetcsswithdefaultlocationbodyserver.js | 2 +- .../testassetcsswithdefaultlocationclient.js | 2 +- ...assetcsswithdefaultlocationheaderserver.js | 2 +- .../testassetcsswithlocationbodyserver.js | 2 +- .../common/testassetcsswithlocationclient.js | 2 +- .../testassetcsswithlocationheaderserver.js | 2 +- ...estassetjswithdefaultlocationbodyserver.js | 2 +- .../testassetjswithdefaultlocationclient.js | 2 +- ...tassetjswithdefaultlocationheaderserver.js | 2 +- .../testassetjswithlocationbodyserver.js | 2 +- .../common/testassetjswithlocationclient.js | 2 +- .../testassetjswithlocationheaderserver.js | 2 +- .../testassetwithdefaultlocationclient.js | 2 +- .../testassetwithdefaultlocationserver.js | 2 +- .../common/testassetwithlocationclient.js | 2 +- .../common/testassetwithlocationserver.js | 2 +- tests/func/common/testbinderclient.js | 2 +- tests/func/common/testbinderserver.js | 2 +- tests/func/common/testbz5076119.js | 2 +- tests/func/common/testclientpause.js | 2 +- tests/func/common/testclientresume.js | 2 +- .../func/common/testcompositemojit1client.js | 2 +- .../func/common/testcompositemojit1server.js | 2 +- .../func/common/testcompositemojit2client.js | 2 +- .../func/common/testcompositemojit2server.js | 2 +- tests/func/common/testcompositemojitclient.js | 2 +- .../testcompositemojitrefresh1client.js | 2 +- .../common/testcompositemojitrefreshclient.js | 2 +- .../common/testcompositemojitrefreshserver.js | 2 +- tests/func/common/testcompositemojitserver.js | 2 +- .../func/common/testconfiginappfileclient.js | 2 +- .../common/testconfiginappfilecompclient.js | 2 +- .../common/testconfiginappfilecompserver.js | 2 +- .../common/testconfiginappfilenegclient.js | 2 +- .../common/testconfiginappfilenegserver.js | 2 +- .../func/common/testconfiginappfileserver.js | 2 +- .../common/testconfigindefaultfileclient.js | 2 +- .../common/testconfigindefaultfileserver.js | 2 +- .../testconfigindefinitionfileclient.js | 2 +- .../testconfigindefinitionfilenegclient.js | 2 +- .../testconfigindefinitionfilenegserver.js | 2 +- .../testconfigindefinitionfileserver.js | 2 +- .../common/testcontrollercachingclient.js | 14 +- tests/func/common/testdependencyclient.js | 2 +- tests/func/common/testdependencyserver.js | 2 +- .../func/common/testgetparamsbyvalueclient.js | 2 +- .../func/common/testgetparamsbyvalueserver.js | 2 +- .../testgetparamsbyvaluesimpleclient.js | 2 +- .../testgetparamsbyvaluesimpleserver.js | 2 +- tests/func/common/testgetparamsclient.js | 2 +- tests/func/common/testgetparamsserver.js | 2 +- .../func/common/testgetparamssimpleclient.js | 2 +- .../func/common/testgetparamssimpleserver.js | 2 +- tests/func/common/testlazyloadclient.js | 4 +- tests/func/common/testmergeparams1server.js | 2 +- tests/func/common/testmergeparamsclient.js | 2 +- tests/func/common/testmergeparamsserver.js | 2 +- .../common/testmergeparamssimple1server.js | 2 +- .../common/testmergeparamssimpleclient.js | 2 +- .../common/testmergeparamssimpleserver.js | 2 +- .../common/testmobiledevicedefaultview.js | 2 +- .../func/common/testmobiledeviceiphoneview.js | 2 +- .../func/common/testmobiledevicekindleview.js | 2 +- .../common/testmojitproxybroadcastdynamic.js | 2 +- .../testmojitproxybroadcaststaticlisten.js | 2 +- .../testmojitproxybroadcaststaticlisten1.js | 2 +- .../testmojitproxybroadcaststaticlisten2.js | 2 +- .../testmojitproxybroadcaststaticlistenall.js | 4 +- .../func/common/testmojitproxydestroychild.js | 2 +- tests/func/common/testmojitproxygetfromurl.js | 2 +- tests/func/common/testmojitproxygetid.js | 2 +- .../func/common/testmojitproxyrefreshview.js | 2 +- tests/func/common/testmojitproxyrender.js | 2 +- tests/func/common/testpostparams1server.js | 2 +- tests/func/common/testpostparamsclient.js | 2 +- tests/func/common/testpostparamsserver.js | 2 +- .../common/testpostparamssimple1server.js | 2 +- .../func/common/testpostparamssimpleclient.js | 2 +- .../func/common/testpostparamssimpleserver.js | 2 +- tests/func/common/testrouteparamsclient.js | 2 +- tests/func/common/testrouteparamsserver.js | 2 +- .../common/testrouteparamssimpleclient.js | 2 +- .../common/testrouteparamssimpleserver.js | 2 +- tests/func/common/testsimplemodelclient.js | 2 +- tests/func/common/testsimplemodelserver.js | 2 +- tests/func/common/teststatefulclient.js | 2 +- tests/func/common/yui-test.js | 1105 ----------------- tests/func/config/configtest_descriptor.json | 39 +- tests/func/config/testDefaultConfig1.js | 2 +- tests/func/config/testDefaultConfig2.js | 2 +- tests/func/config/testDefaultConfig3.js | 2 +- tests/func/config/testDefaultConfig4.js | 2 +- tests/func/config/testchemenv1.js | 2 +- tests/func/config/testchemenv2.js | 2 +- tests/func/config/testfr.js | 4 +- tests/func/config/testmathde.js | 2 +- tests/func/config/testmathenv1.js | 2 +- tests/func/config/testmathenv2.js | 2 +- tests/func/config/testproductionenv1.js | 2 +- tests/func/config/testproductionenv2.js | 2 +- tests/func/config/testtestingenv1.js | 2 +- tests/func/config/testtestingenv2.js | 2 +- tests/func/config/testtestingenv3.js | 2 +- tests/func/config/testtestingenv4.js | 2 +- tests/func/config/testtestingenv5.js | 2 +- tests/func/config/testtestingenv6.js | 2 +- .../developerguide_descriptor.json | 394 +++--- .../test_adding_view_engines.js | 2 +- .../test_adding_view_engines2.js | 2 +- .../developerguide/test_binding_events.js | 2 +- .../developerguide/test_binding_events2.js | 2 +- .../developerguide/test_configure_routing.js | 2 +- .../developerguide/test_device_assets.js | 2 +- .../developerguide/test_device_views.js | 2 +- .../developerguide/test_framed_assets.js | 2 +- .../developerguide/test_framed_config.js | 2 +- .../developerguide/test_generating_urls.js | 2 +- .../developerguide/test_generating_urls2.js | 2 +- .../developerguide/test_global_assets.js | 2 +- .../examples/developerguide/test_hello.js | 2 +- .../examples/developerguide/test_htmlframe.js | 2 +- .../developerguide/test_innermojit.js | 2 +- .../developerguide/test_locale_i18n.js | 2 +- .../examples/developerguide/test_modelyql.js | 2 +- .../developerguide/test_multiplemojit.js | 2 +- .../developerguide/test_scrollview.js | 2 +- .../developerguide/test_simple_assets.js | 2 +- .../developerguide/test_simple_config.js | 2 +- .../developerguide/test_simple_logging.js | 2 +- .../developerguide/test_simple_view.js | 2 +- .../test_unittest_model_controller.js | 2 +- .../developerguide/test_using_configs.js | 2 +- .../developerguide/test_using_configs2.js | 2 +- .../developerguide/test_using_parameters.js | 2 +- .../examples/developerguide/test_yuimodule.js | 2 +- .../func/examples/developerguide/yui-test.js | 1105 ----------------- .../func/examples/input/input_descriptor.json | 84 +- tests/func/examples/input/test_get1.js | 2 +- tests/func/examples/input/test_get2.js | 2 +- tests/func/examples/input/test_get3.js | 2 +- tests/func/examples/input/test_merged1.js | 2 +- tests/func/examples/input/test_merged2.js | 2 +- tests/func/examples/input/test_post1.js | 2 +- tests/func/examples/input/test_post2.js | 2 +- tests/func/examples/input/test_route.js | 2 +- .../newsboxes/newsboxes_descriptor.json | 30 +- .../examples/newsboxes/test_newsboxes1.js | 4 +- .../examples/newsboxes/test_newsboxes2.js | 4 +- .../examples/simple/simple_descriptor.json | 130 +- tests/func/examples/simple/test_part1.js | 2 +- tests/func/examples/simple/test_part2.js | 2 +- tests/func/examples/simple/test_part3.js | 2 +- tests/func/examples/simple/test_part4.js | 2 +- tests/func/examples/simple/test_part5.js | 2 +- tests/func/examples/simple/test_part6.js | 2 +- tests/func/examples/simple/test_part7.js | 2 +- tests/func/examples/simple/test_part8.js | 2 +- tests/func/examples/simple/yui-test.js | 1105 ----------------- .../func/routing/routingtest_descriptor.json | 221 ++-- tests/func/routing/testbasicrouting1.js | 2 +- tests/func/routing/testbasicrouting10-1.js | 2 +- tests/func/routing/testbasicrouting10-2.js | 2 +- tests/func/routing/testbasicrouting11neg1.js | 2 +- tests/func/routing/testbasicrouting11neg2.js | 2 +- tests/func/routing/testbasicrouting11pos.js | 2 +- tests/func/routing/testbasicrouting2.js | 2 +- tests/func/routing/testbasicrouting3.js | 2 +- tests/func/routing/testbasicrouting4.js | 2 +- tests/func/routing/testbasicrouting5.js | 2 +- tests/func/routing/testbasicrouting6.js | 2 +- tests/func/routing/testbasicrouting7-1.js | 2 +- tests/func/routing/testbasicrouting7-2.js | 2 +- tests/func/routing/testbasicrouting8-1.js | 2 +- tests/func/routing/testbasicrouting8-2.js | 2 +- tests/func/routing/testbasicrouting8.js | 2 +- tests/func/routing/testbasicrouting9-1.js | 2 +- tests/func/routing/testbasicrouting9-2.js | 2 +- tests/func/routing/testbasicroutingneg1.js | 2 +- tests/func/routing/testbasicroutingneg2.js | 2 +- tests/func/routing/testbasicroutingneg3.js | 2 +- .../serveronly/serveronlytest_descriptor.json | 370 +++--- tests/func/serveronly/testMultiActions1.js | 2 +- tests/func/serveronly/testMultiActions2.js | 2 +- tests/func/serveronly/testMultiActions3.js | 2 +- tests/func/serveronly/testMultiActions4.js | 2 +- tests/func/serveronly/testRefreshview.js | 2 +- tests/func/serveronly/testbz4739992.js | 2 +- tests/func/serveronly/testbz5249892.js | 2 +- tests/func/serveronly/testbz5264755.js | 2 +- tests/func/serveronly/testbz5300267.js | 2 +- tests/func/serveronly/testbz5329232.js | 2 +- tests/func/serveronly/testbz5332780.js | 2 +- tests/func/serveronly/testbz5366776.js | 2 +- tests/func/serveronly/testbz5590319.js | 2 +- .../serveronly/testhttpaddon-addheader.js | 2 +- .../serveronly/testhttpaddon-addheaders.js | 2 +- .../func/serveronly/testhttpaddon-falsexhr.js | 2 +- .../serveronly/testhttpaddon-getheaders.js | 2 +- .../func/serveronly/testhttpaddon-redirect.js | 2 +- .../func/serveronly/testhttpaddon-request.js | 2 +- .../func/serveronly/testhttpaddon-response.js | 2 +- .../serveronly/testhttpaddon-setheader.js | 2 +- .../serveronly/testhttpaddon-setheaders.js | 2 +- .../func/serveronly/testhttpaddon-truexhr.js | 2 +- .../testrestlib-DELETEWithParamsClient.js | 2 +- .../testrestlib-DELETEWithParamsServer.js | 2 +- .../testrestlib-GETWithParamsClient.js | 2 +- ...testrestlib-GETWithParamsNegativeClient.js | 2 +- ...testrestlib-GETWithParamsNegativeServer.js | 2 +- .../testrestlib-GETWithParamsServer.js | 2 +- .../testrestlib-HEADParamsServer.js | 2 +- .../serveronly/testrestlib-HeadersClient.js | 2 +- .../serveronly/testrestlib-HeadersServer.js | 2 +- .../testrestlib-POSTWithParamsClient.js | 2 +- ...estrestlib-POSTWithParamsNegativeClient.js | 2 +- ...estrestlib-POSTWithParamsNegativeServer.js | 2 +- .../testrestlib-POSTWithParamsServer.js | 2 +- .../testrestlib-PUTWithParamsClient.js | 2 +- .../testrestlib-PUTWithParamsServer.js | 2 +- .../testrestlib-SimpleWSCallClient.js | 2 +- .../testrestlib-inspectErrorClient.js | 2 +- .../testrestlib-inspectErrorServer.js | 2 +- .../testrestlib-inspectResponseClient.js | 2 +- ...testrestlib-inspectResponseHeaderClient.js | 2 +- ...testrestlib-inspectResponseHeaderServer.js | 2 +- .../testrestlib-inspectResponseServer.js | 2 +- .../testrestlib-simpleWSCallServer.js | 2 +- tests/func/serveronly/yui-test.js | 1105 ----------------- tests/func/usecases/testflickr1.js | 2 +- tests/func/usecases/testhello.js | 2 +- tests/func/usecases/testi18n-de.js | 2 +- tests/func/usecases/testi18n-neg.js | 2 +- tests/func/usecases/testi18n.js | 2 +- tests/func/usecases/testi18nintlLang.js | 2 +- .../func/usecases/testpagedflickr-de-page2.js | 2 +- tests/func/usecases/testpagedflickr-de.js | 2 +- tests/func/usecases/testpagedflickr-page2.js | 2 +- tests/func/usecases/testpagedflickr.js | 2 +- tests/func/usecases/testpreattachedbinder.js | 2 +- tests/func/usecases/testpreinit.js | 2 +- .../usecases/usecasestest_descriptor.json | 126 +- tests/func/usecases/yui-test.js | 1105 ----------------- 282 files changed, 1278 insertions(+), 6804 deletions(-) delete mode 100644 tests/func/common/yui-test.js delete mode 100644 tests/func/examples/developerguide/yui-test.js delete mode 100644 tests/func/examples/simple/yui-test.js mode change 100755 => 100644 tests/func/serveronly/serveronlytest_descriptor.json delete mode 100644 tests/func/serveronly/yui-test.js delete mode 100644 tests/func/usecases/yui-test.js diff --git a/tests/func/common/commonclienttest_descriptor.json b/tests/func/common/commonclienttest_descriptor.json index 34acb3c5b..b670787e8 100755 --- a/tests/func/common/commonclienttest_descriptor.json +++ b/tests/func/common/commonclienttest_descriptor.json @@ -4,8 +4,8 @@ "name" : "common", - "commonlib" : "yui-test.js", - + "commonlib" : "../../base/yui-test.js", + "config" :{ "baseUrl" : "http://localhost:4081" }, @@ -18,82 +18,75 @@ "page" : "$$config.baseUrl$$/" } }, - "acmojitdone2client" : { + "acmojitdone2client" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitdone2client.js", "page" : "$$config.baseUrl$$/" } }, - "acmojitdone3client" : { + "acmojitdone3client" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitdone3client.js", "page" : "$$config.baseUrl$$/" } }, - "acmojitdone4client" : { + "acmojitdone4client" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitdone4client.js", "page" : "$$config.baseUrl$$/" } }, - "acmojitdone5client" : { + "acmojitdone5client" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitdone5client.js", "page" : "$$config.baseUrl$$/" } }, - "acmojitdone6client" : { + "acmojitdone6client" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitdone6client.js", "page" : "$$config.baseUrl$$/" } }, - "acmojitdone7client" : { + "acmojitdone7client" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitdone7client.js", "page" : "$$config.baseUrl$$/" } }, - "acmojitdone8client" : { + "acmojitdone8client" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitdone8client.js", "page" : "$$config.baseUrl$$/" } }, - "acmojitdone9client" : { + "acmojitdone9client" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitdone9client.js", "page" : "$$config.baseUrl$$/" } }, - "acmojitdone10client" : { + "acmojitdone10client" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitdone10client.js", "page" : "$$config.baseUrl$$/" } }, - "acmojitnoparamclient" : { + "acmojitnoparamclient" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitnoparamclient.js", "page" : "$$config.baseUrl$$/" } - }, - "testdependencyclient" : { - "group" : "smoke,common", - "params" : { - "test" : "testdependencyclient.js", - "page" : "$$config.baseUrl$$/" - } }, "testacpartialrenderclient" : { "group" : "smoke,common", @@ -109,7 +102,7 @@ "page" : "$$config.baseUrl$$/" } }, - "testassetwithlocationclient" : { + "testassetwithlocationclient" : { "group" : "smoke,common", "params" : { "test" : "testassetwithlocationclient.js", @@ -130,7 +123,7 @@ "page" : "$$config.baseUrl$$/" } }, - "testassetwithdefaultlocationclient" : { + "testassetwithdefaultlocationclient" : { "group" : "smoke,common", "params" : { "test" : "testassetwithdefaultlocationclient.js", @@ -151,14 +144,14 @@ "page" : "$$config.baseUrl$$/" } }, - "testbinderclient" : { + "testbinderclient" : { "group" : "smoke,common", "params" : { "test" : "testbinderclient.js", "page" : "$$config.baseUrl$$/" } }, - "testcompositemojitclient" : { + "testcompositemojitclient" : { "group" : "smoke,common", "params" : { "test" : "testcompositemojitclient.js", @@ -172,28 +165,28 @@ "page" : "$$config.baseUrl$$/" } }, - "testcompositemojit2client" : { + "testcompositemojit2client" : { "group" : "smoke,common", "params" : { "test" : "testcompositemojit2client.js", "page" : "$$config.baseUrl$$/" } }, - "testcompositemojitrefreshclient" : { + "testcompositemojitrefreshclient" : { "group" : "smoke,common", "params" : { "test" : "testcompositemojitrefreshclient.js", "page" : "$$config.baseUrl$$/" } }, - "testcompositemojitrefresh1client" : { + "testcompositemojitrefresh1client" : { "group" : "smoke,common", "params" : { "test" : "testcompositemojitrefresh1client.js", "page" : "$$config.baseUrl$$/cmframe?run_from_server=false" } }, - "testconfiginappfileclient" : { + "testconfiginappfileclient" : { "group" : "smoke,common", "params" : { "test" : "testconfiginappfileclient.js", @@ -207,21 +200,21 @@ "page" : "$$config.baseUrl$$/" } }, - "testconfiginappfilenegclient" : { + "testconfiginappfilenegclient" : { "group" : "smoke,common", "params" : { "test" : "testconfiginappfilenegclient.js", "page" : "$$config.baseUrl$$/" } }, - "testconfigindefaultfileclient" : { + "testconfigindefaultfileclient" : { "group" : "smoke,common", "params" : { "test" : "testconfigindefaultfileclient.js", "page" : "$$config.baseUrl$$/" } }, - "testconfigindefinitionfileclient" : { + "testconfigindefinitionfileclient" : { "group" : "smoke,common", "params" : { "test" : "testconfigindefinitionfileclient.js", @@ -235,7 +228,7 @@ "page" : "$$config.baseUrl$$/" } }, - "testmojitproxydestroychild" : { + "testmojitproxydestroychild" : { "group" : "smoke,common", "params" : { "test" : "testmojitproxydestroychild.js", @@ -249,21 +242,21 @@ "page" : "$$config.baseUrl$$/" } }, - "teststatefulclient" : { + "teststatefulclient" : { "group" : "smoke,common", "params" : { "test" : "teststatefulclient.js", "page" : "$$config.baseUrl$$/" } }, - "testdependencyclient" : { + "testdependencyclient" : { "group" : "smoke,common", "params" : { "test" : "testdependencyclient.js", "page" : "$$config.baseUrl$$/" } }, - "testlazyloadclient" : { + "testlazyloadclient" : { "group" : "smoke,common", "params" : { "test" : "testlazyloadclient.js", @@ -277,153 +270,153 @@ "page" : "$$config.baseUrl$$/" } }, - "testclientpause" : { + "testclientpause" : { "group" : "smoke,common", "params" : { "test" : "testclientpause.js", "page" : "$$config.baseUrl$$/" } }, - "testsimplemodelclient" : { + "testsimplemodelclient" : { "group" : "smoke,common", "params" : { "test" : "testsimplemodelclient.js", "page" : "$$config.baseUrl$$/" } }, - "testmojitproxybroadcaststaticlistenall" : { + "testmojitproxybroadcaststaticlistenall" : { "group" : "smoke,common", "params" : { "test" : "testmojitproxybroadcaststaticlistenall.js", "page" : "$$config.baseUrl$$/" } }, - "testmojitproxybroadcaststaticlisten2" : { + "testmojitproxybroadcaststaticlisten2" : { "group" : "smoke,common", "params" : { "test" : "testmojitproxybroadcaststaticlisten2.js", "page" : "$$config.baseUrl$$/" } }, - "testmojitproxybroadcaststaticlisten1" : { + "testmojitproxybroadcaststaticlisten1" : { "group" : "smoke,common", "params" : { "test" : "testmojitproxybroadcaststaticlisten1.js", "page" : "$$config.baseUrl$$/" } }, - "testmojitproxybroadcaststaticlisten" : { + "testmojitproxybroadcaststaticlisten" : { "group" : "smoke,common", "params" : { "test" : "testmojitproxybroadcaststaticlisten.js", "page" : "$$config.baseUrl$$/" } }, - "testmojitproxybroadcastdynamic" : { + "testmojitproxybroadcastdynamic" : { "group" : "smoke,common", "params" : { "test" : "testmojitproxybroadcastdynamic.js", "page" : "$$config.baseUrl$$/" } }, - "testmojitproxyrender" : { + "testmojitproxyrender" : { "group" : "smoke,common", "params" : { "test" : "testmojitproxyrender.js", "page" : "$$config.baseUrl$$/?test=abc" } }, - "testmojitproxyrefreshview" : { + "testmojitproxyrefreshview" : { "group" : "smoke,common", "params" : { "test" : "testmojitproxyrefreshview.js", "page" : "$$config.baseUrl$$/" } }, - "testmojitproxygetid" : { + "testmojitproxygetid" : { "group" : "smoke,common", "params" : { "test" : "testmojitproxygetid.js", "page" : "$$config.baseUrl$$/" } }, - "testmojitproxygetfromurl" : { + "testmojitproxygetfromurl" : { "group" : "smoke,common", "params" : { "test" : "testmojitproxygetfromurl.js", "page" : "$$config.baseUrl$$/?test=abc" } }, - "testgetparamsclient" : { - "group" : "smoke,common", - "params" : { - "test" : "testgetparamsclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testgetparamssimpleclient" : { - "group" : "smoke,common", - "params" : { - "test" : "testgetparamssimpleclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testgetparamsbyvalueclient" : { - "group" : "smoke,common", - "params" : { - "test" : "testgetparamsbyvalueclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testgetparamsbyvaluesimpleclient" : { - "group" : "smoke,common", - "params" : { - "test" : "testgetparamsbyvaluesimpleclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testmergeparamsclient" : { - "group" : "smoke,common", - "params" : { - "test" : "testmergeparamsclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testmergeparamssimpleclient" : { - "group" : "smoke,common", - "params" : { - "test" : "testmergeparamssimpleclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testpostparamsclient" : { - "group" : "smoke,common", - "params" : { - "test" : "testpostparamsclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testpostparamssimpleclient" : { - "group" : "smoke,common", - "params" : { - "test" : "testpostparamssimpleclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testrouteparamsclient" : { - "group" : "smoke,common", - "params" : { - "test" : "testrouteparamsclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testrouteparamssimpleclient" : { - "group" : "smoke,common", - "params" : { - "test" : "testrouteparamssimpleclient.js", - "page" : "$$config.baseUrl$$/" - } - } + "testgetparamsclient" : { + "group" : "smoke,common", + "params" : { + "test" : "testgetparamsclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testgetparamssimpleclient" : { + "group" : "smoke,common", + "params" : { + "test" : "testgetparamssimpleclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testgetparamsbyvalueclient" : { + "group" : "smoke,common", + "params" : { + "test" : "testgetparamsbyvalueclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testgetparamsbyvaluesimpleclient" : { + "group" : "smoke,common", + "params" : { + "test" : "testgetparamsbyvaluesimpleclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testmergeparamsclient" : { + "group" : "smoke,common", + "params" : { + "test" : "testmergeparamsclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testmergeparamssimpleclient" : { + "group" : "smoke,common", + "params" : { + "test" : "testmergeparamssimpleclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testpostparamsclient" : { + "group" : "smoke,common", + "params" : { + "test" : "testpostparamsclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testpostparamssimpleclient" : { + "group" : "smoke,common", + "params" : { + "test" : "testpostparamssimpleclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testrouteparamsclient" : { + "group" : "smoke,common", + "params" : { + "test" : "testrouteparamsclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testrouteparamssimpleclient" : { + "group" : "smoke,common", + "params" : { + "test" : "testrouteparamssimpleclient.js", + "page" : "$$config.baseUrl$$/" + } + } } }, diff --git a/tests/func/common/commonservertest_descriptor.json b/tests/func/common/commonservertest_descriptor.json index c8014216a..f262c416f 100755 --- a/tests/func/common/commonservertest_descriptor.json +++ b/tests/func/common/commonservertest_descriptor.json @@ -4,8 +4,8 @@ "name" : "common", - "commonlib" : "yui-test.js", - + "commonlib" : "../../base/yui-test.js", + "config" :{ "baseUrl" : "http://localhost:4081" }, @@ -25,56 +25,56 @@ "page" : "$$config.baseUrl$$/ACMojit/acMojit?test=done1" } }, - "acmojitdone2server" : { + "acmojitdone2server" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitdone2server.js", "page" : "$$config.baseUrl$$/ACMojit/acMojit?test=done2" } }, - "acmojitdone3server" : { + "acmojitdone3server" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitdone3server.js", "page" : "$$config.baseUrl$$/ACMojit/acMojit?test=done3" } }, - "acmojitdone4server" : { + "acmojitdone4server" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitdone4server.js", "page" : "$$config.baseUrl$$/ACMojit/acMojit?test=done4" } }, - "acmojitdone6server" : { + "acmojitdone6server" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitdone6server.js", "page" : "$$config.baseUrl$$/ACMojit/acMojit?test=done6" } }, - "acmojitdone8server" : { + "acmojitdone8server" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitdone8server.js", "page" : "$$config.baseUrl$$/ACMojit/acMojit?test=done8" } }, - "acmojitdone9server" : { + "acmojitdone9server" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitdone9server.js", "page" : "$$config.baseUrl$$/ACMojit/acMojit?test=done9" } }, - "acmojitdone10server" : { + "acmojitdone10server" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitdone10server.js", "page" : "$$config.baseUrl$$/ACMojit/acMojit?test=done10" } }, - "acmojitflushdoneserver" : { + "acmojitflushdoneserver" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitflushdoneserver.js", @@ -88,49 +88,49 @@ "page" : "$$config.baseUrl$$/ACMojit/acMojit?test=flush1" } }, - "acmojitflush3server" : { + "acmojitflush3server" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitflush3server.js", "page" : "$$config.baseUrl$$/ACMojit/acMojit?test=flush3" } }, - "acmojitflush4server" : { + "acmojitflush4server" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitflush4server.js", "page" : "$$config.baseUrl$$/ACMojit/acMojit?test=flush4" } }, - "acmojitflush6server" : { + "acmojitflush6server" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitflush6server.js", "page" : "$$config.baseUrl$$/ACMojit/acMojit?test=flush6" } }, - "acmojitflush8server" : { + "acmojitflush8server" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitflush8server.js", "page" : "$$config.baseUrl$$/ACMojit/acMojit?test=flush8" } }, - "acmojitflush9server" : { + "acmojitflush9server" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitflush9server.js", "page" : "$$config.baseUrl$$/ACMojit/acMojit?test=flush9" } }, - "acmojitflush10server" : { + "acmojitflush10server" : { "group" : "smoke,common,acmojit", "params" : { "test" : "testacmojitflush10server.js", "page" : "$$config.baseUrl$$/ACMojit/acMojit?test=flush10" } }, - "testdependencyserver" : { + "testdependencyserver" : { "group" : "smoke,common", "params" : { "test" : "testdependencyserver.js", @@ -151,7 +151,7 @@ "page" : "$$config.baseUrl$$/@PartialMojit/myinvoke" } }, - "testassetwithlocationserver" : { + "testassetwithlocationserver" : { "group" : "smoke,common", "params" : { "test" : "testassetwithlocationserver.js", @@ -165,7 +165,7 @@ "page" : "$$config.baseUrl$$/assetsframeloc" } }, - "testassetjswithlocationbodyserver" : { + "testassetjswithlocationbodyserver" : { "group" : "smoke,common", "params" : { "test" : "testassetjswithlocationbodyserver.js", @@ -179,14 +179,14 @@ "page" : "$$config.baseUrl$$/assetsframeloc" } }, - "testassetcsswithlocationbodyserver" : { + "testassetcsswithlocationbodyserver" : { "group" : "smoke,common", "params" : { "test" : "testassetcsswithlocationbodyserver.js", "page" : "$$config.baseUrl$$/assetsframeloc" } }, - "testassetwithdefaultlocationserver" : { + "testassetwithdefaultlocationserver" : { "group" : "smoke,common", "params" : { "test" : "testassetwithdefaultlocationserver.js", @@ -200,7 +200,7 @@ "page" : "$$config.baseUrl$$/assetsframedefault" } }, - "testassetjswithdefaultlocationbodyserver" : { + "testassetjswithdefaultlocationbodyserver" : { "group" : "smoke,common", "params" : { "test" : "testassetjswithdefaultlocationbodyserver.js", @@ -221,42 +221,42 @@ "page" : "$$config.baseUrl$$/assetsframedefault" } }, - "testbinderserver" : { + "testbinderserver" : { "group" : "smoke,common", "params" : { "test" : "testbinderserver.js", "page" : "$$config.baseUrl$$/binderframe" } }, - "testcompositemojitserver" : { + "testcompositemojitserver" : { "group" : "smoke,common", "params" : { "test" : "testcompositemojitserver.js", "page" : "$$config.baseUrl$$/cmframe" } }, - "testcompositemojit1server" : { + "testcompositemojit1server" : { "group" : "smoke,common", "params" : { "test" : "testcompositemojit1server.js", "page" : "$$config.baseUrl$$/cmframe" } }, - "testcompositemojit2server" : { + "testcompositemojit2server" : { "group" : "smoke,common", "params" : { "test" : "testcompositemojit2server.js", "page" : "$$config.baseUrl$$/cmframe" } }, - "testcompositemojitrefreshserver" : { + "testcompositemojitrefreshserver" : { "group" : "smoke,common", "params" : { "test" : "testcompositemojitrefreshserver.js", "page" : "$$config.baseUrl$$/cmframe?run_from_server=true" } }, - "testconfiginappfileserver" : { + "testconfiginappfileserver" : { "group" : "smoke,common", "params" : { "test" : "testconfiginappfileserver.js", @@ -270,21 +270,21 @@ "page" : "$$config.baseUrl$$/MyConfig/myIndex" } }, - "testconfiginappfilenegserver" : { + "testconfiginappfilenegserver" : { "group" : "smoke,common", "params" : { "test" : "testconfiginappfilenegserver.js", "page" : "$$config.baseUrl$$/MyConfig/myIndex" } }, - "testconfigindefaultfileserver" : { + "testconfigindefaultfileserver" : { "group" : "smoke,common", "params" : { "test" : "testconfigindefaultfileserver.js", "page" : "$$config.baseUrl$$/MyConfig/myIndex" } }, - "testconfigindefinitionfileserver" : { + "testconfigindefinitionfileserver" : { "group" : "smoke,common", "params" : { "test" : "testconfigindefinitionfileserver.js", @@ -298,14 +298,14 @@ "page" : "$$config.baseUrl$$/MyConfig/myIndex" } }, - "testsimplemodelserver" : { + "testsimplemodelserver" : { "group" : "smoke,common", "params" : { "test" : "testsimplemodelserver.js", "page" : "$$config.baseUrl$$/SimpleModel/simpleModel" } }, - "testgetparamsserver" : { + "testgetparamsserver" : { "group" : "smoke,common", "params" : { "test" : "testgetparamsserver.js", @@ -319,133 +319,133 @@ "page" : "$$config.baseUrl$$/GetParams/allParamsSimple?foo=123&bar=2&test=no" } }, - "testgetparamsbyvalueserver" : { + "testgetparamsbyvalueserver" : { "group" : "smoke,common", "params" : { "test" : "testgetparamsbyvalueserver.js", "page" : "$$config.baseUrl$$/GetParams/paramsByValue?foo=abc" } }, - "testgetparamsbyvaluesimpleserver" : { + "testgetparamsbyvaluesimpleserver" : { "group" : "smoke,common", "params" : { "test" : "testgetparamsbyvaluesimpleserver.js", "page" : "$$config.baseUrl$$/GetParams/paramsByValueSimple?foo=abc" } }, - "testmergeparamsserver" : { + "testmergeparamsserver" : { "group" : "smoke,common", "params" : { - "scenario": [ + "scenario": [ { "test" : "testmergeparamsserver.js", - "page" : "$$config.baseUrl$$/MergePoster/index" + "page" : "$$config.baseUrl$$/MergePoster/index" }, { "controller": "locator", - "params": { - "value": "#submitbutton", - "click": true - } + "params": { + "value": "#submitbutton", + "click": true + } }, - { - "test" : "testmergeparams1server.js" - } + { + "test" : "testmergeparams1server.js" + } ] } }, "testmergeparamssimpleserver" : { "group" : "smoke,common", "params" : { - "scenario": [ + "scenario": [ { "test" : "testmergeparamssimpleserver.js", - "page" : "$$config.baseUrl$$/MergePoster/index" + "page" : "$$config.baseUrl$$/MergePoster/index" }, { "controller": "locator", - "params": { - "value": "#submitsimplebutton", - "click": true - } + "params": { + "value": "#submitsimplebutton", + "click": true + } }, - { - "test" : "testmergeparamssimple1server.js" - } + { + "test" : "testmergeparamssimple1server.js" + } ] } }, - "testpostparamsserver" : { + "testpostparamsserver" : { "group" : "smoke,common", "params" : { "scenario": [ { "test" : "testpostparamsserver.js", - "page" : "$$config.baseUrl$$/Poster/index" + "page" : "$$config.baseUrl$$/Poster/index" }, { "controller": "locator", - "params": { - "value": "#submitbutton", - "click": true - } + "params": { + "value": "#submitbutton", + "click": true + } }, - { - "test" : "testpostparams1server.js" - } + { + "test" : "testpostparams1server.js" + } ] } }, - "testpostparamssimpleserver" : { + "testpostparamssimpleserver" : { "group" : "smoke,common", "params" : { "scenario": [ { "test" : "testpostparamssimpleserver.js", - "page" : "$$config.baseUrl$$/Poster/index" + "page" : "$$config.baseUrl$$/Poster/index" }, { "controller": "locator", - "params": { - "value": "#submitsimplebutton", - "click": true - } + "params": { + "value": "#submitsimplebutton", + "click": true + } }, - { - "test" : "testpostparamssimple1server.js" - } + { + "test" : "testpostparamssimple1server.js" + } ] } }, - "testrouteparamsserver" : { + "testrouteparamsserver" : { "group" : "smoke,common", "params" : { "test" : "testrouteparamsserver.js", "page" : "$$config.baseUrl$$/RouteParams" } }, - "testrouteparamssimpleserver" : { + "testrouteparamssimpleserver" : { "group" : "smoke,common", "params" : { "test" : "testrouteparamssimpleserver.js", "page" : "$$config.baseUrl$$/RouteParamsSimple" } }, - "testmobiledevicedefaultview" : { + "testmobiledevicedefaultview" : { "group" : "smoke,common,new", "params" : { "test" : "testmobiledevicedefaultview.js", "page" : "$$config.baseUrl$$/mobiledevices/index" } }, - "testmobiledeviceiphoneview" : { + "testmobiledeviceiphoneview" : { "group" : "smoke,common,new", "params" : { "test" : "testmobiledeviceiphoneview.js", "page" : "$$config.baseUrl$$/mobiledevices/index?device=iphone" } }, - "testmobiledevicekindleview" : { + "testmobiledevicekindleview" : { "group" : "smoke,common,new", "params" : { "test" : "testmobiledevicekindleview.js", diff --git a/tests/func/common/html5apptest_descriptor.json b/tests/func/common/html5apptest_descriptor.json index df4a74f29..ed40010f0 100755 --- a/tests/func/common/html5apptest_descriptor.json +++ b/tests/func/common/html5apptest_descriptor.json @@ -4,8 +4,8 @@ "name" : "html5app", - "commonlib" : "yui-test.js", - + "commonlib" : "../../base/yui-test.js", + "config" :{ "baseUrl" : "http://localhost:4084" }, @@ -18,77 +18,77 @@ "page" : "$$config.baseUrl$$/" } }, - "acmojitdone2client" : { + "acmojitdone2client" : { "group" : "smoke,html5app,acmojit", "params" : { "test" : "testacmojitdone2client.js", "page" : "$$config.baseUrl$$/" } }, - "acmojitdone3client" : { + "acmojitdone3client" : { "group" : "smoke,html5app,acmojit", "params" : { "test" : "testacmojitdone3client.js", "page" : "$$config.baseUrl$$/" } }, - "acmojitdone4client" : { + "acmojitdone4client" : { "group" : "smoke,html5app,acmojit", "params" : { "test" : "testacmojitdone4client.js", "page" : "$$config.baseUrl$$/" } }, - "acmojitdone5client" : { + "acmojitdone5client" : { "group" : "smoke,html5app,acmojit", "params" : { "test" : "testacmojitdone5client.js", "page" : "$$config.baseUrl$$/" } }, - "acmojitdone6client" : { + "acmojitdone6client" : { "group" : "smoke,html5app,acmojit", "params" : { "test" : "testacmojitdone6client.js", "page" : "$$config.baseUrl$$/" } }, - "acmojitdone7client" : { + "acmojitdone7client" : { "group" : "smoke,html5app,acmojit", "params" : { "test" : "testacmojitdone7client.js", "page" : "$$config.baseUrl$$/" } }, - "acmojitdone8client" : { + "acmojitdone8client" : { "group" : "smoke,html5app,acmojit", "params" : { "test" : "testacmojitdone8client.js", "page" : "$$config.baseUrl$$/" } }, - "acmojitdone9client" : { + "acmojitdone9client" : { "group" : "smoke,html5app,acmojit", "params" : { "test" : "testacmojitdone9client.js", "page" : "$$config.baseUrl$$/" } }, - "acmojitdone10client" : { + "acmojitdone10client" : { "group" : "smoke,html5app,acmojit", "params" : { "test" : "testacmojitdone10client.js", "page" : "$$config.baseUrl$$/" } }, - "acmojitnoparamclient" : { + "acmojitnoparamclient" : { "group" : "smoke,html5app,acmojit", "params" : { "test" : "testacmojitnoparamclient.js", "page" : "$$config.baseUrl$$/" } }, - "testdependencyclient" : { + "testdependencyclient" : { "group" : "smoke,html5app", "params" : { "test" : "testdependencyclient.js", @@ -109,7 +109,7 @@ "page" : "$$config.baseUrl$$/" } }, - "testassetwithlocationclient" : { + "testassetwithlocationclient" : { "group" : "smoke,html5app", "params" : { "test" : "testassetwithlocationclient.js", @@ -130,7 +130,7 @@ "page" : "$$config.baseUrl$$/" } }, - "testassetwithdefaultlocationclient" : { + "testassetwithdefaultlocationclient" : { "group" : "smoke,html5app", "params" : { "test" : "testassetwithdefaultlocationclient.js", @@ -151,14 +151,14 @@ "page" : "$$config.baseUrl$$/" } }, - "testbinderclient" : { + "testbinderclient" : { "group" : "smoke,html5app", "params" : { "test" : "testbinderclient.js", "page" : "$$config.baseUrl$$/" } }, - "testcompositemojitclient" : { + "testcompositemojitclient" : { "group" : "smoke,html5app", "params" : { "test" : "testcompositemojitclient.js", @@ -172,21 +172,21 @@ "page" : "$$config.baseUrl$$/" } }, - "testcompositemojit2client" : { + "testcompositemojit2client" : { "group" : "smoke,html5app", "params" : { "test" : "testcompositemojit2client.js", "page" : "$$config.baseUrl$$/" } }, - "testcompositemojitrefreshclient" : { + "testcompositemojitrefreshclient" : { "group" : "smoke,html5app", "params" : { "test" : "testcompositemojitrefreshclient.js", "page" : "$$config.baseUrl$$/" } }, - "testconfiginappfileclient" : { + "testconfiginappfileclient" : { "group" : "smoke,html5app", "params" : { "test" : "testconfiginappfileclient.js", @@ -200,21 +200,21 @@ "page" : "$$config.baseUrl$$/" } }, - "testconfiginappfilenegclient" : { + "testconfiginappfilenegclient" : { "group" : "smoke,html5app", "params" : { "test" : "testconfiginappfilenegclient.js", "page" : "$$config.baseUrl$$/" } }, - "testconfigindefaultfileclient" : { + "testconfigindefaultfileclient" : { "group" : "smoke,html5app", "params" : { "test" : "testconfigindefaultfileclient.js", "page" : "$$config.baseUrl$$/" } }, - "testconfigindefinitionfileclient" : { + "testconfigindefinitionfileclient" : { "group" : "smoke,html5app", "params" : { "test" : "testconfigindefinitionfileclient.js", @@ -228,7 +228,7 @@ "page" : "$$config.baseUrl$$/" } }, - "testmojitproxydestroychild" : { + "testmojitproxydestroychild" : { "group" : "smoke,html5app", "params" : { "test" : "testmojitproxydestroychild.js", @@ -242,21 +242,21 @@ "page" : "$$config.baseUrl$$/" } }, - "teststatefulclient" : { + "teststatefulclient" : { "group" : "smoke,html5app", "params" : { "test" : "teststatefulclient.js", "page" : "$$config.baseUrl$$/" } }, - "testdependencyclient" : { + "testdependencyclient" : { "group" : "smoke,html5app", "params" : { "test" : "testdependencyclient.js", "page" : "$$config.baseUrl$$/" } }, - "testlazyloadclient" : { + "testlazyloadclient" : { "group" : "smoke,html5app", "params" : { "test" : "testlazyloadclient.js", @@ -270,160 +270,160 @@ "page" : "$$config.baseUrl$$/" } }, - "testclientpause" : { + "testclientpause" : { "group" : "smoke,html5app", "params" : { "test" : "testclientpause.js", "page" : "$$config.baseUrl$$/" } }, - "testsimplemodelclient" : { + "testsimplemodelclient" : { "group" : "smoke,html5app", "params" : { "test" : "testsimplemodelclient.js", "page" : "$$config.baseUrl$$/" } }, - "testmojitproxybroadcaststaticlistenall" : { + "testmojitproxybroadcaststaticlistenall" : { "group" : "smoke,html5app", "params" : { "test" : "testmojitproxybroadcaststaticlistenall.js", "page" : "$$config.baseUrl$$/" } }, - "testmojitproxybroadcaststaticlisten2" : { + "testmojitproxybroadcaststaticlisten2" : { "group" : "smoke,html5app", "params" : { "test" : "testmojitproxybroadcaststaticlisten2.js", "page" : "$$config.baseUrl$$/" } }, - "testmojitproxybroadcaststaticlisten1" : { + "testmojitproxybroadcaststaticlisten1" : { "group" : "smoke,html5app", "params" : { "test" : "testmojitproxybroadcaststaticlisten1.js", "page" : "$$config.baseUrl$$/" } }, - "testmojitproxybroadcaststaticlisten" : { + "testmojitproxybroadcaststaticlisten" : { "group" : "smoke,html5app", "params" : { "test" : "testmojitproxybroadcaststaticlisten.js", "page" : "$$config.baseUrl$$/" } }, - "testmojitproxybroadcastdynamic" : { + "testmojitproxybroadcastdynamic" : { "group" : "smoke,html5app", "params" : { "test" : "testmojitproxybroadcastdynamic.js", "page" : "$$config.baseUrl$$/" } }, - "testmojitproxyrender" : { + "testmojitproxyrender" : { "group" : "smoke,html5app", "params" : { "test" : "testmojitproxyrender.js", "page" : "$$config.baseUrl$$/?test=abc" } }, - "testmojitproxyrefreshview" : { + "testmojitproxyrefreshview" : { "group" : "smoke,html5app", "params" : { "test" : "testmojitproxyrefreshview.js", "page" : "$$config.baseUrl$$/" } }, - "testmojitproxygetid" : { + "testmojitproxygetid" : { "group" : "smoke,html5app", "params" : { "test" : "testmojitproxygetid.js", "page" : "$$config.baseUrl$$/" } }, - "testmojitproxygetfromurl" : { + "testmojitproxygetfromurl" : { "group" : "smoke,html5app", "params" : { "test" : "testmojitproxygetfromurl.js", "page" : "$$config.baseUrl$$/?test=abc" } }, - "testgetparamsclient" : { - "group" : "smoke,html5app", - "params" : { - "test" : "testgetparamsclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testgetparamssimpleclient" : { - "group" : "smoke,html5app", - "params" : { - "test" : "testgetparamssimpleclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testgetparamsbyvalueclient" : { - "group" : "smoke,html5app", - "params" : { - "test" : "testgetparamsbyvalueclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testgetparamsbyvaluesimpleclient" : { - "group" : "smoke,html5app", - "params" : { - "test" : "testgetparamsbyvaluesimpleclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testmergeparamsclient" : { - "group" : "smoke,html5app", - "params" : { - "test" : "testmergeparamsclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testmergeparamssimpleclient" : { - "group" : "smoke,html5app", - "params" : { - "test" : "testmergeparamssimpleclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testpostparamsclient" : { - "group" : "smoke,html5app", - "params" : { - "test" : "testpostparamsclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testpostparamssimpleclient" : { - "group" : "smoke,html5app", - "params" : { - "test" : "testpostparamssimpleclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testrouteparamsclient" : { - "group" : "smoke,html5app", - "params" : { - "test" : "testrouteparamsclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testrouteparamssimpleclient" : { - "group" : "smoke,html5app", - "params" : { - "test" : "testrouteparamssimpleclient.js", - "page" : "$$config.baseUrl$$/" - } - }, - "testbz5076119" : { - "group" : "smoke,html5app", - "params" : { - "test" : "testbz5076119.js", - "page" : "$$config.baseUrl$$/mytestpath/index.html" - } - } + "testgetparamsclient" : { + "group" : "smoke,html5app", + "params" : { + "test" : "testgetparamsclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testgetparamssimpleclient" : { + "group" : "smoke,html5app", + "params" : { + "test" : "testgetparamssimpleclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testgetparamsbyvalueclient" : { + "group" : "smoke,html5app", + "params" : { + "test" : "testgetparamsbyvalueclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testgetparamsbyvaluesimpleclient" : { + "group" : "smoke,html5app", + "params" : { + "test" : "testgetparamsbyvaluesimpleclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testmergeparamsclient" : { + "group" : "smoke,html5app", + "params" : { + "test" : "testmergeparamsclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testmergeparamssimpleclient" : { + "group" : "smoke,html5app", + "params" : { + "test" : "testmergeparamssimpleclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testpostparamsclient" : { + "group" : "smoke,html5app", + "params" : { + "test" : "testpostparamsclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testpostparamssimpleclient" : { + "group" : "smoke,html5app", + "params" : { + "test" : "testpostparamssimpleclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testrouteparamsclient" : { + "group" : "smoke,html5app", + "params" : { + "test" : "testrouteparamsclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testrouteparamssimpleclient" : { + "group" : "smoke,html5app", + "params" : { + "test" : "testrouteparamssimpleclient.js", + "page" : "$$config.baseUrl$$/" + } + }, + "testbz5076119" : { + "group" : "smoke,html5app", + "params" : { + "test" : "testbz5076119.js", + "page" : "$$config.baseUrl$$/mytestpath/index.html" + } + } } }, diff --git a/tests/func/common/testacmojitdone10client.js b/tests/func/common/testacmojitdone10client.js index 9f0ea83a7..b1d5235cc 100644 --- a/tests/func/common/testacmojitdone10client.js +++ b/tests/func/common/testacmojitdone10client.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone10client"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitdone10server.js b/tests/func/common/testacmojitdone10server.js index 19e31a299..b1e3c2992 100644 --- a/tests/func/common/testacmojitdone10server.js +++ b/tests/func/common/testacmojitdone10server.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone10server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitdone1client.js b/tests/func/common/testacmojitdone1client.js index 9c1d2201c..97cce25c5 100644 --- a/tests/func/common/testacmojitdone1client.js +++ b/tests/func/common/testacmojitdone1client.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone1client"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitdone1server.js b/tests/func/common/testacmojitdone1server.js index 8bf295851..dc27ae8e5 100644 --- a/tests/func/common/testacmojitdone1server.js +++ b/tests/func/common/testacmojitdone1server.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone1server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitdone2client.js b/tests/func/common/testacmojitdone2client.js index 9afb9c023..148d3d515 100644 --- a/tests/func/common/testacmojitdone2client.js +++ b/tests/func/common/testacmojitdone2client.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone2client"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitdone2server.js b/tests/func/common/testacmojitdone2server.js index 7fcc5c25d..12e7d5976 100644 --- a/tests/func/common/testacmojitdone2server.js +++ b/tests/func/common/testacmojitdone2server.js @@ -7,7 +7,7 @@ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone2server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitdone3client.js b/tests/func/common/testacmojitdone3client.js index 83ffb2f90..917bf8825 100644 --- a/tests/func/common/testacmojitdone3client.js +++ b/tests/func/common/testacmojitdone3client.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone3client"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitdone3server.js b/tests/func/common/testacmojitdone3server.js index a0d086f18..7a489427a 100644 --- a/tests/func/common/testacmojitdone3server.js +++ b/tests/func/common/testacmojitdone3server.js @@ -7,7 +7,7 @@ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: ACMojitDone3Server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitdone4client.js b/tests/func/common/testacmojitdone4client.js index 3270e40e2..9b0f000c7 100644 --- a/tests/func/common/testacmojitdone4client.js +++ b/tests/func/common/testacmojitdone4client.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone4client"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitdone4server.js b/tests/func/common/testacmojitdone4server.js index 2449d3d63..2a5763cca 100644 --- a/tests/func/common/testacmojitdone4server.js +++ b/tests/func/common/testacmojitdone4server.js @@ -7,7 +7,7 @@ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone4server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitdone5client.js b/tests/func/common/testacmojitdone5client.js index fe5f6d842..2c7ee1c85 100644 --- a/tests/func/common/testacmojitdone5client.js +++ b/tests/func/common/testacmojitdone5client.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone5client"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitdone5server.js b/tests/func/common/testacmojitdone5server.js index e2ba8aedb..6706e1935 100644 --- a/tests/func/common/testacmojitdone5server.js +++ b/tests/func/common/testacmojitdone5server.js @@ -7,7 +7,7 @@ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone5server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitdone6client.js b/tests/func/common/testacmojitdone6client.js index 24e2de5d9..0c3adc4c6 100644 --- a/tests/func/common/testacmojitdone6client.js +++ b/tests/func/common/testacmojitdone6client.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone6client"); suite.add(new Y.Test.Case({ "test acmojitdone6client": function() { diff --git a/tests/func/common/testacmojitdone6server.js b/tests/func/common/testacmojitdone6server.js index c5769a292..18e9b8c95 100644 --- a/tests/func/common/testacmojitdone6server.js +++ b/tests/func/common/testacmojitdone6server.js @@ -7,7 +7,7 @@ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone6server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitdone7client.js b/tests/func/common/testacmojitdone7client.js index 5dab95579..6a808a9ca 100644 --- a/tests/func/common/testacmojitdone7client.js +++ b/tests/func/common/testacmojitdone7client.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone7client"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitdone7server.js b/tests/func/common/testacmojitdone7server.js index de3c05d9b..5a353ca89 100644 --- a/tests/func/common/testacmojitdone7server.js +++ b/tests/func/common/testacmojitdone7server.js @@ -7,7 +7,7 @@ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone7server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitdone8client.js b/tests/func/common/testacmojitdone8client.js index 03babed64..4ad041169 100644 --- a/tests/func/common/testacmojitdone8client.js +++ b/tests/func/common/testacmojitdone8client.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone8client"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitdone8server.js b/tests/func/common/testacmojitdone8server.js index cee8ea038..94f2f56f4 100644 --- a/tests/func/common/testacmojitdone8server.js +++ b/tests/func/common/testacmojitdone8server.js @@ -7,7 +7,7 @@ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone8server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitdone9client.js b/tests/func/common/testacmojitdone9client.js index 4b1a82afa..c8d59063c 100644 --- a/tests/func/common/testacmojitdone9client.js +++ b/tests/func/common/testacmojitdone9client.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone9client"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitdone9server.js b/tests/func/common/testacmojitdone9server.js index 510ebe3c5..76cbc883e 100644 --- a/tests/func/common/testacmojitdone9server.js +++ b/tests/func/common/testacmojitdone9server.js @@ -7,7 +7,7 @@ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitdone9server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitflush10server.js b/tests/func/common/testacmojitflush10server.js index 73de2fdc5..88b2f793e 100644 --- a/tests/func/common/testacmojitflush10server.js +++ b/tests/func/common/testacmojitflush10server.js @@ -7,7 +7,7 @@ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: ACMojitFlush10Server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitflush1server.js b/tests/func/common/testacmojitflush1server.js index 83f6808e7..2f11f2e67 100644 --- a/tests/func/common/testacmojitflush1server.js +++ b/tests/func/common/testacmojitflush1server.js @@ -7,7 +7,7 @@ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitflush1server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitflush2server.js b/tests/func/common/testacmojitflush2server.js index 83aac137e..abbc17205 100644 --- a/tests/func/common/testacmojitflush2server.js +++ b/tests/func/common/testacmojitflush2server.js @@ -7,7 +7,7 @@ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitflush2server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitflush3server.js b/tests/func/common/testacmojitflush3server.js index 58f09b573..8f0482885 100644 --- a/tests/func/common/testacmojitflush3server.js +++ b/tests/func/common/testacmojitflush3server.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitflush3server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitflush4server.js b/tests/func/common/testacmojitflush4server.js index a5679776b..a06b92976 100644 --- a/tests/func/common/testacmojitflush4server.js +++ b/tests/func/common/testacmojitflush4server.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitflush4server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitflush5server.js b/tests/func/common/testacmojitflush5server.js index f57691394..005481e4f 100644 --- a/tests/func/common/testacmojitflush5server.js +++ b/tests/func/common/testacmojitflush5server.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitflush5server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitflush6server.js b/tests/func/common/testacmojitflush6server.js index fd9bfe572..f7fc9e071 100644 --- a/tests/func/common/testacmojitflush6server.js +++ b/tests/func/common/testacmojitflush6server.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitflush6server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitflush7server.js b/tests/func/common/testacmojitflush7server.js index ef8d472c7..36a80dc0c 100644 --- a/tests/func/common/testacmojitflush7server.js +++ b/tests/func/common/testacmojitflush7server.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitflush7server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitflush8server.js b/tests/func/common/testacmojitflush8server.js index 819d757b1..0e2c9bf74 100644 --- a/tests/func/common/testacmojitflush8server.js +++ b/tests/func/common/testacmojitflush8server.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitflush8server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitflush9server.js b/tests/func/common/testacmojitflush9server.js index 304ef7301..c84ba63ff 100644 --- a/tests/func/common/testacmojitflush9server.js +++ b/tests/func/common/testacmojitflush9server.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitflush9server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitflushdoneserver.js b/tests/func/common/testacmojitflushdoneserver.js index 6148c3720..4459b2865 100644 --- a/tests/func/common/testacmojitflushdoneserver.js +++ b/tests/func/common/testacmojitflushdoneserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitflushdoneserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitnoparamclient.js b/tests/func/common/testacmojitnoparamclient.js index fbde85499..9810c8018 100644 --- a/tests/func/common/testacmojitnoparamclient.js +++ b/tests/func/common/testacmojitnoparamclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acmojitnoparamclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacmojitserver.js b/tests/func/common/testacmojitserver.js index 4d5b5f9e8..2ebcae2a1 100644 --- a/tests/func/common/testacmojitserver.js +++ b/tests/func/common/testacmojitserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: ACMojitServer"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacpartialinvokeclient.js b/tests/func/common/testacpartialinvokeclient.js index 25bf722e5..6b9bfa727 100644 --- a/tests/func/common/testacpartialinvokeclient.js +++ b/tests/func/common/testacpartialinvokeclient.js @@ -7,11 +7,11 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: ACPartailRenderClient"); suite.add(new Y.Test.Case({ - "test test ACPartailRenderClient": function() { + "test ACPartailRenderClient": function() { var that = this; Y.one('#partialRenderButton').simulate('click'); that.wait(function(){ diff --git a/tests/func/common/testacpartialinvokeserver.js b/tests/func/common/testacpartialinvokeserver.js index e06faa3f7..7af946ff1 100644 --- a/tests/func/common/testacpartialinvokeserver.js +++ b/tests/func/common/testacpartialinvokeserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acpartialinvokeserver"); suite.add(new Y.Test.Case({ "test acpartialinvokeserver": function() { diff --git a/tests/func/common/testacpartialrenderclient.js b/tests/func/common/testacpartialrenderclient.js index 26615ceb5..d1ff81b0e 100644 --- a/tests/func/common/testacpartialrenderclient.js +++ b/tests/func/common/testacpartialrenderclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: ACPartailRenderClient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testacpartialrenderserver.js b/tests/func/common/testacpartialrenderserver.js index 225e7d439..8276e0635 100644 --- a/tests/func/common/testacpartialrenderserver.js +++ b/tests/func/common/testacpartialrenderserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: acpartailrenderserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testassetcsswithdefaultlocationbodyserver.js b/tests/func/common/testassetcsswithdefaultlocationbodyserver.js index cf766f4c5..fc90d2a59 100644 --- a/tests/func/common/testassetcsswithdefaultlocationbodyserver.js +++ b/tests/func/common/testassetcsswithdefaultlocationbodyserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: csswithdefaultlocationbodyserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testassetcsswithdefaultlocationclient.js b/tests/func/common/testassetcsswithdefaultlocationclient.js index e3466ef15..3e0aeb620 100644 --- a/tests/func/common/testassetcsswithdefaultlocationclient.js +++ b/tests/func/common/testassetcsswithdefaultlocationclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: assetcsswithdefaultlocationclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testassetcsswithdefaultlocationheaderserver.js b/tests/func/common/testassetcsswithdefaultlocationheaderserver.js index 836eb4ec5..e10546179 100644 --- a/tests/func/common/testassetcsswithdefaultlocationheaderserver.js +++ b/tests/func/common/testassetcsswithdefaultlocationheaderserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: csswithdefaultlocationheaderserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testassetcsswithlocationbodyserver.js b/tests/func/common/testassetcsswithlocationbodyserver.js index ba7ec7de7..84b2e1318 100644 --- a/tests/func/common/testassetcsswithlocationbodyserver.js +++ b/tests/func/common/testassetcsswithlocationbodyserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: csswithlocationbodyserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testassetcsswithlocationclient.js b/tests/func/common/testassetcsswithlocationclient.js index 850be8e72..8b46c2787 100644 --- a/tests/func/common/testassetcsswithlocationclient.js +++ b/tests/func/common/testassetcsswithlocationclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: assetcsswithlocationclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testassetcsswithlocationheaderserver.js b/tests/func/common/testassetcsswithlocationheaderserver.js index 6fcd3f5e7..b7d67a25f 100644 --- a/tests/func/common/testassetcsswithlocationheaderserver.js +++ b/tests/func/common/testassetcsswithlocationheaderserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: assetcsswithlocationheaderserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testassetjswithdefaultlocationbodyserver.js b/tests/func/common/testassetjswithdefaultlocationbodyserver.js index e117cc0c5..2e31854ce 100644 --- a/tests/func/common/testassetjswithdefaultlocationbodyserver.js +++ b/tests/func/common/testassetjswithdefaultlocationbodyserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: assetjswithdefaultlocationbodyserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testassetjswithdefaultlocationclient.js b/tests/func/common/testassetjswithdefaultlocationclient.js index d62f4b77f..3a870a830 100644 --- a/tests/func/common/testassetjswithdefaultlocationclient.js +++ b/tests/func/common/testassetjswithdefaultlocationclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: assetjswithdefaultlocationclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testassetjswithdefaultlocationheaderserver.js b/tests/func/common/testassetjswithdefaultlocationheaderserver.js index fcff65dfb..da04f4914 100644 --- a/tests/func/common/testassetjswithdefaultlocationheaderserver.js +++ b/tests/func/common/testassetjswithdefaultlocationheaderserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: assetjswithdefaultlocationheaderserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testassetjswithlocationbodyserver.js b/tests/func/common/testassetjswithlocationbodyserver.js index 2b3c10226..4b8e586ad 100644 --- a/tests/func/common/testassetjswithlocationbodyserver.js +++ b/tests/func/common/testassetjswithlocationbodyserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: assetjswithlocationbodyserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testassetjswithlocationclient.js b/tests/func/common/testassetjswithlocationclient.js index 9ed74ec89..ab2cf15f4 100644 --- a/tests/func/common/testassetjswithlocationclient.js +++ b/tests/func/common/testassetjswithlocationclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: assetjswithlocationclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testassetjswithlocationheaderserver.js b/tests/func/common/testassetjswithlocationheaderserver.js index ff2de3470..1f87bd345 100644 --- a/tests/func/common/testassetjswithlocationheaderserver.js +++ b/tests/func/common/testassetjswithlocationheaderserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: assetjswithLlocationheaderserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testassetwithdefaultlocationclient.js b/tests/func/common/testassetwithdefaultlocationclient.js index 9b3d98062..40eac3ab1 100644 --- a/tests/func/common/testassetwithdefaultlocationclient.js +++ b/tests/func/common/testassetwithdefaultlocationclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: assetswithdefaultlocationclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testassetwithdefaultlocationserver.js b/tests/func/common/testassetwithdefaultlocationserver.js index ed50ac5b2..be015a78c 100644 --- a/tests/func/common/testassetwithdefaultlocationserver.js +++ b/tests/func/common/testassetwithdefaultlocationserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: withdefaultlocationserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testassetwithlocationclient.js b/tests/func/common/testassetwithlocationclient.js index 9dfe0aa28..bca190f01 100644 --- a/tests/func/common/testassetwithlocationclient.js +++ b/tests/func/common/testassetwithlocationclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: assetswithlocationclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testassetwithlocationserver.js b/tests/func/common/testassetwithlocationserver.js index e996b0702..5735e17be 100644 --- a/tests/func/common/testassetwithlocationserver.js +++ b/tests/func/common/testassetwithlocationserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: assetwithlocationserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testbinderclient.js b/tests/func/common/testbinderclient.js index 4d7eeceb4..46f3c77f8 100644 --- a/tests/func/common/testbinderclient.js +++ b/tests/func/common/testbinderclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: binderclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testbinderserver.js b/tests/func/common/testbinderserver.js index 50e569fcb..ca47b59fa 100644 --- a/tests/func/common/testbinderserver.js +++ b/tests/func/common/testbinderserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: BinderAllServer"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testbz5076119.js b/tests/func/common/testbz5076119.js index 110eeb81e..f48aa11d0 100644 --- a/tests/func/common/testbz5076119.js +++ b/tests/func/common/testbz5076119.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: bz5076119"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testclientpause.js b/tests/func/common/testclientpause.js index e33dbda00..9c0c6989d 100644 --- a/tests/func/common/testclientpause.js +++ b/tests/func/common/testclientpause.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: clientpause"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testclientresume.js b/tests/func/common/testclientresume.js index 1035f889c..cd155a536 100644 --- a/tests/func/common/testclientresume.js +++ b/tests/func/common/testclientresume.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: clientresumefunc"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testcompositemojit1client.js b/tests/func/common/testcompositemojit1client.js index d19e8c571..ca3c30c9b 100644 --- a/tests/func/common/testcompositemojit1client.js +++ b/tests/func/common/testcompositemojit1client.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: compositemojit1client"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testcompositemojit1server.js b/tests/func/common/testcompositemojit1server.js index 8eaa65ac8..6558959a2 100644 --- a/tests/func/common/testcompositemojit1server.js +++ b/tests/func/common/testcompositemojit1server.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: compositemojit1server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testcompositemojit2client.js b/tests/func/common/testcompositemojit2client.js index 4caea8c39..2352dcc1c 100644 --- a/tests/func/common/testcompositemojit2client.js +++ b/tests/func/common/testcompositemojit2client.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: compositemojit2client"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testcompositemojit2server.js b/tests/func/common/testcompositemojit2server.js index c8002f4ed..fb93164be 100644 --- a/tests/func/common/testcompositemojit2server.js +++ b/tests/func/common/testcompositemojit2server.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: compositemojit2server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testcompositemojitclient.js b/tests/func/common/testcompositemojitclient.js index 1ece0c308..40007a222 100644 --- a/tests/func/common/testcompositemojitclient.js +++ b/tests/func/common/testcompositemojitclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'json-parse', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: compositemojitclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testcompositemojitrefresh1client.js b/tests/func/common/testcompositemojitrefresh1client.js index c2ada40da..62d91d0f9 100644 --- a/tests/func/common/testcompositemojitrefresh1client.js +++ b/tests/func/common/testcompositemojitrefresh1client.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: CompositeMojitRefresh1Client"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testcompositemojitrefreshclient.js b/tests/func/common/testcompositemojitrefreshclient.js index 2ad2dde0e..4e77d123b 100644 --- a/tests/func/common/testcompositemojitrefreshclient.js +++ b/tests/func/common/testcompositemojitrefreshclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: compositemojitrefreshclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testcompositemojitrefreshserver.js b/tests/func/common/testcompositemojitrefreshserver.js index 49f270719..41151ae6c 100644 --- a/tests/func/common/testcompositemojitrefreshserver.js +++ b/tests/func/common/testcompositemojitrefreshserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: compositemojitrefreshserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testcompositemojitserver.js b/tests/func/common/testcompositemojitserver.js index ebee6a3c0..6d1c89a75 100644 --- a/tests/func/common/testcompositemojitserver.js +++ b/tests/func/common/testcompositemojitserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: compositemojitserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testconfiginappfileclient.js b/tests/func/common/testconfiginappfileclient.js index a45f1c2c4..1ec504fed 100644 --- a/tests/func/common/testconfiginappfileclient.js +++ b/tests/func/common/testconfiginappfileclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: configinappfileclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testconfiginappfilecompclient.js b/tests/func/common/testconfiginappfilecompclient.js index 93aeafdc7..664a8b092 100644 --- a/tests/func/common/testconfiginappfilecompclient.js +++ b/tests/func/common/testconfiginappfilecompclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: configinappfilecompclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testconfiginappfilecompserver.js b/tests/func/common/testconfiginappfilecompserver.js index 299e70259..dab670211 100644 --- a/tests/func/common/testconfiginappfilecompserver.js +++ b/tests/func/common/testconfiginappfilecompserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: configinappfilecompserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testconfiginappfilenegclient.js b/tests/func/common/testconfiginappfilenegclient.js index e44313469..71b0e5c4f 100644 --- a/tests/func/common/testconfiginappfilenegclient.js +++ b/tests/func/common/testconfiginappfilenegclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: configinappfilenegclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testconfiginappfilenegserver.js b/tests/func/common/testconfiginappfilenegserver.js index aaa0bdf6b..c35769e42 100644 --- a/tests/func/common/testconfiginappfilenegserver.js +++ b/tests/func/common/testconfiginappfilenegserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: configinappfilenegserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testconfiginappfileserver.js b/tests/func/common/testconfiginappfileserver.js index 731bd7cd2..0bac97a5d 100644 --- a/tests/func/common/testconfiginappfileserver.js +++ b/tests/func/common/testconfiginappfileserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: configinappfileserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testconfigindefaultfileclient.js b/tests/func/common/testconfigindefaultfileclient.js index 8e507e911..21aa7a05f 100644 --- a/tests/func/common/testconfigindefaultfileclient.js +++ b/tests/func/common/testconfigindefaultfileclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: configindefaultfileclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testconfigindefaultfileserver.js b/tests/func/common/testconfigindefaultfileserver.js index 29b2a216a..243b4c548 100644 --- a/tests/func/common/testconfigindefaultfileserver.js +++ b/tests/func/common/testconfigindefaultfileserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: configindefaultfileserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testconfigindefinitionfileclient.js b/tests/func/common/testconfigindefinitionfileclient.js index 0a7344578..ef72ef557 100644 --- a/tests/func/common/testconfigindefinitionfileclient.js +++ b/tests/func/common/testconfigindefinitionfileclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: configindefinitionfileclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testconfigindefinitionfilenegclient.js b/tests/func/common/testconfigindefinitionfilenegclient.js index 605c2961b..def826fc7 100644 --- a/tests/func/common/testconfigindefinitionfilenegclient.js +++ b/tests/func/common/testconfigindefinitionfilenegclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: configindefinitionfilenegclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testconfigindefinitionfilenegserver.js b/tests/func/common/testconfigindefinitionfilenegserver.js index 8612919f4..14c93149a 100644 --- a/tests/func/common/testconfigindefinitionfilenegserver.js +++ b/tests/func/common/testconfigindefinitionfilenegserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: configindefinitionfilenegserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testconfigindefinitionfileserver.js b/tests/func/common/testconfigindefinitionfileserver.js index 12e9f0cf3..d957ebf46 100644 --- a/tests/func/common/testconfigindefinitionfileserver.js +++ b/tests/func/common/testconfigindefinitionfileserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: configindefinitionfileserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testcontrollercachingclient.js b/tests/func/common/testcontrollercachingclient.js index 84931da21..81fffa289 100644 --- a/tests/func/common/testcontrollercachingclient.js +++ b/tests/func/common/testcontrollercachingclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: testcontrollercachingclient"); suite.add(new Y.Test.Case({ @@ -15,18 +15,18 @@ YUI({ var that = this; Y.one('#myMojitsButton').simulate('click'); that.wait(function(){ - Y.all('#inputbox').item(1).set('value', "basketball"); - Y.all('#pitchbutton').item(1).simulate('click'); + Y.one('#inputbox.ballinput').set('value', "basketball"); + Y.one('#pitchbutton').simulate('click'); that.wait(function(){ Y.Assert.areEqual('pitched: basketball', Y.one('#ControllerCachingResult').get('innerHTML').match(/pitched: basketball/gi)); - Y.all('#retrievebutton').item(1).simulate('click'); + Y.one('#retrievebutton').simulate('click'); that.wait(function(){ Y.Assert.areEqual('ball: basketball', Y.one('#ControllerCachingResult').get('innerHTML').match(/ball: basketball/gi)); - Y.all('#inputbox').item(2).set('value', "softball"); - Y.all('#pitchbutton').item(2).simulate('click'); + Y.one('#inputbox.ballinput').set('value', "softball"); + Y.one('#pitchbutton').simulate('click'); that.wait(function(){ Y.Assert.areEqual('pitched: softball', Y.one('#ControllerCachingResult').get('innerHTML').match(/pitched: softball/gi)); - Y.all('#retrievebutton').item(2).simulate('click'); + Y.one('#retrievebutton').simulate('click'); that.wait(function(){ Y.Assert.areEqual('ball: softball', Y.one('#ControllerCachingResult').get('innerHTML').match(/ball: softball/gi)); }, 1000); diff --git a/tests/func/common/testdependencyclient.js b/tests/func/common/testdependencyclient.js index 46be4eeaf..c2d1b438d 100644 --- a/tests/func/common/testdependencyclient.js +++ b/tests/func/common/testdependencyclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: dependencyclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testdependencyserver.js b/tests/func/common/testdependencyserver.js index c73c9e5e7..b6666acf3 100644 --- a/tests/func/common/testdependencyserver.js +++ b/tests/func/common/testdependencyserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: dependencyserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testgetparamsbyvalueclient.js b/tests/func/common/testgetparamsbyvalueclient.js index b7ee253d2..ee5e96697 100644 --- a/tests/func/common/testgetparamsbyvalueclient.js +++ b/tests/func/common/testgetparamsbyvalueclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: getparamsbyvalueclient"); suite.add(new Y.Test.Case({ "test getparamsbyvalueclient": function() { diff --git a/tests/func/common/testgetparamsbyvalueserver.js b/tests/func/common/testgetparamsbyvalueserver.js index 9edd1cc9c..0ebb60fe8 100644 --- a/tests/func/common/testgetparamsbyvalueserver.js +++ b/tests/func/common/testgetparamsbyvalueserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: getparamsbyvalueserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testgetparamsbyvaluesimpleclient.js b/tests/func/common/testgetparamsbyvaluesimpleclient.js index 483197fad..ddfafe5e3 100644 --- a/tests/func/common/testgetparamsbyvaluesimpleclient.js +++ b/tests/func/common/testgetparamsbyvaluesimpleclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: getparamsbyvaluesimpleclient"); suite.add(new Y.Test.Case({ "test getparamsbyvaluesimpleclient": function() { diff --git a/tests/func/common/testgetparamsbyvaluesimpleserver.js b/tests/func/common/testgetparamsbyvaluesimpleserver.js index dbee9a1c4..c263f6027 100644 --- a/tests/func/common/testgetparamsbyvaluesimpleserver.js +++ b/tests/func/common/testgetparamsbyvaluesimpleserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: getparamsbyvaluesimpleserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testgetparamsclient.js b/tests/func/common/testgetparamsclient.js index d478f1ea5..1cdb17bdd 100644 --- a/tests/func/common/testgetparamsclient.js +++ b/tests/func/common/testgetparamsclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: getparamsclient"); suite.add(new Y.Test.Case({ "test getparamsclient": function() { diff --git a/tests/func/common/testgetparamsserver.js b/tests/func/common/testgetparamsserver.js index 2eb4bd982..35c41defa 100644 --- a/tests/func/common/testgetparamsserver.js +++ b/tests/func/common/testgetparamsserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: getparamsserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testgetparamssimpleclient.js b/tests/func/common/testgetparamssimpleclient.js index 475d9e6a5..818961d10 100644 --- a/tests/func/common/testgetparamssimpleclient.js +++ b/tests/func/common/testgetparamssimpleclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: getparamssimpleclient"); suite.add(new Y.Test.Case({ "test getparamssimpleclient": function() { diff --git a/tests/func/common/testgetparamssimpleserver.js b/tests/func/common/testgetparamssimpleserver.js index 74d48b255..d346fb893 100644 --- a/tests/func/common/testgetparamssimpleserver.js +++ b/tests/func/common/testgetparamssimpleserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: getparamssimpleserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testlazyloadclient.js b/tests/func/common/testlazyloadclient.js index ecf6d9028..2da61a4f0 100644 --- a/tests/func/common/testlazyloadclient.js +++ b/tests/func/common/testlazyloadclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'json-parse', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: lazyloadclient"); suite.add(new Y.Test.Case({ @@ -20,7 +20,7 @@ YUI({ try { finalLazyResult = Y.JSON.parse(finalLazyResultText); } catch (e) { - this.fail(); + Y.Assert.isTrue(false, 'Failed to parse JSON: ' + finalLazyResultText); } Y.Assert.areEqual('Lazy Loading', Y.one('#header1').get('innerHTML').match(/Lazy Loading/gi)); Y.Assert.areEqual('Defer:true', Y.one('#header2').get('innerHTML').match(/Defer:true/gi)); diff --git a/tests/func/common/testmergeparams1server.js b/tests/func/common/testmergeparams1server.js index 4c6935488..4a6d5b553 100644 --- a/tests/func/common/testmergeparams1server.js +++ b/tests/func/common/testmergeparams1server.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: mergeparams1server"); suite.add(new Y.Test.Case({ "test mergeparams1server": function() { diff --git a/tests/func/common/testmergeparamsclient.js b/tests/func/common/testmergeparamsclient.js index 742495c04..192ebdff3 100644 --- a/tests/func/common/testmergeparamsclient.js +++ b/tests/func/common/testmergeparamsclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: mergeparamsclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testmergeparamsserver.js b/tests/func/common/testmergeparamsserver.js index b049fbd06..23c6a81ef 100644 --- a/tests/func/common/testmergeparamsserver.js +++ b/tests/func/common/testmergeparamsserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: mergeparamsserver"); suite.add(new Y.Test.Case({ "test mergeparamsserver": function() { diff --git a/tests/func/common/testmergeparamssimple1server.js b/tests/func/common/testmergeparamssimple1server.js index 04ae6136a..02ed9340e 100644 --- a/tests/func/common/testmergeparamssimple1server.js +++ b/tests/func/common/testmergeparamssimple1server.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: mergeparamssimple1server"); suite.add(new Y.Test.Case({ "test mergeparamssimple1server": function() { diff --git a/tests/func/common/testmergeparamssimpleclient.js b/tests/func/common/testmergeparamssimpleclient.js index de7a977b0..f16701d9e 100644 --- a/tests/func/common/testmergeparamssimpleclient.js +++ b/tests/func/common/testmergeparamssimpleclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: mergeparamssimpleclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testmergeparamssimpleserver.js b/tests/func/common/testmergeparamssimpleserver.js index ee36b06a4..cbe77e112 100644 --- a/tests/func/common/testmergeparamssimpleserver.js +++ b/tests/func/common/testmergeparamssimpleserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: mergeparamssimpleserver"); suite.add(new Y.Test.Case({ "test mergeparamssimpleserver": function() { diff --git a/tests/func/common/testmobiledevicedefaultview.js b/tests/func/common/testmobiledevicedefaultview.js index b5ca3eaaf..3cd8805aa 100644 --- a/tests/func/common/testmobiledevicedefaultview.js +++ b/tests/func/common/testmobiledevicedefaultview.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: mobiledevicedefaultview"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testmobiledeviceiphoneview.js b/tests/func/common/testmobiledeviceiphoneview.js index 9db003b0d..f494b8b17 100644 --- a/tests/func/common/testmobiledeviceiphoneview.js +++ b/tests/func/common/testmobiledeviceiphoneview.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: mobiledeviceiphoneview"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testmobiledevicekindleview.js b/tests/func/common/testmobiledevicekindleview.js index f60dfd051..b7ba4c4ad 100644 --- a/tests/func/common/testmobiledevicekindleview.js +++ b/tests/func/common/testmobiledevicekindleview.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: mobiledevicekindleview"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testmojitproxybroadcastdynamic.js b/tests/func/common/testmojitproxybroadcastdynamic.js index 88ed01783..b63662fb1 100644 --- a/tests/func/common/testmojitproxybroadcastdynamic.js +++ b/tests/func/common/testmojitproxybroadcastdynamic.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: mojitproxybroadcastdynamic"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testmojitproxybroadcaststaticlisten.js b/tests/func/common/testmojitproxybroadcaststaticlisten.js index e396427ee..a3f08d948 100644 --- a/tests/func/common/testmojitproxybroadcaststaticlisten.js +++ b/tests/func/common/testmojitproxybroadcaststaticlisten.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: broadcaststaticlisten"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testmojitproxybroadcaststaticlisten1.js b/tests/func/common/testmojitproxybroadcaststaticlisten1.js index 37f82c783..a4c4d8be8 100644 --- a/tests/func/common/testmojitproxybroadcaststaticlisten1.js +++ b/tests/func/common/testmojitproxybroadcaststaticlisten1.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: broadcaststaticunlisten1"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testmojitproxybroadcaststaticlisten2.js b/tests/func/common/testmojitproxybroadcaststaticlisten2.js index 5ddc1c318..85c2d32bf 100644 --- a/tests/func/common/testmojitproxybroadcaststaticlisten2.js +++ b/tests/func/common/testmojitproxybroadcaststaticlisten2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: broadcaststaticunlisten2"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testmojitproxybroadcaststaticlistenall.js b/tests/func/common/testmojitproxybroadcaststaticlistenall.js index 20eaefdc2..c20176895 100644 --- a/tests/func/common/testmojitproxybroadcaststaticlistenall.js +++ b/tests/func/common/testmojitproxybroadcaststaticlistenall.js @@ -7,11 +7,11 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: broadcaststaticlistenall"); suite.add(new Y.Test.Case({ - "test broadcaststaticunlistenall": function() { + "test broadcaststaticlistenall": function() { var that = this; Y.one('#staticButton').simulate('click'); that.wait(function(){ diff --git a/tests/func/common/testmojitproxydestroychild.js b/tests/func/common/testmojitproxydestroychild.js index ab79c55ef..b49557862 100644 --- a/tests/func/common/testmojitproxydestroychild.js +++ b/tests/func/common/testmojitproxydestroychild.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: mojitproxydestroychild"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testmojitproxygetfromurl.js b/tests/func/common/testmojitproxygetfromurl.js index 97b79477b..40c971482 100644 --- a/tests/func/common/testmojitproxygetfromurl.js +++ b/tests/func/common/testmojitproxygetfromurl.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: mojitproxygetfromurl"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testmojitproxygetid.js b/tests/func/common/testmojitproxygetid.js index 70ad0dd8f..844e77556 100644 --- a/tests/func/common/testmojitproxygetid.js +++ b/tests/func/common/testmojitproxygetid.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: mojitproxygetid"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testmojitproxyrefreshview.js b/tests/func/common/testmojitproxyrefreshview.js index 75f681b83..199adfcaf 100644 --- a/tests/func/common/testmojitproxyrefreshview.js +++ b/tests/func/common/testmojitproxyrefreshview.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: mojitproxyrefreshview"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testmojitproxyrender.js b/tests/func/common/testmojitproxyrender.js index f3a9f6bc8..8b6a187dc 100644 --- a/tests/func/common/testmojitproxyrender.js +++ b/tests/func/common/testmojitproxyrender.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: mojitproxyrender"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testpostparams1server.js b/tests/func/common/testpostparams1server.js index 9ef37816f..ee9234394 100644 --- a/tests/func/common/testpostparams1server.js +++ b/tests/func/common/testpostparams1server.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: postparams1server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testpostparamsclient.js b/tests/func/common/testpostparamsclient.js index 18be39f08..defda7fbf 100644 --- a/tests/func/common/testpostparamsclient.js +++ b/tests/func/common/testpostparamsclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: postparamsclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testpostparamsserver.js b/tests/func/common/testpostparamsserver.js index 36fd6ae5a..fd73dbaf2 100644 --- a/tests/func/common/testpostparamsserver.js +++ b/tests/func/common/testpostparamsserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: PostParamsServer"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testpostparamssimple1server.js b/tests/func/common/testpostparamssimple1server.js index 6903eb5a8..f7147832f 100644 --- a/tests/func/common/testpostparamssimple1server.js +++ b/tests/func/common/testpostparamssimple1server.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: postparamssimple1server"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testpostparamssimpleclient.js b/tests/func/common/testpostparamssimpleclient.js index 0c5ccb8c2..350b22444 100644 --- a/tests/func/common/testpostparamssimpleclient.js +++ b/tests/func/common/testpostparamssimpleclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: postparamssimpleclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testpostparamssimpleserver.js b/tests/func/common/testpostparamssimpleserver.js index f81e79c65..77498efca 100644 --- a/tests/func/common/testpostparamssimpleserver.js +++ b/tests/func/common/testpostparamssimpleserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: postparamssimpleserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testrouteparamsclient.js b/tests/func/common/testrouteparamsclient.js index 66464b9bb..ffae4bd82 100644 --- a/tests/func/common/testrouteparamsclient.js +++ b/tests/func/common/testrouteparamsclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: routeparamsclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testrouteparamsserver.js b/tests/func/common/testrouteparamsserver.js index 568307916..8c62d8804 100644 --- a/tests/func/common/testrouteparamsserver.js +++ b/tests/func/common/testrouteparamsserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: routeparamsserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testrouteparamssimpleclient.js b/tests/func/common/testrouteparamssimpleclient.js index cda262a6c..c2ef5d234 100644 --- a/tests/func/common/testrouteparamssimpleclient.js +++ b/tests/func/common/testrouteparamssimpleclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: routeparamssimpleclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testrouteparamssimpleserver.js b/tests/func/common/testrouteparamssimpleserver.js index 56d211df0..498be0b0d 100644 --- a/tests/func/common/testrouteparamssimpleserver.js +++ b/tests/func/common/testrouteparamssimpleserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: routeparamssimpleserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testsimplemodelclient.js b/tests/func/common/testsimplemodelclient.js index e40cfda3b..53c0fc76d 100644 --- a/tests/func/common/testsimplemodelclient.js +++ b/tests/func/common/testsimplemodelclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: simplemodelclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/testsimplemodelserver.js b/tests/func/common/testsimplemodelserver.js index b3d275390..593519df5 100644 --- a/tests/func/common/testsimplemodelserver.js +++ b/tests/func/common/testsimplemodelserver.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: simplemodelserver"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/teststatefulclient.js b/tests/func/common/teststatefulclient.js index 0b0e66244..4ce130c87 100644 --- a/tests/func/common/teststatefulclient.js +++ b/tests/func/common/teststatefulclient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Common"); + var suite = new Y.Test.Suite("Common: statefulclient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/common/yui-test.js b/tests/func/common/yui-test.js deleted file mode 100644 index 882c91b0c..000000000 --- a/tests/func/common/yui-test.js +++ /dev/null @@ -1,1105 +0,0 @@ -YUI.add("test", function (b) { - b.namespace("Test"); - b.Test.Case = function (c) { - this._should = {}; - for (var d in c) { - this[d] = c[d]; - } - if (!b.Lang.isString(this.name)) { - this.name = "testCase" + b.guid(); - } - }; - b.Test.Case.prototype = {resume:function (c) { - b.Test.Runner.resume(c); - }, wait:function (e, d) { - var c = arguments; - if (b.Lang.isFunction(c[0])) { - throw new b.Test.Wait(c[0], c[1]); - } else { - throw new b.Test.Wait(function () { - b.Assert.fail("Timeout: wait() called but resume() never called."); - }, (b.Lang.isNumber(c[0]) ? c[0] : 10000)); - } - }, setUp:function () { - }, tearDown:function () { - }}; - b.Test.Wait = function (d, c) { - this.segment = (b.Lang.isFunction(d) ? d : null); - this.delay = (b.Lang.isNumber(c) ? c : 0); - }; - b.namespace("Test"); - b.Test.Suite = function (c) { - this.name = ""; - this.items = []; - if (b.Lang.isString(c)) { - this.name = c; - } else { - if (b.Lang.isObject(c)) { - b.mix(this, c, true); - } - } - if (this.name === "") { - this.name = "testSuite" + b.guid(); - } - }; - b.Test.Suite.prototype = {add:function (c) { - if (c instanceof b.Test.Suite || c instanceof b.Test.Case) { - this.items.push(c); - } - return this; - }, setUp:function () { - }, tearDown:function () { - }}; - b.Test.Runner = (function () { - function d(e) { - this.testObject = e; - this.firstChild = null; - this.lastChild = null; - this.parent = null; - this.next = null; - this.results = {passed:0, failed:0, total:0, ignored:0, duration:0}; - if (e instanceof b.Test.Suite) { - this.results.type = "testsuite"; - this.results.name = e.name; - } else { - if (e instanceof b.Test.Case) { - this.results.type = "testcase"; - this.results.name = e.name; - } - } - } - - d.prototype = {appendChild:function (e) { - var f = new d(e); - if (this.firstChild === null) { - this.firstChild = this.lastChild = f; - } else { - this.lastChild.next = f; - this.lastChild = f; - } - f.parent = this; - return f; - }}; - function c() { - c.superclass.constructor.apply(this, arguments); - this.masterSuite = new b.Test.Suite("yuitests" + (new Date()).getTime()); - this._cur = null; - this._root = null; - this._log = true; - this._waiting = false; - this._running = false; - this._lastResults = null; - var f = [this.TEST_CASE_BEGIN_EVENT, this.TEST_CASE_COMPLETE_EVENT, this.TEST_SUITE_BEGIN_EVENT, this.TEST_SUITE_COMPLETE_EVENT, this.TEST_PASS_EVENT, this.TEST_FAIL_EVENT, this.TEST_IGNORE_EVENT, this.COMPLETE_EVENT, this.BEGIN_EVENT]; - for (var e = 0; e < f.length; e++) { - this.on(f[e], this._logEvent, this, true); - } - } - - b.extend(c, b.Event.Target, {TEST_CASE_BEGIN_EVENT:"testcasebegin", TEST_CASE_COMPLETE_EVENT:"testcasecomplete", TEST_SUITE_BEGIN_EVENT:"testsuitebegin", TEST_SUITE_COMPLETE_EVENT:"testsuitecomplete", TEST_PASS_EVENT:"pass", TEST_FAIL_EVENT:"fail", TEST_IGNORE_EVENT:"ignore", COMPLETE_EVENT:"complete", BEGIN_EVENT:"begin", disableLogging:function () { - this._log = false; - }, enableLogging:function () { - this._log = true; - }, _logEvent:function (g) { - var f = ""; - var e = ""; - switch (g.type) { - case this.BEGIN_EVENT: - f = "Testing began at " + (new Date()).toString() + "."; - e = "info"; - break; - case this.COMPLETE_EVENT: - f = b.substitute("Testing completed at " + (new Date()).toString() + ".\n" + "Passed:{passed} Failed:{failed} " + "Total:{total} ({ignored} ignored)", g.results); - e = "info"; - break; - case this.TEST_FAIL_EVENT: - f = g.testName + ": failed.\n" + g.error.getMessage(); - e = "fail"; - break; - case this.TEST_IGNORE_EVENT: - f = g.testName + ": ignored."; - e = "ignore"; - break; - case this.TEST_PASS_EVENT: - f = g.testName + ": passed."; - e = "pass"; - break; - case this.TEST_SUITE_BEGIN_EVENT: - f = 'Test suite "' + g.testSuite.name + '" started.'; - e = "info"; - break; - case this.TEST_SUITE_COMPLETE_EVENT: - f = b.substitute('Test suite "' + g.testSuite.name + '" completed' + ".\n" + "Passed:{passed} Failed:{failed} " + "Total:{total} ({ignored} ignored)", g.results); - e = "info"; - break; - case this.TEST_CASE_BEGIN_EVENT: - f = 'Test case "' + g.testCase.name + '" started.'; - e = "info"; - break; - case this.TEST_CASE_COMPLETE_EVENT: - f = b.substitute('Test case "' + g.testCase.name + '" completed.\n' + "Passed:{passed} Failed:{failed} " + "Total:{total} ({ignored} ignored)", g.results); - e = "info"; - break; - default: - f = "Unexpected event " + g.type; - f = "info"; - } - if (this._log) { - b.log(f, e, "TestRunner"); - } - }, _addTestCaseToTestTree:function (f, g) { - var h = f.appendChild(g), i, e; - for (i in g) { - if ((i.indexOf("test") === 0 || (i.toLowerCase().indexOf("should") > -1 && i.indexOf(" ") > -1)) && b.Lang.isFunction(g[i])) { - h.appendChild(i); - } - } - }, _addTestSuiteToTestTree:function (e, h) { - var g = e.appendChild(h); - for (var f = 0; f < h.items.length; f++) { - if (h.items[f] instanceof b.Test.Suite) { - this._addTestSuiteToTestTree(g, h.items[f]); - } else { - if (h.items[f] instanceof b.Test.Case) { - this._addTestCaseToTestTree(g, h.items[f]); - } - } - } - }, _buildTestTree:function () { - this._root = new d(this.masterSuite); - for (var e = 0; e < this.masterSuite.items.length; e++) { - if (this.masterSuite.items[e] instanceof b.Test.Suite) { - this._addTestSuiteToTestTree(this._root, this.masterSuite.items[e]); - } else { - if (this.masterSuite.items[e] instanceof b.Test.Case) { - this._addTestCaseToTestTree(this._root, this.masterSuite.items[e]); - } - } - } - }, _handleTestObjectComplete:function (e) { - if (b.Lang.isObject(e.testObject)) { - if (e.parent) { - e.parent.results.passed += e.results.passed; - e.parent.results.failed += e.results.failed; - e.parent.results.total += e.results.total; - e.parent.results.ignored += e.results.ignored; - e.parent.results[e.testObject.name] = e.results; - } - if (e.testObject instanceof b.Test.Suite) { - e.testObject.tearDown(); - e.results.duration = (new Date()) - e._start; - this.fire(this.TEST_SUITE_COMPLETE_EVENT, {testSuite:e.testObject, results:e.results}); - } else { - if (e.testObject instanceof b.Test.Case) { - e.results.duration = (new Date()) - e._start; - this.fire(this.TEST_CASE_COMPLETE_EVENT, {testCase:e.testObject, results:e.results}); - } - } - } - }, _next:function () { - if (this._cur === null) { - this._cur = this._root; - } else { - if (this._cur.firstChild) { - this._cur = this._cur.firstChild; - } else { - if (this._cur.next) { - this._cur = this._cur.next; - } else { - while (this._cur && !this._cur.next && this._cur !== this._root) { - this._handleTestObjectComplete(this._cur); - this._cur = this._cur.parent; - } - this._handleTestObjectComplete(this._cur); - if (this._cur == this._root) { - this._cur.results.type = "report"; - this._cur.results.timestamp = (new Date()).toLocaleString(); - this._cur.results.duration = (new Date()) - this._cur._start; - this._lastResults = this._cur.results; - this._running = false; - this.fire(this.COMPLETE_EVENT, {results:this._lastResults}); - this._cur = null; - } else { - this._cur = this._cur.next; - } - } - } - } - return this._cur; - }, _run:function () { - var g = false; - var f = this._next(); - if (f !== null) { - this._running = true; - this._lastResult = null; - var e = f.testObject; - if (b.Lang.isObject(e)) { - if (e instanceof b.Test.Suite) { - this.fire(this.TEST_SUITE_BEGIN_EVENT, {testSuite:e}); - f._start = new Date(); - e.setUp(); - } else { - if (e instanceof b.Test.Case) { - this.fire(this.TEST_CASE_BEGIN_EVENT, {testCase:e}); - f._start = new Date(); - } - } - if (typeof setTimeout != "undefined") { - setTimeout(function () { - b.Test.Runner._run(); - }, 0); - } else { - this._run(); - } - } else { - this._runTest(f); - } - } - }, _resumeTest:function (j) { - var e = this._cur; - this._waiting = false; - if (!e) { - return; - } - var k = e.testObject; - var h = e.parent.testObject; - if (h.__yui_wait) { - clearTimeout(h.__yui_wait); - delete h.__yui_wait; - } - var n = (h._should.fail || {})[k]; - var f = (h._should.error || {})[k]; - var i = false; - var l = null; - try { - j.apply(h); - if (n) { - l = new b.Assert.ShouldFail(); - i = true; - } else { - if (f) { - l = new b.Assert.ShouldError(); - i = true; - } - } - } catch (m) { - if (h.__yui_wait) { - clearTimeout(h.__yui_wait); - delete h.__yui_wait; - } - if (m instanceof b.Assert.Error) { - if (!n) { - l = m; - i = true; - } - } else { - if (m instanceof b.Test.Wait) { - if (b.Lang.isFunction(m.segment)) { - if (b.Lang.isNumber(m.delay)) { - if (typeof setTimeout != "undefined") { - h.__yui_wait = setTimeout(function () { - b.Test.Runner._resumeTest(m.segment); - }, m.delay); - this._waiting = true; - } else { - throw new Error("Asynchronous tests not supported in this environment."); - } - } - } - return; - } else { - if (!f) { - l = new b.Assert.UnexpectedError(m); - i = true; - } else { - if (b.Lang.isString(f)) { - if (m.message != f) { - l = new b.Assert.UnexpectedError(m); - i = true; - } - } else { - if (b.Lang.isFunction(f)) { - if (!(m instanceof f)) { - l = new b.Assert.UnexpectedError(m); - i = true; - } - } else { - if (b.Lang.isObject(f)) { - if (!(m instanceof f.constructor) || m.message != f.message) { - l = new b.Assert.UnexpectedError(m); - i = true; - } - } - } - } - } - } - } - } - if (i) { - this.fire(this.TEST_FAIL_EVENT, {testCase:h, testName:k, error:l}); - } else { - this.fire(this.TEST_PASS_EVENT, {testCase:h, testName:k}); - } - h.tearDown(); - var g = (new Date()) - e._start; - e.parent.results[k] = {result:i ? "fail" : "pass", message:l ? l.getMessage() : "Test passed", type:"test", name:k, duration:g}; - if (i) { - e.parent.results.failed++; - } else { - e.parent.results.passed++; - } - e.parent.results.total++; - if (typeof setTimeout != "undefined") { - setTimeout(function () { - b.Test.Runner._run(); - }, 0); - } else { - this._run(); - } - }, _handleError:function (e) { - if (this._waiting) { - this._resumeTest(function () { - throw e; - }); - } else { - throw e; - } - }, _runTest:function (h) { - var e = h.testObject; - var f = h.parent.testObject; - var i = f[e]; - var g = (f._should.ignore || {})[e]; - if (g) { - h.parent.results[e] = {result:"ignore", message:"Test ignored", type:"test", name:e}; - h.parent.results.ignored++; - h.parent.results.total++; - this.fire(this.TEST_IGNORE_EVENT, {testCase:f, testName:e}); - if (typeof setTimeout != "undefined") { - setTimeout(function () { - b.Test.Runner._run(); - }, 0); - } else { - this._run(); - } - } else { - h._start = new Date(); - f.setUp(); - this._resumeTest(i); - } - }, getName:function () { - return this.masterSuite.name; - }, setName:function (e) { - this.masterSuite.name = e; - }, fire:function (e, f) { - f = f || {}; - f.type = e; - c.superclass.fire.call(this, e, f); - }, add:function (e) { - this.masterSuite.add(e); - return this; - }, clear:function () { - this.masterSuite = new b.Test.Suite("yuitests" + (new Date()).getTime()); - }, isWaiting:function () { - return this._waiting; - }, isRunning:function () { - return this._running; - }, getResults:function (e) { - if (!this._running && this._lastResults) { - if (b.Lang.isFunction(e)) { - return e(this._lastResults); - } else { - return this._lastResults; - } - } else { - return null; - } - }, getCoverage:function (e) { - if (!this._running && typeof _yuitest_coverage == "object") { - if (b.Lang.isFunction(e)) { - return e(_yuitest_coverage); - } else { - return _yuitest_coverage; - } - } else { - return null; - } - }, resume:function (e) { - if (b.Test.Runner._waiting) { - this._resumeTest(e || function () { - }); - } else { - throw new Error("resume() called without wait()."); - } - }, run:function (e) { - var f = b.Test.Runner; - if (!e && this.masterSuite.items.length == 1 && this.masterSuite.items[0] instanceof b.Test.Suite) { - this.masterSuite = this.masterSuite.items[0]; - } - f._buildTestTree(); - f._root._start = new Date(); - f.fire(f.BEGIN_EVENT); - f._run(); - }}); - return new c(); - })(); - b.Assert = {_asserts:0, _formatMessage:function (d, c) { - var e = d; - if (b.Lang.isString(d) && d.length > 0) { - return b.Lang.substitute(d, {message:c}); - } else { - return c; - } - }, _getCount:function () { - return this._asserts; - }, _increment:function () { - this._asserts++; - }, _reset:function () { - this._asserts = 0; - }, fail:function (c) { - throw new b.Assert.Error(b.Assert._formatMessage(c, "Test force-failed.")); - }, areEqual:function (d, e, c) { - b.Assert._increment(); - if (d != e) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Values should be equal."), d, e); - } - }, areNotEqual:function (c, e, d) { - b.Assert._increment(); - if (c == e) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(d, "Values should not be equal."), c); - } - }, areNotSame:function (c, e, d) { - b.Assert._increment(); - if (c === e) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(d, "Values should not be the same."), c); - } - }, areSame:function (d, e, c) { - b.Assert._increment(); - if (d !== e) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Values should be the same."), d, e); - } - }, isFalse:function (d, c) { - b.Assert._increment(); - if (false !== d) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be false."), false, d); - } - }, isTrue:function (d, c) { - b.Assert._increment(); - if (true !== d) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be true."), true, d); - } - }, isNaN:function (d, c) { - b.Assert._increment(); - if (!isNaN(d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be NaN."), NaN, d); - } - }, isNotNaN:function (d, c) { - b.Assert._increment(); - if (isNaN(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Values should not be NaN."), NaN); - } - }, isNotNull:function (d, c) { - b.Assert._increment(); - if (b.Lang.isNull(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Values should not be null."), null); - } - }, isNotUndefined:function (d, c) { - b.Assert._increment(); - if (b.Lang.isUndefined(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should not be undefined."), undefined); - } - }, isNull:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isNull(d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be null."), null, d); - } - }, isUndefined:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isUndefined(d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be undefined."), undefined, d); - } - }, isArray:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isArray(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be an array."), d); - } - }, isBoolean:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isBoolean(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a Boolean."), d); - } - }, isFunction:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isFunction(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a function."), d); - } - }, isInstanceOf:function (d, e, c) { - b.Assert._increment(); - if (!(e instanceof d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value isn't an instance of expected type."), d, e); - } - }, isNumber:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isNumber(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a number."), d); - } - }, isObject:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isObject(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be an object."), d); - } - }, isString:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isString(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a string."), d); - } - }, isTypeOf:function (c, e, d) { - b.Assert._increment(); - if (typeof e != c) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(d, "Value should be of type " + c + "."), expected, typeof e); - } - }}; - b.assert = function (d, c) { - b.Assert._increment(); - if (!d) { - throw new b.Assert.Error(b.Assert._formatMessage(c, "Assertion failed.")); - } - }; - b.fail = b.Assert.fail; - b.Assert.Error = function (c) { - arguments.callee.superclass.constructor.call(this, c); - this.message = c; - this.name = "Assert Error"; - }; - b.extend(b.Assert.Error, Error, {getMessage:function () { - return this.message; - }, toString:function () { - return this.name + ": " + this.getMessage(); - }, valueOf:function () { - return this.toString(); - }}); - b.Assert.ComparisonFailure = function (d, c, e) { - arguments.callee.superclass.constructor.call(this, d); - this.expected = c; - this.actual = e; - this.name = "ComparisonFailure"; - }; - b.extend(b.Assert.ComparisonFailure, b.Assert.Error, {getMessage:function () { - return this.message + "\nExpected: " + this.expected + " (" + (typeof this.expected) + ")" + "\nActual: " + this.actual + " (" + (typeof this.actual) + ")"; - }}); - b.Assert.UnexpectedValue = function (d, c) { - arguments.callee.superclass.constructor.call(this, d); - this.unexpected = c; - this.name = "UnexpectedValue"; - }; - b.extend(b.Assert.UnexpectedValue, b.Assert.Error, {getMessage:function () { - return this.message + "\nUnexpected: " + this.unexpected + " (" + (typeof this.unexpected) + ") "; - }}); - b.Assert.ShouldFail = function (c) { - arguments.callee.superclass.constructor.call(this, c || "This test should fail but didn't."); - this.name = "ShouldFail"; - }; - b.extend(b.Assert.ShouldFail, b.Assert.Error); - b.Assert.ShouldError = function (c) { - arguments.callee.superclass.constructor.call(this, c || "This test should have thrown an error but didn't."); - this.name = "ShouldError"; - }; - b.extend(b.Assert.ShouldError, b.Assert.Error); - b.Assert.UnexpectedError = function (c) { - arguments.callee.superclass.constructor.call(this, "Unexpected error: " + c.message); - this.cause = c; - this.name = "UnexpectedError"; - this.stack = c.stack; - }; - b.extend(b.Assert.UnexpectedError, b.Assert.Error); - b.ArrayAssert = {contains:function (e, d, c) { - b.Assert._increment(); - if (b.Array.indexOf(d, e) == -1) { - b.Assert.fail(b.Assert._formatMessage(c, "Value " + e + " (" + (typeof e) + ") not found in array [" + d + "].")); - } - }, containsItems:function (e, f, d) { - b.Assert._increment(); - for (var c = 0; c < e.length; c++) { - if (b.Array.indexOf(f, e[c]) == -1) { - b.Assert.fail(b.Assert._formatMessage(d, "Value " + e[c] + " (" + (typeof e[c]) + ") not found in array [" + f + "].")); - } - } - }, containsMatch:function (e, d, c) { - b.Assert._increment(); - if (typeof e != "function") { - throw new TypeError("ArrayAssert.containsMatch(): First argument must be a function."); - } - if (!b.Array.some(d, e)) { - b.Assert.fail(b.Assert._formatMessage(c, "No match found in array [" + d + "].")); - } - }, doesNotContain:function (e, d, c) { - b.Assert._increment(); - if (b.Array.indexOf(d, e) > -1) { - b.Assert.fail(b.Assert._formatMessage(c, "Value found in array [" + d + "].")); - } - }, doesNotContainItems:function (e, f, d) { - b.Assert._increment(); - for (var c = 0; c < e.length; c++) { - if (b.Array.indexOf(f, e[c]) > -1) { - b.Assert.fail(b.Assert._formatMessage(d, "Value found in array [" + f + "].")); - } - } - }, doesNotContainMatch:function (e, d, c) { - b.Assert._increment(); - if (typeof e != "function") { - throw new TypeError("ArrayAssert.doesNotContainMatch(): First argument must be a function."); - } - if (b.Array.some(d, e)) { - b.Assert.fail(b.Assert._formatMessage(c, "Value found in array [" + d + "].")); - } - }, indexOf:function (g, f, c, e) { - b.Assert._increment(); - for (var d = 0; d < f.length; d++) { - if (f[d] === g) { - if (c != d) { - b.Assert.fail(b.Assert._formatMessage(e, "Value exists at index " + d + " but should be at index " + c + ".")); - } - return; - } - } - b.Assert.fail(b.Assert._formatMessage(e, "Value doesn't exist in array [" + f + "].")); - }, itemsAreEqual:function (e, f, d) { - b.Assert._increment(); - if (e.length != f.length) { - b.Assert.fail(b.Assert._formatMessage(d, "Array should have a length of " + e.length + " but has a length of " + f.length)); - } - for (var c = 0; c < e.length; c++) { - if (e[c] != f[c]) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(d, "Values in position " + c + " are not equal."), e[c], f[c]); - } - } - }, itemsAreEquivalent:function (f, g, c, e) { - b.Assert._increment(); - if (typeof c != "function") { - throw new TypeError("ArrayAssert.itemsAreEquivalent(): Third argument must be a function."); - } - if (f.length != g.length) { - b.Assert.fail(b.Assert._formatMessage(e, "Array should have a length of " + f.length + " but has a length of " + g.length)); - } - for (var d = 0; d < f.length; d++) { - if (!c(f[d], g[d])) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(e, "Values in position " + d + " are not equivalent."), f[d], g[d]); - } - } - }, isEmpty:function (d, c) { - b.Assert._increment(); - if (d.length > 0) { - b.Assert.fail(b.Assert._formatMessage(c, "Array should be empty.")); - } - }, isNotEmpty:function (d, c) { - b.Assert._increment(); - if (d.length === 0) { - b.Assert.fail(b.Assert._formatMessage(c, "Array should not be empty.")); - } - }, itemsAreSame:function (e, f, d) { - b.Assert._increment(); - if (e.length != f.length) { - b.Assert.fail(b.Assert._formatMessage(d, "Array should have a length of " + e.length + " but has a length of " + f.length)); - } - for (var c = 0; c < e.length; c++) { - if (e[c] !== f[c]) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(d, "Values in position " + c + " are not the same."), e[c], f[c]); - } - } - }, lastIndexOf:function (g, f, c, e) { - for (var d = f.length; d >= 0; d--) { - if (f[d] === g) { - if (c != d) { - b.Assert.fail(b.Assert._formatMessage(e, "Value exists at index " + d + " but should be at index " + c + ".")); - } - return; - } - } - b.Assert.fail(b.Assert._formatMessage(e, "Value doesn't exist in array.")); - }}; - b.ObjectAssert = {areEqual:function (d, e, c) { - b.Assert._increment(); - b.Object.each(d, function (g, f) { - if (d[f] != e[f]) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Values should be equal for property " + f), d[f], e[f]); - } - }); - }, hasKey:function (c, d, e) { - b.Assert._increment(); - if (!(c in d)) { - b.fail(b.Assert._formatMessage(e, "Property '" + c + "' not found on object.")); - } - }, hasKeys:function (e, c, f) { - b.Assert._increment(); - for (var d = 0; d < e.length; d++) { - if (!(e[d] in c)) { - b.fail(b.Assert._formatMessage(f, "Property '" + e[d] + "' not found on object.")); - } - } - }, ownsKey:function (c, d, e) { - b.Assert._increment(); - if (!d.hasOwnProperty(c)) { - b.fail(b.Assert._formatMessage(e, "Property '" + c + "' not found on object instance.")); - } - }, ownsKeys:function (e, c, f) { - b.Assert._increment(); - for (var d = 0; d < e.length; d++) { - if (!c.hasOwnProperty(e[d])) { - b.fail(b.Assert._formatMessage(f, "Property '" + e[d] + "' not found on object instance.")); - } - } - }, ownsNoKeys:function (c, e) { - b.Assert._increment(); - var d = b.Object.keys(c); - if (d.length > 0) { - b.fail(b.Assert._formatMessage(e, "Object owns " + d.length + " properties but should own none.")); - } - }}; - b.DateAssert = {datesAreEqual:function (d, f, c) { - b.Assert._increment(); - if (d instanceof Date && f instanceof Date) { - var e = ""; - if (d.getFullYear() != f.getFullYear()) { - e = "Years should be equal."; - } - if (d.getMonth() != f.getMonth()) { - e = "Months should be equal."; - } - if (d.getDate() != f.getDate()) { - e = "Days of month should be equal."; - } - if (e.length) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, e), d, f); - } - } else { - throw new TypeError("Y.Assert.datesAreEqual(): Expected and actual values must be Date objects."); - } - }, timesAreEqual:function (d, f, c) { - b.Assert._increment(); - if (d instanceof Date && f instanceof Date) { - var e = ""; - if (d.getHours() != f.getHours()) { - e = "Hours should be equal."; - } - if (d.getMinutes() != f.getMinutes()) { - e = "Minutes should be equal."; - } - if (d.getSeconds() != f.getSeconds()) { - e = "Seconds should be equal."; - } - if (e.length) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, e), d, f); - } - } else { - throw new TypeError("DateY.AsserttimesAreEqual(): Expected and actual values must be Date objects."); - } - }}; - b.namespace("Test.Format"); - function a(c) { - return c.replace(/[<>"'&]/g, function (d) { - switch (d) { - case"<": - return"<"; - case">": - return">"; - case'"': - return"""; - case"'": - return"'"; - case"&": - return"&"; - } - }); - } - - b.Test.Format.JSON = function (c) { - return b.JSON.stringify(c); - }; - b.Test.Format.XML = function (d) { - function c(g) { - var e = b.Lang, f = "<" + g.type + ' name="' + a(g.name) + '"'; - if (e.isNumber(g.duration)) { - f += ' duration="' + g.duration + '"'; - } - if (g.type == "test") { - f += ' result="' + g.result + '" message="' + a(g.message) + '">'; - } else { - f += ' passed="' + g.passed + '" failed="' + g.failed + '" ignored="' + g.ignored + '" total="' + g.total + '">'; - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += c(h); - } - }); - } - f += ""; - return f; - } - - return'' + c(d); - }; - b.Test.Format.JUnitXML = function (c) { - function d(g) { - var e = b.Lang, f = ""; - switch (g.type) { - case"test": - if (g.result != "ignore") { - f = ''; - if (g.result == "fail") { - f += '"; - } - f += ""; - } - break; - case"testcase": - f = ''; - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += d(h); - } - }); - f += ""; - break; - case"testsuite": - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += d(h); - } - }); - break; - case"report": - f = ""; - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += d(h); - } - }); - f += ""; - } - return f; - } - - return'' + d(c); - }; - b.Test.Format.TAP = function (d) { - var e = 1; - - function c(g) { - var f = b.Lang, h = ""; - switch (g.type) { - case"test": - if (g.result != "ignore") { - h = "ok " + (e++) + " - " + g.name; - if (g.result == "fail") { - h = "not " + h + " - " + g.message; - } - h += "\n"; - } else { - h = "#Ignored test " + g.name + "\n"; - } - break; - case"testcase": - h = "#Begin testcase " + g.name + "(" + g.failed + " failed of " + g.total + ")\n"; - b.Object.each(g, function (i) { - if (f.isObject(i) && !f.isArray(i)) { - h += c(i); - } - }); - h += "#End testcase " + g.name + "\n"; - break; - case"testsuite": - h = "#Begin testsuite " + g.name + "(" + g.failed + " failed of " + g.total + ")\n"; - b.Object.each(g, function (i) { - if (f.isObject(i) && !f.isArray(i)) { - h += c(i); - } - }); - h += "#End testsuite " + g.name + "\n"; - break; - case"report": - b.Object.each(g, function (i) { - if (f.isObject(i) && !f.isArray(i)) { - h += c(i); - } - }); - } - return h; - } - - return"1.." + d.total + "\n" + c(d); - }; - b.namespace("Coverage.Format"); - b.Coverage.Format.JSON = function (c) { - return b.JSON.stringify(c); - }; - b.Coverage.Format.XdebugJSON = function (d) { - var c = {}; - b.Object.each(d, function (f, e) { - c[e] = d[e].lines; - }); - return b.JSON.stringify(c); - }; - b.namespace("Test"); - b.Test.Reporter = function (c, d) { - this.url = c; - this.format = d || b.Test.Format.XML; - this._fields = new Object(); - this._form = null; - this._iframe = null; - }; - b.Test.Reporter.prototype = {constructor:b.Test.Reporter, addField:function (c, d) { - this._fields[c] = d; - }, clearFields:function () { - this._fields = new Object(); - }, destroy:function () { - if (this._form) { - this._form.parentNode.removeChild(this._form); - this._form = null; - } - if (this._iframe) { - this._iframe.parentNode.removeChild(this._iframe); - this._iframe = null; - } - this._fields = null; - }, report:function (d) { - if (!this._form) { - this._form = document.createElement("form"); - this._form.method = "post"; - this._form.style.visibility = "hidden"; - this._form.style.position = "absolute"; - this._form.style.top = 0; - document.body.appendChild(this._form); - var c = document.createElement("div"); - c.innerHTML = ''; - this._iframe = c.firstChild; - this._iframe.src = "javascript:false"; - this._iframe.style.visibility = "hidden"; - this._iframe.style.position = "absolute"; - this._iframe.style.top = 0; - document.body.appendChild(this._iframe); - this._form.target = "yuiTestTarget"; - } - this._form.action = this.url; - while (this._form.hasChildNodes()) { - this._form.removeChild(this._form.lastChild); - } - this._fields.results = this.format(d); - this._fields.useragent = navigator.userAgent; - this._fields.timestamp = (new Date()).toLocaleString(); - b.Object.each(this._fields, function (f, g) { - if (typeof f != "function") { - var e = document.createElement("input"); - e.type = "hidden"; - e.name = g; - e.value = f; - this._form.appendChild(e); - } - }, this); - delete this._fields.results; - delete this._fields.useragent; - delete this._fields.timestamp; - if (arguments[1] !== false) { - this._form.submit(); - } - }}; - b.Mock = function (e) { - e = e || {}; - var c = null; - try { - c = b.Object(e); - } catch (d) { - c = {}; - b.log("Couldn't create mock with prototype.", "warn", "Mock"); - } - b.Object.each(e, function (f) { - if (b.Lang.isFunction(e[f])) { - c[f] = function () { - b.Assert.fail("Method " + f + "() was called but was not expected to be."); - }; - } - }); - return c; - }; - b.Mock.expect = function (d, h) { - if (!d.__expectations) { - d.__expectations = {}; - } - if (h.method) { - var g = h.method, f = h.args || h.arguments || [], c = h.returns, j = b.Lang.isNumber(h.callCount) ? h.callCount : 1, e = h.error, i = h.run || function () { - }; - d.__expectations[g] = h; - h.callCount = j; - h.actualCallCount = 0; - b.Array.each(f, function (k, l, m) { - if (!(m[l] instanceof b.Mock.Value)) { - m[l] = b.Mock.Value(b.Assert.areSame, [k], "Argument " + l + " of " + g + "() is incorrect."); - } - }); - if (j > 0) { - d[g] = function () { - try { - h.actualCallCount++; - b.Assert.areEqual(f.length, arguments.length, "Method " + g + "() passed incorrect number of arguments."); - for (var m = 0, k = f.length; m < k; m++) { - f[m].verify(arguments[m]); - } - i.apply(this, arguments); - if (e) { - throw e; - } - } catch (l) { - b.Test.Runner._handleError(l); - } - return c; - }; - } else { - d[g] = function () { - try { - b.Assert.fail("Method " + g + "() should not have been called."); - } catch (k) { - b.Test.Runner._handleError(k); - } - }; - } - } else { - if (h.property) { - d.__expectations[g] = h; - } - } - }; - b.Mock.verify = function (c) { - try { - b.Object.each(c.__expectations, function (e) { - if (e.method) { - b.Assert.areEqual(e.callCount, e.actualCallCount, "Method " + e.method + "() wasn't called the expected number of times."); - } else { - if (e.property) { - b.Assert.areEqual(e.value, c[e.property], "Property " + e.property + " wasn't set to the correct value."); - } - } - }); - } catch (d) { - b.Test.Runner._handleError(d); - } - }; - b.Mock.Value = function (e, c, d) { - if (b.instanceOf(this, b.Mock.Value)) { - this.verify = function (g) { - var f = [].concat(c || []); - f.push(g); - f.push(d); - e.apply(null, f); - }; - } else { - return new b.Mock.Value(e, c, d); - } - }; - b.Mock.Value.Any = b.Mock.Value(function () { - }); - b.Mock.Value.Boolean = b.Mock.Value(b.Assert.isBoolean); - b.Mock.Value.Number = b.Mock.Value(b.Assert.isNumber); - b.Mock.Value.String = b.Mock.Value(b.Assert.isString); - b.Mock.Value.Object = b.Mock.Value(b.Assert.isObject); - b.Mock.Value.Function = b.Mock.Value(b.Assert.isFunction); - if (typeof YUITest == "undefined" || !YUITest) { - YUITest = {TestRunner:b.Test.Runner, ResultsFormat:b.Test.Format, CoverageFormat:b.Coverage.Format}; - } -}, "3.4.1", {requires:["event-simulate", "event-custom", "substitute", "json-stringify"]}); diff --git a/tests/func/config/configtest_descriptor.json b/tests/func/config/configtest_descriptor.json index d7de7060b..f5f5bb67b 100755 --- a/tests/func/config/configtest_descriptor.json +++ b/tests/func/config/configtest_descriptor.json @@ -4,7 +4,8 @@ "name" : "config", - + "commonlib" : "../../base/yui-test.js", + "config" :{ "baseUrl" : "http://localhost" }, @@ -17,119 +18,119 @@ "page" : "$$config.baseUrl$$:5000" } }, - "DefaultConfig2" : { + "DefaultConfig2" : { "group" : "functional,smoke,config", "params" : { "test" : "testDefaultConfig2.js", "page" : "$$config.baseUrl$$:5000/?lang=de" } }, - "DefaultConfig3" : { + "DefaultConfig3" : { "group" : "functional,smoke,config", "params" : { "test" : "testDefaultConfig3.js", "page" : "$$config.baseUrl$$:5000/?lang=fr" } }, - "DefaultConfig4" : { + "DefaultConfig4" : { "group" : "functional,smoke,config", "params" : { "test" : "testDefaultConfig4.js", "page" : "$$config.baseUrl$$:5000/?subject=math" } }, - "ProdEnv1" : { + "ProdEnv1" : { "group" : "functional,smoke,config", "params" : { "test" : "testproductionenv1.js", "page" : "$$config.baseUrl$$:5001" } }, - "ProdEnv2" : { + "ProdEnv2" : { "group" : "functional,smoke,config", "params" : { "test" : "testproductionenv2.js", "page" : "$$config.baseUrl$$:5001/?lang=de" } }, - "TestingEnv1" : { + "TestingEnv1" : { "group" : "functional,smoke,config", "params" : { "test" : "testtestingenv1.js", "page" : "$$config.baseUrl$$:5002/" } }, - "TestingEnv2" : { + "TestingEnv2" : { "group" : "functional,smoke,config", "params" : { "test" : "testtestingenv2.js", "page" : "$$config.baseUrl$$:5002/?lang=de" } }, - "TestingEnv3" : { + "TestingEnv3" : { "group" : "functional,smoke,config", "params" : { "test" : "testtestingenv3.js", "page" : "$$config.baseUrl$$:5002/?lang=fr" } }, - "TestingEnv4" : { + "TestingEnv4" : { "group" : "functional,smoke,config", "params" : { "test" : "testtestingenv4.js", "page" : "$$config.baseUrl$$:5002/?lang=fr-CA" } }, - "TestingEnv5" : { + "TestingEnv5" : { "group" : "functional,smoke,config", "params" : { "test" : "testtestingenv5.js", "page" : "$$config.baseUrl$$:5002/?subject=math" } }, - "TestingEnv6" : { + "TestingEnv6" : { "group" : "functional,smoke,config", "params" : { "test" : "testtestingenv6.js", "page" : "$$config.baseUrl$$:5002/?subject=math&lang=de" } }, - "MathEnv1" : { + "MathEnv1" : { "group" : "functional,smoke,config", "params" : { "test" : "testmathenv1.js", "page" : "$$config.baseUrl$$:5003/" } }, - "MathEnv2" : { + "MathEnv2" : { "group" : "functional,smoke,config", "params" : { "test" : "testmathenv2.js", - "page" : "$$config.baseUrl$:5003/?subject=chemistry&lang=fr" + "page" : "$$config.baseUrl$$:5003/?subject=chemistry&lang=fr" } }, - "ChemEnv1" : { + "ChemEnv1" : { "group" : "functional,smoke,config", "params" : { "test" : "testchemenv1.js", "page" : "$$config.baseUrl$$:5004/" } }, - "ChemEnv2" : { + "ChemEnv2" : { "group" : "functional,smoke,config", "params" : { "test" : "testchemenv2.js", "page" : "$$config.baseUrl$$:5004/?lang=fr" } }, - "MathEnv1" : { + "MathDe" : { "group" : "functional,smoke,config", "params" : { "test" : "testmathde.js", "page" : "$$config.baseUrl$$:5005/" } }, - "MathEnv2" : { + "TestFr" : { "group" : "functional,smoke,config", "params" : { "test" : "testfr.js", diff --git a/tests/func/config/testDefaultConfig1.js b/tests/func/config/testDefaultConfig1.js index 8d021a6e2..d82d2098a 100644 --- a/tests/func/config/testDefaultConfig1.js +++ b/tests/func/config/testDefaultConfig1.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Config"); + var suite = new Y.Test.Suite("Config: DefaultConfig1"); suite.add(new Y.Test.Case({ "test DefaultConfig1": function(){ diff --git a/tests/func/config/testDefaultConfig2.js b/tests/func/config/testDefaultConfig2.js index 6499ce0eb..3b3c097ae 100644 --- a/tests/func/config/testDefaultConfig2.js +++ b/tests/func/config/testDefaultConfig2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Config"); + var suite = new Y.Test.Suite("Config: DefaultConfig2"); suite.add(new Y.Test.Case({ "test DefaultConfig2": function(){ diff --git a/tests/func/config/testDefaultConfig3.js b/tests/func/config/testDefaultConfig3.js index b6042a104..ead68e372 100644 --- a/tests/func/config/testDefaultConfig3.js +++ b/tests/func/config/testDefaultConfig3.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Config"); + var suite = new Y.Test.Suite("Config: DefaultConfig3"); suite.add(new Y.Test.Case({ "test DefaultConfig3": function(){ diff --git a/tests/func/config/testDefaultConfig4.js b/tests/func/config/testDefaultConfig4.js index cb7e528e7..bcf1b5c97 100644 --- a/tests/func/config/testDefaultConfig4.js +++ b/tests/func/config/testDefaultConfig4.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Config"); + var suite = new Y.Test.Suite("Config: DefaultConfig4"); suite.add(new Y.Test.Case({ "test DefaultConfig4": function(){ diff --git a/tests/func/config/testchemenv1.js b/tests/func/config/testchemenv1.js index 53b200e1f..9503200e0 100644 --- a/tests/func/config/testchemenv1.js +++ b/tests/func/config/testchemenv1.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Config"); + var suite = new Y.Test.Suite("Config: ChemEnv1"); suite.add(new Y.Test.Case({ "test ChemEnv1": function(){ diff --git a/tests/func/config/testchemenv2.js b/tests/func/config/testchemenv2.js index 143dcefb7..e1ee60fbd 100644 --- a/tests/func/config/testchemenv2.js +++ b/tests/func/config/testchemenv2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Config"); + var suite = new Y.Test.Suite("Config: ChemEnv2"); suite.add(new Y.Test.Case({ "test ChemEnv2": function(){ diff --git a/tests/func/config/testfr.js b/tests/func/config/testfr.js index 9403bc006..c8abd4f94 100644 --- a/tests/func/config/testfr.js +++ b/tests/func/config/testfr.js @@ -7,10 +7,10 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Config"); + var suite = new Y.Test.Suite("Config: testfr"); suite.add(new Y.Test.Case({ - "test mathde": function(){ + "test fr": function(){ Y.Assert.areEqual('This is from application.json:environment:testing', Y.one('#myenv').get('innerHTML')); Y.Assert.areEqual('This is from defaults.json:master', Y.one('#mysubject').get('innerHTML')); Y.Assert.areEqual('This is from application.json:environment:testing,lang:fr', Y.one('#mylang').get('innerHTML')); diff --git a/tests/func/config/testmathde.js b/tests/func/config/testmathde.js index 99a7135ae..5b96781d9 100644 --- a/tests/func/config/testmathde.js +++ b/tests/func/config/testmathde.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Config"); + var suite = new Y.Test.Suite("Config: mathde"); suite.add(new Y.Test.Case({ "test mathde": function(){ diff --git a/tests/func/config/testmathenv1.js b/tests/func/config/testmathenv1.js index 711f985a1..8fb8f4bdc 100644 --- a/tests/func/config/testmathenv1.js +++ b/tests/func/config/testmathenv1.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Config"); + var suite = new Y.Test.Suite("Config: MathEnv1"); suite.add(new Y.Test.Case({ "test MathEnv1": function(){ diff --git a/tests/func/config/testmathenv2.js b/tests/func/config/testmathenv2.js index c23775b03..8499c6555 100644 --- a/tests/func/config/testmathenv2.js +++ b/tests/func/config/testmathenv2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Config"); + var suite = new Y.Test.Suite("Config: MathEnv2"); suite.add(new Y.Test.Case({ "test MathEnv2": function(){ diff --git a/tests/func/config/testproductionenv1.js b/tests/func/config/testproductionenv1.js index 9a6d23f0a..10347eda6 100644 --- a/tests/func/config/testproductionenv1.js +++ b/tests/func/config/testproductionenv1.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Config"); + var suite = new Y.Test.Suite("Config: ProdEnv1"); suite.add(new Y.Test.Case({ "test ProdEnv1": function(){ diff --git a/tests/func/config/testproductionenv2.js b/tests/func/config/testproductionenv2.js index 511041b30..ad251ee17 100644 --- a/tests/func/config/testproductionenv2.js +++ b/tests/func/config/testproductionenv2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Config"); + var suite = new Y.Test.Suite("Config: ProdEnv2"); suite.add(new Y.Test.Case({ "test ProdEnv2": function(){ diff --git a/tests/func/config/testtestingenv1.js b/tests/func/config/testtestingenv1.js index 85cd32e89..9c253eaa8 100644 --- a/tests/func/config/testtestingenv1.js +++ b/tests/func/config/testtestingenv1.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Config"); + var suite = new Y.Test.Suite("Config: TestingEnv1"); suite.add(new Y.Test.Case({ "test TestingEnv1": function(){ diff --git a/tests/func/config/testtestingenv2.js b/tests/func/config/testtestingenv2.js index 7623382d7..96845430e 100644 --- a/tests/func/config/testtestingenv2.js +++ b/tests/func/config/testtestingenv2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Config"); + var suite = new Y.Test.Suite("Config: TestingEnv2"); suite.add(new Y.Test.Case({ "test TestingEnv2": function(){ diff --git a/tests/func/config/testtestingenv3.js b/tests/func/config/testtestingenv3.js index 50ae01b4f..98ff68ffe 100644 --- a/tests/func/config/testtestingenv3.js +++ b/tests/func/config/testtestingenv3.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Config"); + var suite = new Y.Test.Suite("Config: TestingEnv3"); suite.add(new Y.Test.Case({ "test TestingEnv3": function(){ diff --git a/tests/func/config/testtestingenv4.js b/tests/func/config/testtestingenv4.js index fdd8ed830..a723d644e 100644 --- a/tests/func/config/testtestingenv4.js +++ b/tests/func/config/testtestingenv4.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Config"); + var suite = new Y.Test.Suite("Config: TestingEnv4"); suite.add(new Y.Test.Case({ "test TestingEnv4": function(){ diff --git a/tests/func/config/testtestingenv5.js b/tests/func/config/testtestingenv5.js index 8f4f0ae89..0f322fedd 100644 --- a/tests/func/config/testtestingenv5.js +++ b/tests/func/config/testtestingenv5.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Config"); + var suite = new Y.Test.Suite("Config: TestingEnv5"); suite.add(new Y.Test.Case({ "test TestingEnv5": function(){ diff --git a/tests/func/config/testtestingenv6.js b/tests/func/config/testtestingenv6.js index efa81cbaf..e2cf62b5b 100644 --- a/tests/func/config/testtestingenv6.js +++ b/tests/func/config/testtestingenv6.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Config"); + var suite = new Y.Test.Suite("Config: TestingEnv6"); suite.add(new Y.Test.Case({ "test TestingEnv6": function(){ diff --git a/tests/func/examples/developerguide/developerguide_descriptor.json b/tests/func/examples/developerguide/developerguide_descriptor.json index 4a2cd8ee0..39608d0a5 100755 --- a/tests/func/examples/developerguide/developerguide_descriptor.json +++ b/tests/func/examples/developerguide/developerguide_descriptor.json @@ -3,9 +3,9 @@ "settings": [ "master" ], "name" : "developerguide", - - "commonlib" : "yui-test.js", - + + "commonlib" : "../../../base/yui-test.js", + "config" :{ "baseUrl" : "http://localhost" }, @@ -14,237 +14,237 @@ "bindingevents" : { "group" : "developerguide,bindingevents", "params" : { - "scenario": [ + "scenario": [ { - "test" : "test_binding_events.js", - "page" : "$$config.baseUrl$$:4103/" + "test" : "test_binding_events.js", + "page" : "$$config.baseUrl$$:4103/" }, { "controller": "locator", - "params": { - "value": "#nav a", - "click": true - } + "params": { + "value": "#nav a", + "click": true + } + }, + { + "test" : "test_binding_events2.js" }, - { - "test" : "test_binding_events2.js" - }, - { + { "controller": "locator", - "params": { - "value": "#nav a", - "click": true - } + "params": { + "value": "#nav a", + "click": true + } }, - { - "test" : "test_binding_events.js" - } + { + "test" : "test_binding_events.js" + } ] } }, - "configurebinding" : { - "group" : "developerguide,configurebinding", - "params" : { + "configurebinding" : { + "group" : "developerguide,configurebinding", + "params" : { "test" : "test_configure_routing.js", "page" : "$$config.baseUrl$$:4098/" } }, - "deviceassets" : { - "group" : "developerguide,deviceassets", - "params" : { - "test" : "test_device_assets.js", - "page" : "$$config.baseUrl$$:4093/" - } + "deviceassets" : { + "group" : "developerguide,deviceassets", + "params" : { + "test" : "test_device_assets.js", + "page" : "$$config.baseUrl$$:4093/" + } }, - "deviceviews" : { - "group" : "developerguide,deviceviews", - "params" : { - "scenario": [ - { - "test" : "test_device_views.js", - "page" : "$$config.baseUrl$$:4117/", - "testName": "Default" - }, - { - "test" : "test_device_views.js", - "page" : "$$config.baseUrl$$:4117/?device=iphone", - "testName": "iPhone" - }, - { - "test" : "test_device_views.js", - "page" : "$$config.baseUrl$$:4117/?device=android", - "testName": "Android" - }, - { - "test" : "test_device_views.js", - "page" : "$$config.baseUrl$$:4117/?device=blackberry", - "testName": "BlackBerry" - } - ] - } + "deviceviews" : { + "group" : "developerguide,deviceviews", + "params" : { + "scenario": [ + { + "test" : "test_device_views.js", + "page" : "$$config.baseUrl$$:4117/", + "testName": "Default" + }, + { + "test" : "test_device_views.js", + "page" : "$$config.baseUrl$$:4117/?device=iphone", + "testName": "iPhone" + }, + { + "test" : "test_device_views.js", + "page" : "$$config.baseUrl$$:4117/?device=android", + "testName": "Android" + }, + { + "test" : "test_device_views.js", + "page" : "$$config.baseUrl$$:4117/?device=blackberry", + "testName": "BlackBerry" + } + ] + } }, - "framedassets" : { - "group" : "developerguide,framedassets", - "params" : { - "test" : "test_framed_assets.js", - "page" : "$$config.baseUrl$$:4092/" - } + "framedassets" : { + "group" : "developerguide,framedassets", + "params" : { + "test" : "test_framed_assets.js", + "page" : "$$config.baseUrl$$:4092/" + } }, - "framedconfig" : { - "group" : "developerguide,framedconfig", - "params" : { - "test" : "test_framed_config.js", - "page" : "$$config.baseUrl$$:4118/" - } + "framedconfig" : { + "group" : "developerguide,framedconfig", + "params" : { + "test" : "test_framed_config.js", + "page" : "$$config.baseUrl$$:4118/" + } }, - "globalassets" : { - "group" : "developerguide,globalassets", - "params" : { - "test" : "test_global_assets.js", - "page" : "$$config.baseUrl$$:4122/" - } + "globalassets" : { + "group" : "developerguide,globalassets", + "params" : { + "test" : "test_global_assets.js", + "page" : "$$config.baseUrl$$:4122/" + } }, - "hello" : { - "group" : "developerguide,hello", - "params" : { - "test" : "test_hello.js", - "page" : "$$config.baseUrl$$:4086/" - } + "hello" : { + "group" : "developerguide,hello", + "params" : { + "test" : "test_hello.js", + "page" : "$$config.baseUrl$$:4086/" + } }, - "htmlframe" : { - "group" : "developerguide,htmlframe", - "params" : { - "test" : "test_htmlframe.js", - "page" : "$$config.baseUrl$$:4089/" - } + "htmlframe" : { + "group" : "developerguide,htmlframe", + "params" : { + "test" : "test_htmlframe.js", + "page" : "$$config.baseUrl$$:4089/" + } }, - "innermojit" : { - "group" : "developerguide,innermojit", - "params" : { - "test" : "test_innermojit.js", - "page" : "$$config.baseUrl$$:4095/" - } + "innermojit" : { + "group" : "developerguide,innermojit", + "params" : { + "test" : "test_innermojit.js", + "page" : "$$config.baseUrl$$:4095/" + } }, - "i18n" : { - "group" : "developerguide,i18n", - "params" : { - "scenario": [ - { - "test" : "test_locale_i18n.js", - "page" : "$$config.baseUrl$$:4101/", - "testName": "Default" - }, - { - "test" : "test_locale_i18n.js", - "page" : "$$config.baseUrl$$:4101/?lang=en-AU", - "testName": "en-AU" - }, - { - "test" : "test_locale_i18n.js", - "page" : "$$config.baseUrl$$:4101/?lang=fr-FR", - "testName": "fr-FR" - } - ] - } + "i18n" : { + "group" : "developerguide,i18n", + "params" : { + "scenario": [ + { + "test" : "test_locale_i18n.js", + "page" : "$$config.baseUrl$$:4101/", + "testName": "Default" + }, + { + "test" : "test_locale_i18n.js", + "page" : "$$config.baseUrl$$:4101/?lang=en-AU", + "testName": "en-AU" + }, + { + "test" : "test_locale_i18n.js", + "page" : "$$config.baseUrl$$:4101/?lang=fr-FR", + "testName": "fr-FR" + } + ] + } }, - "modelyql" : { - "group" : "developerguide,modelyql", - "params" : { - "scenario": [ - { - "test" : "test_modelyql.js", - "page" : "$$config.baseUrl$$:4094/" - }, - { - "controller": "locator", - "params": { - "value": "a", - "click": true - } - }, - { - "test" : "test_modelyql.js" - } - ] - } + "modelyql" : { + "group" : "developerguide,modelyql", + "params" : { + "scenario": [ + { + "test" : "test_modelyql.js", + "page" : "$$config.baseUrl$$:4094/" + }, + { + "controller": "locator", + "params": { + "value": "a", + "click": true + } + }, + { + "test" : "test_modelyql.js" + } + ] + } }, - "multiplemojit" : { - "group" : "developerguide,multiplemojit", - "params" : { - "test" : "test_multiplemojit.js", - "page" : "$$config.baseUrl$$:4096/" - } + "multiplemojit" : { + "group" : "developerguide,multiplemojit", + "params" : { + "test" : "test_multiplemojit.js", + "page" : "$$config.baseUrl$$:4096/" + } }, - "scrollview" : { - "group" : "developerguide,scrollview", - "params" : { - "test" : "test_scrollview.js", - "page" : "$$config.baseUrl$$:4090/" - } + "scrollview" : { + "group" : "developerguide,scrollview", + "params" : { + "test" : "test_scrollview.js", + "page" : "$$config.baseUrl$$:4090/" + } }, - "simpleassets" : { - "group" : "developerguide,simpleassets", - "params" : { - "test" : "test_simple_assets.js", - "page" : "$$config.baseUrl$$:4091/" - } + "simpleassets" : { + "group" : "developerguide,simpleassets", + "params" : { + "test" : "test_simple_assets.js", + "page" : "$$config.baseUrl$$:4091/" + } }, - "simpleconfig" : { - "group" : "developerguide,simpleconfig", - "params" : { - "test" : "test_simple_config.js", - "page" : "$$config.baseUrl$$:4097/" - } + "simpleconfig" : { + "group" : "developerguide,simpleconfig", + "params" : { + "test" : "test_simple_config.js", + "page" : "$$config.baseUrl$$:4097/" + } }, - "simplelogging" : { - "group" : "developerguide,simplelogging", - "params" : { - "test" : "test_simple_logging.js", - "page" : "$$config.baseUrl$$:4120/" - } + "simplelogging" : { + "group" : "developerguide,simplelogging", + "params" : { + "test" : "test_simple_logging.js", + "page" : "$$config.baseUrl$$:4120/" + } }, - "simpleview" : { - "group" : "developerguide,simpleview", - "params" : { - "test" : "test_simple_view.js", - "page" : "$$config.baseUrl$$:4087/" - } + "simpleview" : { + "group" : "developerguide,simpleview", + "params" : { + "test" : "test_simple_view.js", + "page" : "$$config.baseUrl$$:4087/" + } }, - "unittestmodelcontroller" : { - "group" : "developerguide,unittestmodelcontroller", - "params" : { - "test" : "test_unittest_model_controller.js", - "page" : "$$config.baseUrl$$:4123/" - } + "unittestmodelcontroller" : { + "group" : "developerguide,unittestmodelcontroller", + "params" : { + "test" : "test_unittest_model_controller.js", + "page" : "$$config.baseUrl$$:4123/" + } }, - "usingconfigs" : { - "group" : "developerguide,usingconfigs", + "usingconfigs" : { + "group" : "developerguide,usingconfigs", "params" : { - "scenario": [ + "scenario": [ { - "test" : "test_using_configs.js", - "page" : "$$config.baseUrl$$:4124/" + "test" : "test_using_configs.js", + "page" : "$$config.baseUrl$$:4124/" }, - { - "test" : "test_using_configs2.js", - "page" : "$$config.baseUrl$$:4124/booyah" - } + { + "test" : "test_using_configs2.js", + "page" : "$$config.baseUrl$$:4124/booyah" + } ] } - }, - "usingparameters" : { - "group" : "developerguide,usingparameters", - "params" : { - "test" : "test_using_parameters.js", - "page" : "$$config.baseUrl$$::4100/example1?foo=bar&bar=foo" - } }, - "yuimodule" : { - "group" : "developerguide,yuimodule", - "params" : { - "test" : "test_yuimodule.js", - "page" : "$$config.baseUrl$$:4119/" - } + "usingparameters" : { + "group" : "developerguide,usingparameters", + "params" : { + "test" : "test_using_parameters.js", + "page" : "$$config.baseUrl$$:4100/example1?foo=bar&bar=foo" + } + }, + "yuimodule" : { + "group" : "developerguide,yuimodule", + "params" : { + "test" : "test_yuimodule.js", + "page" : "$$config.baseUrl$$:4119/" + } } } }, diff --git a/tests/func/examples/developerguide/test_adding_view_engines.js b/tests/func/examples/developerguide/test_adding_view_engines.js index 3a41edf73..06603518e 100644 --- a/tests/func/examples/developerguide/test_adding_view_engines.js +++ b/tests/func/examples/developerguide/test_adding_view_engines.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: adding_view_engine"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_adding_view_engines2.js b/tests/func/examples/developerguide/test_adding_view_engines2.js index 0b235f010..7397996b3 100644 --- a/tests/func/examples/developerguide/test_adding_view_engines2.js +++ b/tests/func/examples/developerguide/test_adding_view_engines2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: adding_view_engine2"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_binding_events.js b/tests/func/examples/developerguide/test_binding_events.js index 53cd22581..7067e0931 100644 --- a/tests/func/examples/developerguide/test_binding_events.js +++ b/tests/func/examples/developerguide/test_binding_events.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: bindingevents"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_binding_events2.js b/tests/func/examples/developerguide/test_binding_events2.js index 1f4191731..cbb40e6a9 100644 --- a/tests/func/examples/developerguide/test_binding_events2.js +++ b/tests/func/examples/developerguide/test_binding_events2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: bindingevents2"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_configure_routing.js b/tests/func/examples/developerguide/test_configure_routing.js index cbfa371e1..bfede2824 100644 --- a/tests/func/examples/developerguide/test_configure_routing.js +++ b/tests/func/examples/developerguide/test_configure_routing.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: configurerouting"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_device_assets.js b/tests/func/examples/developerguide/test_device_assets.js index e35d6462b..98662d900 100644 --- a/tests/func/examples/developerguide/test_device_assets.js +++ b/tests/func/examples/developerguide/test_device_assets.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: deviceassets"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_device_views.js b/tests/func/examples/developerguide/test_device_views.js index 35593adfb..39b3d90a5 100644 --- a/tests/func/examples/developerguide/test_device_views.js +++ b/tests/func/examples/developerguide/test_device_views.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: deviceviews"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_framed_assets.js b/tests/func/examples/developerguide/test_framed_assets.js index 5eef8699f..1a5fff8dc 100644 --- a/tests/func/examples/developerguide/test_framed_assets.js +++ b/tests/func/examples/developerguide/test_framed_assets.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: framedassets"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_framed_config.js b/tests/func/examples/developerguide/test_framed_config.js index a0439ea65..7c9b688e3 100644 --- a/tests/func/examples/developerguide/test_framed_config.js +++ b/tests/func/examples/developerguide/test_framed_config.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: framedconfig"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_generating_urls.js b/tests/func/examples/developerguide/test_generating_urls.js index e05b9fcd8..4e763e3ed 100644 --- a/tests/func/examples/developerguide/test_generating_urls.js +++ b/tests/func/examples/developerguide/test_generating_urls.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: generatingurls"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_generating_urls2.js b/tests/func/examples/developerguide/test_generating_urls2.js index 03ac91169..3f5f623c9 100644 --- a/tests/func/examples/developerguide/test_generating_urls2.js +++ b/tests/func/examples/developerguide/test_generating_urls2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: generatingurl2"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_global_assets.js b/tests/func/examples/developerguide/test_global_assets.js index 7eb322166..4295ccb77 100644 --- a/tests/func/examples/developerguide/test_global_assets.js +++ b/tests/func/examples/developerguide/test_global_assets.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: globalassets"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_hello.js b/tests/func/examples/developerguide/test_hello.js index 6370b70ee..6903fce8b 100644 --- a/tests/func/examples/developerguide/test_hello.js +++ b/tests/func/examples/developerguide/test_hello.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: hello"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_htmlframe.js b/tests/func/examples/developerguide/test_htmlframe.js index 35bf83ee6..e9c28b598 100644 --- a/tests/func/examples/developerguide/test_htmlframe.js +++ b/tests/func/examples/developerguide/test_htmlframe.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: htmlframe"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_innermojit.js b/tests/func/examples/developerguide/test_innermojit.js index a5c0ca3e5..c3b686fe7 100644 --- a/tests/func/examples/developerguide/test_innermojit.js +++ b/tests/func/examples/developerguide/test_innermojit.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: innermojit"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_locale_i18n.js b/tests/func/examples/developerguide/test_locale_i18n.js index 35d4df78c..2fa83af78 100644 --- a/tests/func/examples/developerguide/test_locale_i18n.js +++ b/tests/func/examples/developerguide/test_locale_i18n.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: locale_i18n"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_modelyql.js b/tests/func/examples/developerguide/test_modelyql.js index b80ef2283..c304396e9 100644 --- a/tests/func/examples/developerguide/test_modelyql.js +++ b/tests/func/examples/developerguide/test_modelyql.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: modelyql"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_multiplemojit.js b/tests/func/examples/developerguide/test_multiplemojit.js index 623a7a006..27265ace3 100644 --- a/tests/func/examples/developerguide/test_multiplemojit.js +++ b/tests/func/examples/developerguide/test_multiplemojit.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: multiplemojit"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_scrollview.js b/tests/func/examples/developerguide/test_scrollview.js index 9d5057f31..50512f3cb 100644 --- a/tests/func/examples/developerguide/test_scrollview.js +++ b/tests/func/examples/developerguide/test_scrollview.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: scrollview"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_simple_assets.js b/tests/func/examples/developerguide/test_simple_assets.js index 91303ce8c..c88b234f6 100644 --- a/tests/func/examples/developerguide/test_simple_assets.js +++ b/tests/func/examples/developerguide/test_simple_assets.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: simpleassets"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_simple_config.js b/tests/func/examples/developerguide/test_simple_config.js index 064d71086..4938e7d08 100644 --- a/tests/func/examples/developerguide/test_simple_config.js +++ b/tests/func/examples/developerguide/test_simple_config.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: simpleconfig"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_simple_logging.js b/tests/func/examples/developerguide/test_simple_logging.js index 230a4ee7b..4db7c3b8b 100644 --- a/tests/func/examples/developerguide/test_simple_logging.js +++ b/tests/func/examples/developerguide/test_simple_logging.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: simplelogging"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_simple_view.js b/tests/func/examples/developerguide/test_simple_view.js index 4c1303ea1..207e7028b 100644 --- a/tests/func/examples/developerguide/test_simple_view.js +++ b/tests/func/examples/developerguide/test_simple_view.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: simpleview"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_unittest_model_controller.js b/tests/func/examples/developerguide/test_unittest_model_controller.js index 13c652d5e..d5cde78a3 100644 --- a/tests/func/examples/developerguide/test_unittest_model_controller.js +++ b/tests/func/examples/developerguide/test_unittest_model_controller.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: unittest_model_controller"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_using_configs.js b/tests/func/examples/developerguide/test_using_configs.js index 43294a21a..943965782 100644 --- a/tests/func/examples/developerguide/test_using_configs.js +++ b/tests/func/examples/developerguide/test_using_configs.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: usingconfigs"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_using_configs2.js b/tests/func/examples/developerguide/test_using_configs2.js index 3431c085d..2ea2859a4 100644 --- a/tests/func/examples/developerguide/test_using_configs2.js +++ b/tests/func/examples/developerguide/test_using_configs2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: usingconfigs2"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_using_parameters.js b/tests/func/examples/developerguide/test_using_parameters.js index 4f17f3958..52547bc52 100644 --- a/tests/func/examples/developerguide/test_using_parameters.js +++ b/tests/func/examples/developerguide/test_using_parameters.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: usingparameters"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/test_yuimodule.js b/tests/func/examples/developerguide/test_yuimodule.js index 4484d6780..5615fd292 100644 --- a/tests/func/examples/developerguide/test_yuimodule.js +++ b/tests/func/examples/developerguide/test_yuimodule.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("DeveloperGuide: yuimodule"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/developerguide/yui-test.js b/tests/func/examples/developerguide/yui-test.js deleted file mode 100644 index 882c91b0c..000000000 --- a/tests/func/examples/developerguide/yui-test.js +++ /dev/null @@ -1,1105 +0,0 @@ -YUI.add("test", function (b) { - b.namespace("Test"); - b.Test.Case = function (c) { - this._should = {}; - for (var d in c) { - this[d] = c[d]; - } - if (!b.Lang.isString(this.name)) { - this.name = "testCase" + b.guid(); - } - }; - b.Test.Case.prototype = {resume:function (c) { - b.Test.Runner.resume(c); - }, wait:function (e, d) { - var c = arguments; - if (b.Lang.isFunction(c[0])) { - throw new b.Test.Wait(c[0], c[1]); - } else { - throw new b.Test.Wait(function () { - b.Assert.fail("Timeout: wait() called but resume() never called."); - }, (b.Lang.isNumber(c[0]) ? c[0] : 10000)); - } - }, setUp:function () { - }, tearDown:function () { - }}; - b.Test.Wait = function (d, c) { - this.segment = (b.Lang.isFunction(d) ? d : null); - this.delay = (b.Lang.isNumber(c) ? c : 0); - }; - b.namespace("Test"); - b.Test.Suite = function (c) { - this.name = ""; - this.items = []; - if (b.Lang.isString(c)) { - this.name = c; - } else { - if (b.Lang.isObject(c)) { - b.mix(this, c, true); - } - } - if (this.name === "") { - this.name = "testSuite" + b.guid(); - } - }; - b.Test.Suite.prototype = {add:function (c) { - if (c instanceof b.Test.Suite || c instanceof b.Test.Case) { - this.items.push(c); - } - return this; - }, setUp:function () { - }, tearDown:function () { - }}; - b.Test.Runner = (function () { - function d(e) { - this.testObject = e; - this.firstChild = null; - this.lastChild = null; - this.parent = null; - this.next = null; - this.results = {passed:0, failed:0, total:0, ignored:0, duration:0}; - if (e instanceof b.Test.Suite) { - this.results.type = "testsuite"; - this.results.name = e.name; - } else { - if (e instanceof b.Test.Case) { - this.results.type = "testcase"; - this.results.name = e.name; - } - } - } - - d.prototype = {appendChild:function (e) { - var f = new d(e); - if (this.firstChild === null) { - this.firstChild = this.lastChild = f; - } else { - this.lastChild.next = f; - this.lastChild = f; - } - f.parent = this; - return f; - }}; - function c() { - c.superclass.constructor.apply(this, arguments); - this.masterSuite = new b.Test.Suite("yuitests" + (new Date()).getTime()); - this._cur = null; - this._root = null; - this._log = true; - this._waiting = false; - this._running = false; - this._lastResults = null; - var f = [this.TEST_CASE_BEGIN_EVENT, this.TEST_CASE_COMPLETE_EVENT, this.TEST_SUITE_BEGIN_EVENT, this.TEST_SUITE_COMPLETE_EVENT, this.TEST_PASS_EVENT, this.TEST_FAIL_EVENT, this.TEST_IGNORE_EVENT, this.COMPLETE_EVENT, this.BEGIN_EVENT]; - for (var e = 0; e < f.length; e++) { - this.on(f[e], this._logEvent, this, true); - } - } - - b.extend(c, b.Event.Target, {TEST_CASE_BEGIN_EVENT:"testcasebegin", TEST_CASE_COMPLETE_EVENT:"testcasecomplete", TEST_SUITE_BEGIN_EVENT:"testsuitebegin", TEST_SUITE_COMPLETE_EVENT:"testsuitecomplete", TEST_PASS_EVENT:"pass", TEST_FAIL_EVENT:"fail", TEST_IGNORE_EVENT:"ignore", COMPLETE_EVENT:"complete", BEGIN_EVENT:"begin", disableLogging:function () { - this._log = false; - }, enableLogging:function () { - this._log = true; - }, _logEvent:function (g) { - var f = ""; - var e = ""; - switch (g.type) { - case this.BEGIN_EVENT: - f = "Testing began at " + (new Date()).toString() + "."; - e = "info"; - break; - case this.COMPLETE_EVENT: - f = b.substitute("Testing completed at " + (new Date()).toString() + ".\n" + "Passed:{passed} Failed:{failed} " + "Total:{total} ({ignored} ignored)", g.results); - e = "info"; - break; - case this.TEST_FAIL_EVENT: - f = g.testName + ": failed.\n" + g.error.getMessage(); - e = "fail"; - break; - case this.TEST_IGNORE_EVENT: - f = g.testName + ": ignored."; - e = "ignore"; - break; - case this.TEST_PASS_EVENT: - f = g.testName + ": passed."; - e = "pass"; - break; - case this.TEST_SUITE_BEGIN_EVENT: - f = 'Test suite "' + g.testSuite.name + '" started.'; - e = "info"; - break; - case this.TEST_SUITE_COMPLETE_EVENT: - f = b.substitute('Test suite "' + g.testSuite.name + '" completed' + ".\n" + "Passed:{passed} Failed:{failed} " + "Total:{total} ({ignored} ignored)", g.results); - e = "info"; - break; - case this.TEST_CASE_BEGIN_EVENT: - f = 'Test case "' + g.testCase.name + '" started.'; - e = "info"; - break; - case this.TEST_CASE_COMPLETE_EVENT: - f = b.substitute('Test case "' + g.testCase.name + '" completed.\n' + "Passed:{passed} Failed:{failed} " + "Total:{total} ({ignored} ignored)", g.results); - e = "info"; - break; - default: - f = "Unexpected event " + g.type; - f = "info"; - } - if (this._log) { - b.log(f, e, "TestRunner"); - } - }, _addTestCaseToTestTree:function (f, g) { - var h = f.appendChild(g), i, e; - for (i in g) { - if ((i.indexOf("test") === 0 || (i.toLowerCase().indexOf("should") > -1 && i.indexOf(" ") > -1)) && b.Lang.isFunction(g[i])) { - h.appendChild(i); - } - } - }, _addTestSuiteToTestTree:function (e, h) { - var g = e.appendChild(h); - for (var f = 0; f < h.items.length; f++) { - if (h.items[f] instanceof b.Test.Suite) { - this._addTestSuiteToTestTree(g, h.items[f]); - } else { - if (h.items[f] instanceof b.Test.Case) { - this._addTestCaseToTestTree(g, h.items[f]); - } - } - } - }, _buildTestTree:function () { - this._root = new d(this.masterSuite); - for (var e = 0; e < this.masterSuite.items.length; e++) { - if (this.masterSuite.items[e] instanceof b.Test.Suite) { - this._addTestSuiteToTestTree(this._root, this.masterSuite.items[e]); - } else { - if (this.masterSuite.items[e] instanceof b.Test.Case) { - this._addTestCaseToTestTree(this._root, this.masterSuite.items[e]); - } - } - } - }, _handleTestObjectComplete:function (e) { - if (b.Lang.isObject(e.testObject)) { - if (e.parent) { - e.parent.results.passed += e.results.passed; - e.parent.results.failed += e.results.failed; - e.parent.results.total += e.results.total; - e.parent.results.ignored += e.results.ignored; - e.parent.results[e.testObject.name] = e.results; - } - if (e.testObject instanceof b.Test.Suite) { - e.testObject.tearDown(); - e.results.duration = (new Date()) - e._start; - this.fire(this.TEST_SUITE_COMPLETE_EVENT, {testSuite:e.testObject, results:e.results}); - } else { - if (e.testObject instanceof b.Test.Case) { - e.results.duration = (new Date()) - e._start; - this.fire(this.TEST_CASE_COMPLETE_EVENT, {testCase:e.testObject, results:e.results}); - } - } - } - }, _next:function () { - if (this._cur === null) { - this._cur = this._root; - } else { - if (this._cur.firstChild) { - this._cur = this._cur.firstChild; - } else { - if (this._cur.next) { - this._cur = this._cur.next; - } else { - while (this._cur && !this._cur.next && this._cur !== this._root) { - this._handleTestObjectComplete(this._cur); - this._cur = this._cur.parent; - } - this._handleTestObjectComplete(this._cur); - if (this._cur == this._root) { - this._cur.results.type = "report"; - this._cur.results.timestamp = (new Date()).toLocaleString(); - this._cur.results.duration = (new Date()) - this._cur._start; - this._lastResults = this._cur.results; - this._running = false; - this.fire(this.COMPLETE_EVENT, {results:this._lastResults}); - this._cur = null; - } else { - this._cur = this._cur.next; - } - } - } - } - return this._cur; - }, _run:function () { - var g = false; - var f = this._next(); - if (f !== null) { - this._running = true; - this._lastResult = null; - var e = f.testObject; - if (b.Lang.isObject(e)) { - if (e instanceof b.Test.Suite) { - this.fire(this.TEST_SUITE_BEGIN_EVENT, {testSuite:e}); - f._start = new Date(); - e.setUp(); - } else { - if (e instanceof b.Test.Case) { - this.fire(this.TEST_CASE_BEGIN_EVENT, {testCase:e}); - f._start = new Date(); - } - } - if (typeof setTimeout != "undefined") { - setTimeout(function () { - b.Test.Runner._run(); - }, 0); - } else { - this._run(); - } - } else { - this._runTest(f); - } - } - }, _resumeTest:function (j) { - var e = this._cur; - this._waiting = false; - if (!e) { - return; - } - var k = e.testObject; - var h = e.parent.testObject; - if (h.__yui_wait) { - clearTimeout(h.__yui_wait); - delete h.__yui_wait; - } - var n = (h._should.fail || {})[k]; - var f = (h._should.error || {})[k]; - var i = false; - var l = null; - try { - j.apply(h); - if (n) { - l = new b.Assert.ShouldFail(); - i = true; - } else { - if (f) { - l = new b.Assert.ShouldError(); - i = true; - } - } - } catch (m) { - if (h.__yui_wait) { - clearTimeout(h.__yui_wait); - delete h.__yui_wait; - } - if (m instanceof b.Assert.Error) { - if (!n) { - l = m; - i = true; - } - } else { - if (m instanceof b.Test.Wait) { - if (b.Lang.isFunction(m.segment)) { - if (b.Lang.isNumber(m.delay)) { - if (typeof setTimeout != "undefined") { - h.__yui_wait = setTimeout(function () { - b.Test.Runner._resumeTest(m.segment); - }, m.delay); - this._waiting = true; - } else { - throw new Error("Asynchronous tests not supported in this environment."); - } - } - } - return; - } else { - if (!f) { - l = new b.Assert.UnexpectedError(m); - i = true; - } else { - if (b.Lang.isString(f)) { - if (m.message != f) { - l = new b.Assert.UnexpectedError(m); - i = true; - } - } else { - if (b.Lang.isFunction(f)) { - if (!(m instanceof f)) { - l = new b.Assert.UnexpectedError(m); - i = true; - } - } else { - if (b.Lang.isObject(f)) { - if (!(m instanceof f.constructor) || m.message != f.message) { - l = new b.Assert.UnexpectedError(m); - i = true; - } - } - } - } - } - } - } - } - if (i) { - this.fire(this.TEST_FAIL_EVENT, {testCase:h, testName:k, error:l}); - } else { - this.fire(this.TEST_PASS_EVENT, {testCase:h, testName:k}); - } - h.tearDown(); - var g = (new Date()) - e._start; - e.parent.results[k] = {result:i ? "fail" : "pass", message:l ? l.getMessage() : "Test passed", type:"test", name:k, duration:g}; - if (i) { - e.parent.results.failed++; - } else { - e.parent.results.passed++; - } - e.parent.results.total++; - if (typeof setTimeout != "undefined") { - setTimeout(function () { - b.Test.Runner._run(); - }, 0); - } else { - this._run(); - } - }, _handleError:function (e) { - if (this._waiting) { - this._resumeTest(function () { - throw e; - }); - } else { - throw e; - } - }, _runTest:function (h) { - var e = h.testObject; - var f = h.parent.testObject; - var i = f[e]; - var g = (f._should.ignore || {})[e]; - if (g) { - h.parent.results[e] = {result:"ignore", message:"Test ignored", type:"test", name:e}; - h.parent.results.ignored++; - h.parent.results.total++; - this.fire(this.TEST_IGNORE_EVENT, {testCase:f, testName:e}); - if (typeof setTimeout != "undefined") { - setTimeout(function () { - b.Test.Runner._run(); - }, 0); - } else { - this._run(); - } - } else { - h._start = new Date(); - f.setUp(); - this._resumeTest(i); - } - }, getName:function () { - return this.masterSuite.name; - }, setName:function (e) { - this.masterSuite.name = e; - }, fire:function (e, f) { - f = f || {}; - f.type = e; - c.superclass.fire.call(this, e, f); - }, add:function (e) { - this.masterSuite.add(e); - return this; - }, clear:function () { - this.masterSuite = new b.Test.Suite("yuitests" + (new Date()).getTime()); - }, isWaiting:function () { - return this._waiting; - }, isRunning:function () { - return this._running; - }, getResults:function (e) { - if (!this._running && this._lastResults) { - if (b.Lang.isFunction(e)) { - return e(this._lastResults); - } else { - return this._lastResults; - } - } else { - return null; - } - }, getCoverage:function (e) { - if (!this._running && typeof _yuitest_coverage == "object") { - if (b.Lang.isFunction(e)) { - return e(_yuitest_coverage); - } else { - return _yuitest_coverage; - } - } else { - return null; - } - }, resume:function (e) { - if (b.Test.Runner._waiting) { - this._resumeTest(e || function () { - }); - } else { - throw new Error("resume() called without wait()."); - } - }, run:function (e) { - var f = b.Test.Runner; - if (!e && this.masterSuite.items.length == 1 && this.masterSuite.items[0] instanceof b.Test.Suite) { - this.masterSuite = this.masterSuite.items[0]; - } - f._buildTestTree(); - f._root._start = new Date(); - f.fire(f.BEGIN_EVENT); - f._run(); - }}); - return new c(); - })(); - b.Assert = {_asserts:0, _formatMessage:function (d, c) { - var e = d; - if (b.Lang.isString(d) && d.length > 0) { - return b.Lang.substitute(d, {message:c}); - } else { - return c; - } - }, _getCount:function () { - return this._asserts; - }, _increment:function () { - this._asserts++; - }, _reset:function () { - this._asserts = 0; - }, fail:function (c) { - throw new b.Assert.Error(b.Assert._formatMessage(c, "Test force-failed.")); - }, areEqual:function (d, e, c) { - b.Assert._increment(); - if (d != e) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Values should be equal."), d, e); - } - }, areNotEqual:function (c, e, d) { - b.Assert._increment(); - if (c == e) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(d, "Values should not be equal."), c); - } - }, areNotSame:function (c, e, d) { - b.Assert._increment(); - if (c === e) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(d, "Values should not be the same."), c); - } - }, areSame:function (d, e, c) { - b.Assert._increment(); - if (d !== e) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Values should be the same."), d, e); - } - }, isFalse:function (d, c) { - b.Assert._increment(); - if (false !== d) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be false."), false, d); - } - }, isTrue:function (d, c) { - b.Assert._increment(); - if (true !== d) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be true."), true, d); - } - }, isNaN:function (d, c) { - b.Assert._increment(); - if (!isNaN(d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be NaN."), NaN, d); - } - }, isNotNaN:function (d, c) { - b.Assert._increment(); - if (isNaN(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Values should not be NaN."), NaN); - } - }, isNotNull:function (d, c) { - b.Assert._increment(); - if (b.Lang.isNull(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Values should not be null."), null); - } - }, isNotUndefined:function (d, c) { - b.Assert._increment(); - if (b.Lang.isUndefined(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should not be undefined."), undefined); - } - }, isNull:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isNull(d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be null."), null, d); - } - }, isUndefined:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isUndefined(d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be undefined."), undefined, d); - } - }, isArray:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isArray(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be an array."), d); - } - }, isBoolean:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isBoolean(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a Boolean."), d); - } - }, isFunction:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isFunction(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a function."), d); - } - }, isInstanceOf:function (d, e, c) { - b.Assert._increment(); - if (!(e instanceof d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value isn't an instance of expected type."), d, e); - } - }, isNumber:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isNumber(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a number."), d); - } - }, isObject:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isObject(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be an object."), d); - } - }, isString:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isString(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a string."), d); - } - }, isTypeOf:function (c, e, d) { - b.Assert._increment(); - if (typeof e != c) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(d, "Value should be of type " + c + "."), expected, typeof e); - } - }}; - b.assert = function (d, c) { - b.Assert._increment(); - if (!d) { - throw new b.Assert.Error(b.Assert._formatMessage(c, "Assertion failed.")); - } - }; - b.fail = b.Assert.fail; - b.Assert.Error = function (c) { - arguments.callee.superclass.constructor.call(this, c); - this.message = c; - this.name = "Assert Error"; - }; - b.extend(b.Assert.Error, Error, {getMessage:function () { - return this.message; - }, toString:function () { - return this.name + ": " + this.getMessage(); - }, valueOf:function () { - return this.toString(); - }}); - b.Assert.ComparisonFailure = function (d, c, e) { - arguments.callee.superclass.constructor.call(this, d); - this.expected = c; - this.actual = e; - this.name = "ComparisonFailure"; - }; - b.extend(b.Assert.ComparisonFailure, b.Assert.Error, {getMessage:function () { - return this.message + "\nExpected: " + this.expected + " (" + (typeof this.expected) + ")" + "\nActual: " + this.actual + " (" + (typeof this.actual) + ")"; - }}); - b.Assert.UnexpectedValue = function (d, c) { - arguments.callee.superclass.constructor.call(this, d); - this.unexpected = c; - this.name = "UnexpectedValue"; - }; - b.extend(b.Assert.UnexpectedValue, b.Assert.Error, {getMessage:function () { - return this.message + "\nUnexpected: " + this.unexpected + " (" + (typeof this.unexpected) + ") "; - }}); - b.Assert.ShouldFail = function (c) { - arguments.callee.superclass.constructor.call(this, c || "This test should fail but didn't."); - this.name = "ShouldFail"; - }; - b.extend(b.Assert.ShouldFail, b.Assert.Error); - b.Assert.ShouldError = function (c) { - arguments.callee.superclass.constructor.call(this, c || "This test should have thrown an error but didn't."); - this.name = "ShouldError"; - }; - b.extend(b.Assert.ShouldError, b.Assert.Error); - b.Assert.UnexpectedError = function (c) { - arguments.callee.superclass.constructor.call(this, "Unexpected error: " + c.message); - this.cause = c; - this.name = "UnexpectedError"; - this.stack = c.stack; - }; - b.extend(b.Assert.UnexpectedError, b.Assert.Error); - b.ArrayAssert = {contains:function (e, d, c) { - b.Assert._increment(); - if (b.Array.indexOf(d, e) == -1) { - b.Assert.fail(b.Assert._formatMessage(c, "Value " + e + " (" + (typeof e) + ") not found in array [" + d + "].")); - } - }, containsItems:function (e, f, d) { - b.Assert._increment(); - for (var c = 0; c < e.length; c++) { - if (b.Array.indexOf(f, e[c]) == -1) { - b.Assert.fail(b.Assert._formatMessage(d, "Value " + e[c] + " (" + (typeof e[c]) + ") not found in array [" + f + "].")); - } - } - }, containsMatch:function (e, d, c) { - b.Assert._increment(); - if (typeof e != "function") { - throw new TypeError("ArrayAssert.containsMatch(): First argument must be a function."); - } - if (!b.Array.some(d, e)) { - b.Assert.fail(b.Assert._formatMessage(c, "No match found in array [" + d + "].")); - } - }, doesNotContain:function (e, d, c) { - b.Assert._increment(); - if (b.Array.indexOf(d, e) > -1) { - b.Assert.fail(b.Assert._formatMessage(c, "Value found in array [" + d + "].")); - } - }, doesNotContainItems:function (e, f, d) { - b.Assert._increment(); - for (var c = 0; c < e.length; c++) { - if (b.Array.indexOf(f, e[c]) > -1) { - b.Assert.fail(b.Assert._formatMessage(d, "Value found in array [" + f + "].")); - } - } - }, doesNotContainMatch:function (e, d, c) { - b.Assert._increment(); - if (typeof e != "function") { - throw new TypeError("ArrayAssert.doesNotContainMatch(): First argument must be a function."); - } - if (b.Array.some(d, e)) { - b.Assert.fail(b.Assert._formatMessage(c, "Value found in array [" + d + "].")); - } - }, indexOf:function (g, f, c, e) { - b.Assert._increment(); - for (var d = 0; d < f.length; d++) { - if (f[d] === g) { - if (c != d) { - b.Assert.fail(b.Assert._formatMessage(e, "Value exists at index " + d + " but should be at index " + c + ".")); - } - return; - } - } - b.Assert.fail(b.Assert._formatMessage(e, "Value doesn't exist in array [" + f + "].")); - }, itemsAreEqual:function (e, f, d) { - b.Assert._increment(); - if (e.length != f.length) { - b.Assert.fail(b.Assert._formatMessage(d, "Array should have a length of " + e.length + " but has a length of " + f.length)); - } - for (var c = 0; c < e.length; c++) { - if (e[c] != f[c]) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(d, "Values in position " + c + " are not equal."), e[c], f[c]); - } - } - }, itemsAreEquivalent:function (f, g, c, e) { - b.Assert._increment(); - if (typeof c != "function") { - throw new TypeError("ArrayAssert.itemsAreEquivalent(): Third argument must be a function."); - } - if (f.length != g.length) { - b.Assert.fail(b.Assert._formatMessage(e, "Array should have a length of " + f.length + " but has a length of " + g.length)); - } - for (var d = 0; d < f.length; d++) { - if (!c(f[d], g[d])) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(e, "Values in position " + d + " are not equivalent."), f[d], g[d]); - } - } - }, isEmpty:function (d, c) { - b.Assert._increment(); - if (d.length > 0) { - b.Assert.fail(b.Assert._formatMessage(c, "Array should be empty.")); - } - }, isNotEmpty:function (d, c) { - b.Assert._increment(); - if (d.length === 0) { - b.Assert.fail(b.Assert._formatMessage(c, "Array should not be empty.")); - } - }, itemsAreSame:function (e, f, d) { - b.Assert._increment(); - if (e.length != f.length) { - b.Assert.fail(b.Assert._formatMessage(d, "Array should have a length of " + e.length + " but has a length of " + f.length)); - } - for (var c = 0; c < e.length; c++) { - if (e[c] !== f[c]) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(d, "Values in position " + c + " are not the same."), e[c], f[c]); - } - } - }, lastIndexOf:function (g, f, c, e) { - for (var d = f.length; d >= 0; d--) { - if (f[d] === g) { - if (c != d) { - b.Assert.fail(b.Assert._formatMessage(e, "Value exists at index " + d + " but should be at index " + c + ".")); - } - return; - } - } - b.Assert.fail(b.Assert._formatMessage(e, "Value doesn't exist in array.")); - }}; - b.ObjectAssert = {areEqual:function (d, e, c) { - b.Assert._increment(); - b.Object.each(d, function (g, f) { - if (d[f] != e[f]) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Values should be equal for property " + f), d[f], e[f]); - } - }); - }, hasKey:function (c, d, e) { - b.Assert._increment(); - if (!(c in d)) { - b.fail(b.Assert._formatMessage(e, "Property '" + c + "' not found on object.")); - } - }, hasKeys:function (e, c, f) { - b.Assert._increment(); - for (var d = 0; d < e.length; d++) { - if (!(e[d] in c)) { - b.fail(b.Assert._formatMessage(f, "Property '" + e[d] + "' not found on object.")); - } - } - }, ownsKey:function (c, d, e) { - b.Assert._increment(); - if (!d.hasOwnProperty(c)) { - b.fail(b.Assert._formatMessage(e, "Property '" + c + "' not found on object instance.")); - } - }, ownsKeys:function (e, c, f) { - b.Assert._increment(); - for (var d = 0; d < e.length; d++) { - if (!c.hasOwnProperty(e[d])) { - b.fail(b.Assert._formatMessage(f, "Property '" + e[d] + "' not found on object instance.")); - } - } - }, ownsNoKeys:function (c, e) { - b.Assert._increment(); - var d = b.Object.keys(c); - if (d.length > 0) { - b.fail(b.Assert._formatMessage(e, "Object owns " + d.length + " properties but should own none.")); - } - }}; - b.DateAssert = {datesAreEqual:function (d, f, c) { - b.Assert._increment(); - if (d instanceof Date && f instanceof Date) { - var e = ""; - if (d.getFullYear() != f.getFullYear()) { - e = "Years should be equal."; - } - if (d.getMonth() != f.getMonth()) { - e = "Months should be equal."; - } - if (d.getDate() != f.getDate()) { - e = "Days of month should be equal."; - } - if (e.length) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, e), d, f); - } - } else { - throw new TypeError("Y.Assert.datesAreEqual(): Expected and actual values must be Date objects."); - } - }, timesAreEqual:function (d, f, c) { - b.Assert._increment(); - if (d instanceof Date && f instanceof Date) { - var e = ""; - if (d.getHours() != f.getHours()) { - e = "Hours should be equal."; - } - if (d.getMinutes() != f.getMinutes()) { - e = "Minutes should be equal."; - } - if (d.getSeconds() != f.getSeconds()) { - e = "Seconds should be equal."; - } - if (e.length) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, e), d, f); - } - } else { - throw new TypeError("DateY.AsserttimesAreEqual(): Expected and actual values must be Date objects."); - } - }}; - b.namespace("Test.Format"); - function a(c) { - return c.replace(/[<>"'&]/g, function (d) { - switch (d) { - case"<": - return"<"; - case">": - return">"; - case'"': - return"""; - case"'": - return"'"; - case"&": - return"&"; - } - }); - } - - b.Test.Format.JSON = function (c) { - return b.JSON.stringify(c); - }; - b.Test.Format.XML = function (d) { - function c(g) { - var e = b.Lang, f = "<" + g.type + ' name="' + a(g.name) + '"'; - if (e.isNumber(g.duration)) { - f += ' duration="' + g.duration + '"'; - } - if (g.type == "test") { - f += ' result="' + g.result + '" message="' + a(g.message) + '">'; - } else { - f += ' passed="' + g.passed + '" failed="' + g.failed + '" ignored="' + g.ignored + '" total="' + g.total + '">'; - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += c(h); - } - }); - } - f += ""; - return f; - } - - return'' + c(d); - }; - b.Test.Format.JUnitXML = function (c) { - function d(g) { - var e = b.Lang, f = ""; - switch (g.type) { - case"test": - if (g.result != "ignore") { - f = ''; - if (g.result == "fail") { - f += '"; - } - f += ""; - } - break; - case"testcase": - f = ''; - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += d(h); - } - }); - f += ""; - break; - case"testsuite": - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += d(h); - } - }); - break; - case"report": - f = ""; - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += d(h); - } - }); - f += ""; - } - return f; - } - - return'' + d(c); - }; - b.Test.Format.TAP = function (d) { - var e = 1; - - function c(g) { - var f = b.Lang, h = ""; - switch (g.type) { - case"test": - if (g.result != "ignore") { - h = "ok " + (e++) + " - " + g.name; - if (g.result == "fail") { - h = "not " + h + " - " + g.message; - } - h += "\n"; - } else { - h = "#Ignored test " + g.name + "\n"; - } - break; - case"testcase": - h = "#Begin testcase " + g.name + "(" + g.failed + " failed of " + g.total + ")\n"; - b.Object.each(g, function (i) { - if (f.isObject(i) && !f.isArray(i)) { - h += c(i); - } - }); - h += "#End testcase " + g.name + "\n"; - break; - case"testsuite": - h = "#Begin testsuite " + g.name + "(" + g.failed + " failed of " + g.total + ")\n"; - b.Object.each(g, function (i) { - if (f.isObject(i) && !f.isArray(i)) { - h += c(i); - } - }); - h += "#End testsuite " + g.name + "\n"; - break; - case"report": - b.Object.each(g, function (i) { - if (f.isObject(i) && !f.isArray(i)) { - h += c(i); - } - }); - } - return h; - } - - return"1.." + d.total + "\n" + c(d); - }; - b.namespace("Coverage.Format"); - b.Coverage.Format.JSON = function (c) { - return b.JSON.stringify(c); - }; - b.Coverage.Format.XdebugJSON = function (d) { - var c = {}; - b.Object.each(d, function (f, e) { - c[e] = d[e].lines; - }); - return b.JSON.stringify(c); - }; - b.namespace("Test"); - b.Test.Reporter = function (c, d) { - this.url = c; - this.format = d || b.Test.Format.XML; - this._fields = new Object(); - this._form = null; - this._iframe = null; - }; - b.Test.Reporter.prototype = {constructor:b.Test.Reporter, addField:function (c, d) { - this._fields[c] = d; - }, clearFields:function () { - this._fields = new Object(); - }, destroy:function () { - if (this._form) { - this._form.parentNode.removeChild(this._form); - this._form = null; - } - if (this._iframe) { - this._iframe.parentNode.removeChild(this._iframe); - this._iframe = null; - } - this._fields = null; - }, report:function (d) { - if (!this._form) { - this._form = document.createElement("form"); - this._form.method = "post"; - this._form.style.visibility = "hidden"; - this._form.style.position = "absolute"; - this._form.style.top = 0; - document.body.appendChild(this._form); - var c = document.createElement("div"); - c.innerHTML = ''; - this._iframe = c.firstChild; - this._iframe.src = "javascript:false"; - this._iframe.style.visibility = "hidden"; - this._iframe.style.position = "absolute"; - this._iframe.style.top = 0; - document.body.appendChild(this._iframe); - this._form.target = "yuiTestTarget"; - } - this._form.action = this.url; - while (this._form.hasChildNodes()) { - this._form.removeChild(this._form.lastChild); - } - this._fields.results = this.format(d); - this._fields.useragent = navigator.userAgent; - this._fields.timestamp = (new Date()).toLocaleString(); - b.Object.each(this._fields, function (f, g) { - if (typeof f != "function") { - var e = document.createElement("input"); - e.type = "hidden"; - e.name = g; - e.value = f; - this._form.appendChild(e); - } - }, this); - delete this._fields.results; - delete this._fields.useragent; - delete this._fields.timestamp; - if (arguments[1] !== false) { - this._form.submit(); - } - }}; - b.Mock = function (e) { - e = e || {}; - var c = null; - try { - c = b.Object(e); - } catch (d) { - c = {}; - b.log("Couldn't create mock with prototype.", "warn", "Mock"); - } - b.Object.each(e, function (f) { - if (b.Lang.isFunction(e[f])) { - c[f] = function () { - b.Assert.fail("Method " + f + "() was called but was not expected to be."); - }; - } - }); - return c; - }; - b.Mock.expect = function (d, h) { - if (!d.__expectations) { - d.__expectations = {}; - } - if (h.method) { - var g = h.method, f = h.args || h.arguments || [], c = h.returns, j = b.Lang.isNumber(h.callCount) ? h.callCount : 1, e = h.error, i = h.run || function () { - }; - d.__expectations[g] = h; - h.callCount = j; - h.actualCallCount = 0; - b.Array.each(f, function (k, l, m) { - if (!(m[l] instanceof b.Mock.Value)) { - m[l] = b.Mock.Value(b.Assert.areSame, [k], "Argument " + l + " of " + g + "() is incorrect."); - } - }); - if (j > 0) { - d[g] = function () { - try { - h.actualCallCount++; - b.Assert.areEqual(f.length, arguments.length, "Method " + g + "() passed incorrect number of arguments."); - for (var m = 0, k = f.length; m < k; m++) { - f[m].verify(arguments[m]); - } - i.apply(this, arguments); - if (e) { - throw e; - } - } catch (l) { - b.Test.Runner._handleError(l); - } - return c; - }; - } else { - d[g] = function () { - try { - b.Assert.fail("Method " + g + "() should not have been called."); - } catch (k) { - b.Test.Runner._handleError(k); - } - }; - } - } else { - if (h.property) { - d.__expectations[g] = h; - } - } - }; - b.Mock.verify = function (c) { - try { - b.Object.each(c.__expectations, function (e) { - if (e.method) { - b.Assert.areEqual(e.callCount, e.actualCallCount, "Method " + e.method + "() wasn't called the expected number of times."); - } else { - if (e.property) { - b.Assert.areEqual(e.value, c[e.property], "Property " + e.property + " wasn't set to the correct value."); - } - } - }); - } catch (d) { - b.Test.Runner._handleError(d); - } - }; - b.Mock.Value = function (e, c, d) { - if (b.instanceOf(this, b.Mock.Value)) { - this.verify = function (g) { - var f = [].concat(c || []); - f.push(g); - f.push(d); - e.apply(null, f); - }; - } else { - return new b.Mock.Value(e, c, d); - } - }; - b.Mock.Value.Any = b.Mock.Value(function () { - }); - b.Mock.Value.Boolean = b.Mock.Value(b.Assert.isBoolean); - b.Mock.Value.Number = b.Mock.Value(b.Assert.isNumber); - b.Mock.Value.String = b.Mock.Value(b.Assert.isString); - b.Mock.Value.Object = b.Mock.Value(b.Assert.isObject); - b.Mock.Value.Function = b.Mock.Value(b.Assert.isFunction); - if (typeof YUITest == "undefined" || !YUITest) { - YUITest = {TestRunner:b.Test.Runner, ResultsFormat:b.Test.Format, CoverageFormat:b.Coverage.Format}; - } -}, "3.4.1", {requires:["event-simulate", "event-custom", "substitute", "json-stringify"]}); diff --git a/tests/func/examples/input/input_descriptor.json b/tests/func/examples/input/input_descriptor.json index b1fbd3c25..06c5c3df7 100755 --- a/tests/func/examples/input/input_descriptor.json +++ b/tests/func/examples/input/input_descriptor.json @@ -3,80 +3,82 @@ "settings": [ "master" ], "name" : "input", - + + "commonlib" : "../../../base/yui-test.js", + "config" :{ "baseUrl" : "http://localhost" }, "dataprovider" : { - "get" : { - "group" : "input,get", - "params" : { - "scenario": [ - { - "test" : "test_get1.js", - "page" : "$$config.baseUrl$$:4111/@GetCatcher/allParams?foo=txt&bar=app" - }, - { - "test" : "test_get2.js", - "page" : "$$config.baseUrl$$:4111/@GetCatcher/paramsByValue?bar=app" - }, - { - "test" : "test_get3.js", - "page" : "$$config.baseUrl$$:4111/@GetCatcher/paramsByValue?foo=txt" - } - ] - } + "get" : { + "group" : "input,get", + "params" : { + "scenario": [ + { + "test" : "test_get1.js", + "page" : "$$config.baseUrl$$:4111/@GetCatcher/allParams?foo=txt&bar=app" + }, + { + "test" : "test_get2.js", + "page" : "$$config.baseUrl$$:4111/@GetCatcher/paramsByValue?bar=app" + }, + { + "test" : "test_get3.js", + "page" : "$$config.baseUrl$$:4111/@GetCatcher/paramsByValue?foo=txt" + } + ] + } }, - "post" : { + "post" : { "group" : "input,post", "params" : { "scenario": [ { "test" : "test_post1.js", - "page" : "$$config.baseUrl$$:4113/pitch" + "page" : "$$config.baseUrl$$:4113/pitch" }, { "controller": "locator", - "params": { - "using": "xpath", - "value": "//input[2]", - "click": true - } + "params": { + "using": "xpath", + "value": "//input[2]", + "click": true + } }, - { - "test" : "test_post2.js" - } + { + "test" : "test_post2.js" + } ] } }, - "merged" : { + "merged" : { "group" : "input,merged", "params" : { "scenario": [ { "test" : "test_merged1.js", - "page" : "$$config.baseUrl$$:4112/form" + "page" : "$$config.baseUrl$$:4112/form" }, { "controller": "locator", - "params": { - "using": "xpath", - "value": "//input[2]", - "click": true - } + "params": { + "using": "xpath", + "value": "//input[2]", + "click": true + } }, - { - "test" : "test_merged2.js" - } + { + "test" : "test_merged2.js" + } ] } }, - "route" : { + "route" : { "group" : "input,merged,new", "params" : { "test" : "test_route.js", - "page" : "$$config.baseUrl$$:4114/" + "page" : "$$config.baseUrl$$:4114/" } } } diff --git a/tests/func/examples/input/test_get1.js b/tests/func/examples/input/test_get1.js index 9290f5cc9..8668d0308 100644 --- a/tests/func/examples/input/test_get1.js +++ b/tests/func/examples/input/test_get1.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("input"); + var suite = new Y.Test.Suite("Input: get1"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/input/test_get2.js b/tests/func/examples/input/test_get2.js index 1611282d9..1cac84cc3 100644 --- a/tests/func/examples/input/test_get2.js +++ b/tests/func/examples/input/test_get2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("input"); + var suite = new Y.Test.Suite("Input: get2"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/input/test_get3.js b/tests/func/examples/input/test_get3.js index 5d7cb4e3c..00ff4871f 100644 --- a/tests/func/examples/input/test_get3.js +++ b/tests/func/examples/input/test_get3.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("input"); + var suite = new Y.Test.Suite("Input: get3"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/input/test_merged1.js b/tests/func/examples/input/test_merged1.js index c7a9ffa6c..b9970b5d7 100644 --- a/tests/func/examples/input/test_merged1.js +++ b/tests/func/examples/input/test_merged1.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("input"); + var suite = new Y.Test.Suite("Input: merged1"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/input/test_merged2.js b/tests/func/examples/input/test_merged2.js index 2b942ed0d..3a359437d 100644 --- a/tests/func/examples/input/test_merged2.js +++ b/tests/func/examples/input/test_merged2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("Input: merged2"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/input/test_post1.js b/tests/func/examples/input/test_post1.js index 45872b178..5afb0d108 100644 --- a/tests/func/examples/input/test_post1.js +++ b/tests/func/examples/input/test_post1.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("input"); + var suite = new Y.Test.Suite("Input: post1"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/input/test_post2.js b/tests/func/examples/input/test_post2.js index 8a09d8ae9..870f0c718 100644 --- a/tests/func/examples/input/test_post2.js +++ b/tests/func/examples/input/test_post2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("Input: post2"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/input/test_route.js b/tests/func/examples/input/test_route.js index 8f74aa321..479c5509a 100644 --- a/tests/func/examples/input/test_route.js +++ b/tests/func/examples/input/test_route.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("inpute"); + var suite = new Y.Test.Suite("Input: route"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/newsboxes/newsboxes_descriptor.json b/tests/func/examples/newsboxes/newsboxes_descriptor.json index acd8f14f0..aa61c0f10 100755 --- a/tests/func/examples/newsboxes/newsboxes_descriptor.json +++ b/tests/func/examples/newsboxes/newsboxes_descriptor.json @@ -3,31 +3,33 @@ "settings": [ "master" ], "name" : "newsboxes", - - "config" :{ + + "commonlib" : "../../../base/yui-test.js", + + "config" :{ "baseUrl" : "http://localhost" }, "dataprovider" : { - "newsboxes" : { + "newsboxes" : { "group" : "newsboxes", "params" : { - "scenario": [ + "scenario": [ { - "test" : "test_newsboxes1.js", - "page" : "$$config.baseUrl$$:4125/" + "test" : "test_newsboxes1.js", + "page" : "$$config.baseUrl$$:4125/" }, { "controller": "locator", - "params": { - "using": "xpath", - "value": "/html/body/div/div[2]/ul/li[3]/a", - "click": true - } + "params": { + "using": "xpath", + "value": "/html/body/div/div[2]/ul/li[3]/a", + "click": true + } }, - { - "test" : "test_newsboxes2.js" - } + { + "test" : "test_newsboxes2.js" + } ] } } diff --git a/tests/func/examples/newsboxes/test_newsboxes1.js b/tests/func/examples/newsboxes/test_newsboxes1.js index 6b783e44c..ba707aef1 100644 --- a/tests/func/examples/newsboxes/test_newsboxes1.js +++ b/tests/func/examples/newsboxes/test_newsboxes1.js @@ -7,14 +7,14 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("newsboxes"); + var suite = new Y.Test.Suite("Newsboxes: newsboxes1"); suite.add(new Y.Test.Case({ "test newsboxes1": function() { Y.Assert.areEqual("News", Y.one('h1').get('innerHTML').match(/News/gi)); Y.Assert.areEqual("Boxes", Y.one('h1').get('innerHTML').match(/Boxes/gi)); - Y.Assert.areEqual(9, Y.all('#toc a').get('innerHTML').size()); + Y.Assert.areEqual(12, Y.all('#toc a').size()); } })); diff --git a/tests/func/examples/newsboxes/test_newsboxes2.js b/tests/func/examples/newsboxes/test_newsboxes2.js index 2263762b2..b5d1062ae 100644 --- a/tests/func/examples/newsboxes/test_newsboxes2.js +++ b/tests/func/examples/newsboxes/test_newsboxes2.js @@ -7,14 +7,14 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Developerguide"); + var suite = new Y.Test.Suite("Newsboxes: newsbox2"); suite.add(new Y.Test.Case({ "test newsbox2": function() { Y.Assert.areEqual("Contents", Y.all('a').item(0).get('innerHTML')); Y.Assert.areEqual("Source", Y.all('a').item(1).get('innerHTML')); - Y.Assert.areEqual("selected", Y.all('span').item(0).getAttribute('class')); + Y.Assert.isTrue(Y.one('.main-sv').hasClass('yui3-scrollview-content')); } })); diff --git a/tests/func/examples/simple/simple_descriptor.json b/tests/func/examples/simple/simple_descriptor.json index 88d918341..3c2109c74 100755 --- a/tests/func/examples/simple/simple_descriptor.json +++ b/tests/func/examples/simple/simple_descriptor.json @@ -4,83 +4,83 @@ "name" : "developerguide", - "commonlib" : "yui-test.js", - - "config" :{ + "commonlib" : "../../../base/yui-test.js", + + "config" :{ "baseUrl" : "http://localhost" }, "dataprovider" : { - "part1" : { - "group" : "simple,part1", - "params" : { - "test" : "test_part1.js", - "page" : "$$config.baseUrl$$:4104/@myMojit/index" - } + "part1" : { + "group" : "simple,part1", + "params" : { + "test" : "test_part1.js", + "page" : "$$config.baseUrl$$:4104/@myMojit/index" + } }, - "part2" : { - "group" : "simple,part2", - "params" : { - "test" : "test_part2.js", + "part2" : { + "group" : "simple,part2", + "params" : { + "test" : "test_part2.js", "page" : "$$config.baseUrl$$:4105/@myMojit/index" - } + } }, - "part3" : { - "group" : "simple,part3", - "params" : { - "test" : "test_part3.js", - "page" : "$$config.baseUrl$$:4106/myBase/index" - } + "part3" : { + "group" : "simple,part3", + "params" : { + "test" : "test_part3.js", + "page" : "$$config.baseUrl$$:4106/myBase/index" + } }, - "part4" : { - "group" : "simple,part4", - "params" : { - "test" : "test_part4.js", - "page" : "$$config.baseUrl$$:4107/myBase/index" - } + "part4" : { + "group" : "simple,part4", + "params" : { + "test" : "test_part4.js", + "page" : "$$config.baseUrl$$:4107/myBase/index" + } }, - "part5" : { - "group" : "simple,part5", - "params" : { - "test" : "test_part5.js", - "page" : "$$config.baseUrl$$:4108/myBase/index" - } + "part5" : { + "group" : "simple,part5", + "params" : { + "test" : "test_part5.js", + "page" : "$$config.baseUrl$$:4108/myBase/index" + } }, - "part6" : { - "group" : "simple,part6", - "params" : { - "test" : "test_part6.js", - "page" : "$$config.baseUrl$$:4115/" - } + "part6" : { + "group" : "simple,part6", + "params" : { + "test" : "test_part6.js", + "page" : "$$config.baseUrl$$:4115/" + } }, - "part7" : { - "group" : "simple,part7", - "params" : { - "scenario": [ - { - "test" : "test_part7.js", - "page" : "$$config.baseUrl$$:4109/?lang=en", - "testName": "en" - }, - { - "test" : "test_part7.js", - "page" : "$$config.baseUrl$$:4109/?lang=en-US", - "testName": "en-US" - }, - { - "test" : "test_part7.js", - "page" : "$$config.baseUrl$$:4109/?lang=fr-FR", - "testName": "fr-FR" - } - ] - } + "part7" : { + "group" : "simple,part7", + "params" : { + "scenario": [ + { + "test" : "test_part7.js", + "page" : "$$config.baseUrl$$:4109/?lang=en", + "testName": "en" + }, + { + "test" : "test_part7.js", + "page" : "$$config.baseUrl$$:4109/?lang=en-US", + "testName": "en-US" + }, + { + "test" : "test_part7.js", + "page" : "$$config.baseUrl$$:4109/?lang=fr-FR", + "testName": "fr-FR" + } + ] + } }, - "part8" : { - "group" : "simple,part8,new", - "params" : { - "test" : "test_part8.js", - "page" : "$$config.baseUrl$$:4110/" - } + "part8" : { + "group" : "simple,part8,new", + "params" : { + "test" : "test_part8.js", + "page" : "$$config.baseUrl$$:4110/" + } } } }, diff --git a/tests/func/examples/simple/test_part1.js b/tests/func/examples/simple/test_part1.js index cc868e3ce..f73de1457 100644 --- a/tests/func/examples/simple/test_part1.js +++ b/tests/func/examples/simple/test_part1.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Simple"); + var suite = new Y.Test.Suite("Simple: part1"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/simple/test_part2.js b/tests/func/examples/simple/test_part2.js index 916800232..ef39e8317 100644 --- a/tests/func/examples/simple/test_part2.js +++ b/tests/func/examples/simple/test_part2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Simple"); + var suite = new Y.Test.Suite("Simple: part2"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/simple/test_part3.js b/tests/func/examples/simple/test_part3.js index d515072a1..7f5f45220 100644 --- a/tests/func/examples/simple/test_part3.js +++ b/tests/func/examples/simple/test_part3.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Simple"); + var suite = new Y.Test.Suite("Simple: part3"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/simple/test_part4.js b/tests/func/examples/simple/test_part4.js index a432f80e2..d29632e36 100644 --- a/tests/func/examples/simple/test_part4.js +++ b/tests/func/examples/simple/test_part4.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Simple"); + var suite = new Y.Test.Suite("Simple: part4"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/simple/test_part5.js b/tests/func/examples/simple/test_part5.js index f96fc8fdc..e91bf1265 100644 --- a/tests/func/examples/simple/test_part5.js +++ b/tests/func/examples/simple/test_part5.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Simple"); + var suite = new Y.Test.Suite("Simple: part5"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/simple/test_part6.js b/tests/func/examples/simple/test_part6.js index 1172fae3a..451ee8e9c 100644 --- a/tests/func/examples/simple/test_part6.js +++ b/tests/func/examples/simple/test_part6.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Simple"); + var suite = new Y.Test.Suite("Simple: part6"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/simple/test_part7.js b/tests/func/examples/simple/test_part7.js index 8181f9f90..172b7d50c 100644 --- a/tests/func/examples/simple/test_part7.js +++ b/tests/func/examples/simple/test_part7.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Simple"); + var suite = new Y.Test.Suite("Simple: part7"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/simple/test_part8.js b/tests/func/examples/simple/test_part8.js index d8dbbba8b..f42cf0f87 100644 --- a/tests/func/examples/simple/test_part8.js +++ b/tests/func/examples/simple/test_part8.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Simple"); + var suite = new Y.Test.Suite("Simple: part8"); suite.add(new Y.Test.Case({ diff --git a/tests/func/examples/simple/yui-test.js b/tests/func/examples/simple/yui-test.js deleted file mode 100644 index 882c91b0c..000000000 --- a/tests/func/examples/simple/yui-test.js +++ /dev/null @@ -1,1105 +0,0 @@ -YUI.add("test", function (b) { - b.namespace("Test"); - b.Test.Case = function (c) { - this._should = {}; - for (var d in c) { - this[d] = c[d]; - } - if (!b.Lang.isString(this.name)) { - this.name = "testCase" + b.guid(); - } - }; - b.Test.Case.prototype = {resume:function (c) { - b.Test.Runner.resume(c); - }, wait:function (e, d) { - var c = arguments; - if (b.Lang.isFunction(c[0])) { - throw new b.Test.Wait(c[0], c[1]); - } else { - throw new b.Test.Wait(function () { - b.Assert.fail("Timeout: wait() called but resume() never called."); - }, (b.Lang.isNumber(c[0]) ? c[0] : 10000)); - } - }, setUp:function () { - }, tearDown:function () { - }}; - b.Test.Wait = function (d, c) { - this.segment = (b.Lang.isFunction(d) ? d : null); - this.delay = (b.Lang.isNumber(c) ? c : 0); - }; - b.namespace("Test"); - b.Test.Suite = function (c) { - this.name = ""; - this.items = []; - if (b.Lang.isString(c)) { - this.name = c; - } else { - if (b.Lang.isObject(c)) { - b.mix(this, c, true); - } - } - if (this.name === "") { - this.name = "testSuite" + b.guid(); - } - }; - b.Test.Suite.prototype = {add:function (c) { - if (c instanceof b.Test.Suite || c instanceof b.Test.Case) { - this.items.push(c); - } - return this; - }, setUp:function () { - }, tearDown:function () { - }}; - b.Test.Runner = (function () { - function d(e) { - this.testObject = e; - this.firstChild = null; - this.lastChild = null; - this.parent = null; - this.next = null; - this.results = {passed:0, failed:0, total:0, ignored:0, duration:0}; - if (e instanceof b.Test.Suite) { - this.results.type = "testsuite"; - this.results.name = e.name; - } else { - if (e instanceof b.Test.Case) { - this.results.type = "testcase"; - this.results.name = e.name; - } - } - } - - d.prototype = {appendChild:function (e) { - var f = new d(e); - if (this.firstChild === null) { - this.firstChild = this.lastChild = f; - } else { - this.lastChild.next = f; - this.lastChild = f; - } - f.parent = this; - return f; - }}; - function c() { - c.superclass.constructor.apply(this, arguments); - this.masterSuite = new b.Test.Suite("yuitests" + (new Date()).getTime()); - this._cur = null; - this._root = null; - this._log = true; - this._waiting = false; - this._running = false; - this._lastResults = null; - var f = [this.TEST_CASE_BEGIN_EVENT, this.TEST_CASE_COMPLETE_EVENT, this.TEST_SUITE_BEGIN_EVENT, this.TEST_SUITE_COMPLETE_EVENT, this.TEST_PASS_EVENT, this.TEST_FAIL_EVENT, this.TEST_IGNORE_EVENT, this.COMPLETE_EVENT, this.BEGIN_EVENT]; - for (var e = 0; e < f.length; e++) { - this.on(f[e], this._logEvent, this, true); - } - } - - b.extend(c, b.Event.Target, {TEST_CASE_BEGIN_EVENT:"testcasebegin", TEST_CASE_COMPLETE_EVENT:"testcasecomplete", TEST_SUITE_BEGIN_EVENT:"testsuitebegin", TEST_SUITE_COMPLETE_EVENT:"testsuitecomplete", TEST_PASS_EVENT:"pass", TEST_FAIL_EVENT:"fail", TEST_IGNORE_EVENT:"ignore", COMPLETE_EVENT:"complete", BEGIN_EVENT:"begin", disableLogging:function () { - this._log = false; - }, enableLogging:function () { - this._log = true; - }, _logEvent:function (g) { - var f = ""; - var e = ""; - switch (g.type) { - case this.BEGIN_EVENT: - f = "Testing began at " + (new Date()).toString() + "."; - e = "info"; - break; - case this.COMPLETE_EVENT: - f = b.substitute("Testing completed at " + (new Date()).toString() + ".\n" + "Passed:{passed} Failed:{failed} " + "Total:{total} ({ignored} ignored)", g.results); - e = "info"; - break; - case this.TEST_FAIL_EVENT: - f = g.testName + ": failed.\n" + g.error.getMessage(); - e = "fail"; - break; - case this.TEST_IGNORE_EVENT: - f = g.testName + ": ignored."; - e = "ignore"; - break; - case this.TEST_PASS_EVENT: - f = g.testName + ": passed."; - e = "pass"; - break; - case this.TEST_SUITE_BEGIN_EVENT: - f = 'Test suite "' + g.testSuite.name + '" started.'; - e = "info"; - break; - case this.TEST_SUITE_COMPLETE_EVENT: - f = b.substitute('Test suite "' + g.testSuite.name + '" completed' + ".\n" + "Passed:{passed} Failed:{failed} " + "Total:{total} ({ignored} ignored)", g.results); - e = "info"; - break; - case this.TEST_CASE_BEGIN_EVENT: - f = 'Test case "' + g.testCase.name + '" started.'; - e = "info"; - break; - case this.TEST_CASE_COMPLETE_EVENT: - f = b.substitute('Test case "' + g.testCase.name + '" completed.\n' + "Passed:{passed} Failed:{failed} " + "Total:{total} ({ignored} ignored)", g.results); - e = "info"; - break; - default: - f = "Unexpected event " + g.type; - f = "info"; - } - if (this._log) { - b.log(f, e, "TestRunner"); - } - }, _addTestCaseToTestTree:function (f, g) { - var h = f.appendChild(g), i, e; - for (i in g) { - if ((i.indexOf("test") === 0 || (i.toLowerCase().indexOf("should") > -1 && i.indexOf(" ") > -1)) && b.Lang.isFunction(g[i])) { - h.appendChild(i); - } - } - }, _addTestSuiteToTestTree:function (e, h) { - var g = e.appendChild(h); - for (var f = 0; f < h.items.length; f++) { - if (h.items[f] instanceof b.Test.Suite) { - this._addTestSuiteToTestTree(g, h.items[f]); - } else { - if (h.items[f] instanceof b.Test.Case) { - this._addTestCaseToTestTree(g, h.items[f]); - } - } - } - }, _buildTestTree:function () { - this._root = new d(this.masterSuite); - for (var e = 0; e < this.masterSuite.items.length; e++) { - if (this.masterSuite.items[e] instanceof b.Test.Suite) { - this._addTestSuiteToTestTree(this._root, this.masterSuite.items[e]); - } else { - if (this.masterSuite.items[e] instanceof b.Test.Case) { - this._addTestCaseToTestTree(this._root, this.masterSuite.items[e]); - } - } - } - }, _handleTestObjectComplete:function (e) { - if (b.Lang.isObject(e.testObject)) { - if (e.parent) { - e.parent.results.passed += e.results.passed; - e.parent.results.failed += e.results.failed; - e.parent.results.total += e.results.total; - e.parent.results.ignored += e.results.ignored; - e.parent.results[e.testObject.name] = e.results; - } - if (e.testObject instanceof b.Test.Suite) { - e.testObject.tearDown(); - e.results.duration = (new Date()) - e._start; - this.fire(this.TEST_SUITE_COMPLETE_EVENT, {testSuite:e.testObject, results:e.results}); - } else { - if (e.testObject instanceof b.Test.Case) { - e.results.duration = (new Date()) - e._start; - this.fire(this.TEST_CASE_COMPLETE_EVENT, {testCase:e.testObject, results:e.results}); - } - } - } - }, _next:function () { - if (this._cur === null) { - this._cur = this._root; - } else { - if (this._cur.firstChild) { - this._cur = this._cur.firstChild; - } else { - if (this._cur.next) { - this._cur = this._cur.next; - } else { - while (this._cur && !this._cur.next && this._cur !== this._root) { - this._handleTestObjectComplete(this._cur); - this._cur = this._cur.parent; - } - this._handleTestObjectComplete(this._cur); - if (this._cur == this._root) { - this._cur.results.type = "report"; - this._cur.results.timestamp = (new Date()).toLocaleString(); - this._cur.results.duration = (new Date()) - this._cur._start; - this._lastResults = this._cur.results; - this._running = false; - this.fire(this.COMPLETE_EVENT, {results:this._lastResults}); - this._cur = null; - } else { - this._cur = this._cur.next; - } - } - } - } - return this._cur; - }, _run:function () { - var g = false; - var f = this._next(); - if (f !== null) { - this._running = true; - this._lastResult = null; - var e = f.testObject; - if (b.Lang.isObject(e)) { - if (e instanceof b.Test.Suite) { - this.fire(this.TEST_SUITE_BEGIN_EVENT, {testSuite:e}); - f._start = new Date(); - e.setUp(); - } else { - if (e instanceof b.Test.Case) { - this.fire(this.TEST_CASE_BEGIN_EVENT, {testCase:e}); - f._start = new Date(); - } - } - if (typeof setTimeout != "undefined") { - setTimeout(function () { - b.Test.Runner._run(); - }, 0); - } else { - this._run(); - } - } else { - this._runTest(f); - } - } - }, _resumeTest:function (j) { - var e = this._cur; - this._waiting = false; - if (!e) { - return; - } - var k = e.testObject; - var h = e.parent.testObject; - if (h.__yui_wait) { - clearTimeout(h.__yui_wait); - delete h.__yui_wait; - } - var n = (h._should.fail || {})[k]; - var f = (h._should.error || {})[k]; - var i = false; - var l = null; - try { - j.apply(h); - if (n) { - l = new b.Assert.ShouldFail(); - i = true; - } else { - if (f) { - l = new b.Assert.ShouldError(); - i = true; - } - } - } catch (m) { - if (h.__yui_wait) { - clearTimeout(h.__yui_wait); - delete h.__yui_wait; - } - if (m instanceof b.Assert.Error) { - if (!n) { - l = m; - i = true; - } - } else { - if (m instanceof b.Test.Wait) { - if (b.Lang.isFunction(m.segment)) { - if (b.Lang.isNumber(m.delay)) { - if (typeof setTimeout != "undefined") { - h.__yui_wait = setTimeout(function () { - b.Test.Runner._resumeTest(m.segment); - }, m.delay); - this._waiting = true; - } else { - throw new Error("Asynchronous tests not supported in this environment."); - } - } - } - return; - } else { - if (!f) { - l = new b.Assert.UnexpectedError(m); - i = true; - } else { - if (b.Lang.isString(f)) { - if (m.message != f) { - l = new b.Assert.UnexpectedError(m); - i = true; - } - } else { - if (b.Lang.isFunction(f)) { - if (!(m instanceof f)) { - l = new b.Assert.UnexpectedError(m); - i = true; - } - } else { - if (b.Lang.isObject(f)) { - if (!(m instanceof f.constructor) || m.message != f.message) { - l = new b.Assert.UnexpectedError(m); - i = true; - } - } - } - } - } - } - } - } - if (i) { - this.fire(this.TEST_FAIL_EVENT, {testCase:h, testName:k, error:l}); - } else { - this.fire(this.TEST_PASS_EVENT, {testCase:h, testName:k}); - } - h.tearDown(); - var g = (new Date()) - e._start; - e.parent.results[k] = {result:i ? "fail" : "pass", message:l ? l.getMessage() : "Test passed", type:"test", name:k, duration:g}; - if (i) { - e.parent.results.failed++; - } else { - e.parent.results.passed++; - } - e.parent.results.total++; - if (typeof setTimeout != "undefined") { - setTimeout(function () { - b.Test.Runner._run(); - }, 0); - } else { - this._run(); - } - }, _handleError:function (e) { - if (this._waiting) { - this._resumeTest(function () { - throw e; - }); - } else { - throw e; - } - }, _runTest:function (h) { - var e = h.testObject; - var f = h.parent.testObject; - var i = f[e]; - var g = (f._should.ignore || {})[e]; - if (g) { - h.parent.results[e] = {result:"ignore", message:"Test ignored", type:"test", name:e}; - h.parent.results.ignored++; - h.parent.results.total++; - this.fire(this.TEST_IGNORE_EVENT, {testCase:f, testName:e}); - if (typeof setTimeout != "undefined") { - setTimeout(function () { - b.Test.Runner._run(); - }, 0); - } else { - this._run(); - } - } else { - h._start = new Date(); - f.setUp(); - this._resumeTest(i); - } - }, getName:function () { - return this.masterSuite.name; - }, setName:function (e) { - this.masterSuite.name = e; - }, fire:function (e, f) { - f = f || {}; - f.type = e; - c.superclass.fire.call(this, e, f); - }, add:function (e) { - this.masterSuite.add(e); - return this; - }, clear:function () { - this.masterSuite = new b.Test.Suite("yuitests" + (new Date()).getTime()); - }, isWaiting:function () { - return this._waiting; - }, isRunning:function () { - return this._running; - }, getResults:function (e) { - if (!this._running && this._lastResults) { - if (b.Lang.isFunction(e)) { - return e(this._lastResults); - } else { - return this._lastResults; - } - } else { - return null; - } - }, getCoverage:function (e) { - if (!this._running && typeof _yuitest_coverage == "object") { - if (b.Lang.isFunction(e)) { - return e(_yuitest_coverage); - } else { - return _yuitest_coverage; - } - } else { - return null; - } - }, resume:function (e) { - if (b.Test.Runner._waiting) { - this._resumeTest(e || function () { - }); - } else { - throw new Error("resume() called without wait()."); - } - }, run:function (e) { - var f = b.Test.Runner; - if (!e && this.masterSuite.items.length == 1 && this.masterSuite.items[0] instanceof b.Test.Suite) { - this.masterSuite = this.masterSuite.items[0]; - } - f._buildTestTree(); - f._root._start = new Date(); - f.fire(f.BEGIN_EVENT); - f._run(); - }}); - return new c(); - })(); - b.Assert = {_asserts:0, _formatMessage:function (d, c) { - var e = d; - if (b.Lang.isString(d) && d.length > 0) { - return b.Lang.substitute(d, {message:c}); - } else { - return c; - } - }, _getCount:function () { - return this._asserts; - }, _increment:function () { - this._asserts++; - }, _reset:function () { - this._asserts = 0; - }, fail:function (c) { - throw new b.Assert.Error(b.Assert._formatMessage(c, "Test force-failed.")); - }, areEqual:function (d, e, c) { - b.Assert._increment(); - if (d != e) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Values should be equal."), d, e); - } - }, areNotEqual:function (c, e, d) { - b.Assert._increment(); - if (c == e) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(d, "Values should not be equal."), c); - } - }, areNotSame:function (c, e, d) { - b.Assert._increment(); - if (c === e) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(d, "Values should not be the same."), c); - } - }, areSame:function (d, e, c) { - b.Assert._increment(); - if (d !== e) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Values should be the same."), d, e); - } - }, isFalse:function (d, c) { - b.Assert._increment(); - if (false !== d) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be false."), false, d); - } - }, isTrue:function (d, c) { - b.Assert._increment(); - if (true !== d) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be true."), true, d); - } - }, isNaN:function (d, c) { - b.Assert._increment(); - if (!isNaN(d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be NaN."), NaN, d); - } - }, isNotNaN:function (d, c) { - b.Assert._increment(); - if (isNaN(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Values should not be NaN."), NaN); - } - }, isNotNull:function (d, c) { - b.Assert._increment(); - if (b.Lang.isNull(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Values should not be null."), null); - } - }, isNotUndefined:function (d, c) { - b.Assert._increment(); - if (b.Lang.isUndefined(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should not be undefined."), undefined); - } - }, isNull:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isNull(d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be null."), null, d); - } - }, isUndefined:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isUndefined(d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be undefined."), undefined, d); - } - }, isArray:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isArray(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be an array."), d); - } - }, isBoolean:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isBoolean(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a Boolean."), d); - } - }, isFunction:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isFunction(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a function."), d); - } - }, isInstanceOf:function (d, e, c) { - b.Assert._increment(); - if (!(e instanceof d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value isn't an instance of expected type."), d, e); - } - }, isNumber:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isNumber(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a number."), d); - } - }, isObject:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isObject(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be an object."), d); - } - }, isString:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isString(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a string."), d); - } - }, isTypeOf:function (c, e, d) { - b.Assert._increment(); - if (typeof e != c) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(d, "Value should be of type " + c + "."), expected, typeof e); - } - }}; - b.assert = function (d, c) { - b.Assert._increment(); - if (!d) { - throw new b.Assert.Error(b.Assert._formatMessage(c, "Assertion failed.")); - } - }; - b.fail = b.Assert.fail; - b.Assert.Error = function (c) { - arguments.callee.superclass.constructor.call(this, c); - this.message = c; - this.name = "Assert Error"; - }; - b.extend(b.Assert.Error, Error, {getMessage:function () { - return this.message; - }, toString:function () { - return this.name + ": " + this.getMessage(); - }, valueOf:function () { - return this.toString(); - }}); - b.Assert.ComparisonFailure = function (d, c, e) { - arguments.callee.superclass.constructor.call(this, d); - this.expected = c; - this.actual = e; - this.name = "ComparisonFailure"; - }; - b.extend(b.Assert.ComparisonFailure, b.Assert.Error, {getMessage:function () { - return this.message + "\nExpected: " + this.expected + " (" + (typeof this.expected) + ")" + "\nActual: " + this.actual + " (" + (typeof this.actual) + ")"; - }}); - b.Assert.UnexpectedValue = function (d, c) { - arguments.callee.superclass.constructor.call(this, d); - this.unexpected = c; - this.name = "UnexpectedValue"; - }; - b.extend(b.Assert.UnexpectedValue, b.Assert.Error, {getMessage:function () { - return this.message + "\nUnexpected: " + this.unexpected + " (" + (typeof this.unexpected) + ") "; - }}); - b.Assert.ShouldFail = function (c) { - arguments.callee.superclass.constructor.call(this, c || "This test should fail but didn't."); - this.name = "ShouldFail"; - }; - b.extend(b.Assert.ShouldFail, b.Assert.Error); - b.Assert.ShouldError = function (c) { - arguments.callee.superclass.constructor.call(this, c || "This test should have thrown an error but didn't."); - this.name = "ShouldError"; - }; - b.extend(b.Assert.ShouldError, b.Assert.Error); - b.Assert.UnexpectedError = function (c) { - arguments.callee.superclass.constructor.call(this, "Unexpected error: " + c.message); - this.cause = c; - this.name = "UnexpectedError"; - this.stack = c.stack; - }; - b.extend(b.Assert.UnexpectedError, b.Assert.Error); - b.ArrayAssert = {contains:function (e, d, c) { - b.Assert._increment(); - if (b.Array.indexOf(d, e) == -1) { - b.Assert.fail(b.Assert._formatMessage(c, "Value " + e + " (" + (typeof e) + ") not found in array [" + d + "].")); - } - }, containsItems:function (e, f, d) { - b.Assert._increment(); - for (var c = 0; c < e.length; c++) { - if (b.Array.indexOf(f, e[c]) == -1) { - b.Assert.fail(b.Assert._formatMessage(d, "Value " + e[c] + " (" + (typeof e[c]) + ") not found in array [" + f + "].")); - } - } - }, containsMatch:function (e, d, c) { - b.Assert._increment(); - if (typeof e != "function") { - throw new TypeError("ArrayAssert.containsMatch(): First argument must be a function."); - } - if (!b.Array.some(d, e)) { - b.Assert.fail(b.Assert._formatMessage(c, "No match found in array [" + d + "].")); - } - }, doesNotContain:function (e, d, c) { - b.Assert._increment(); - if (b.Array.indexOf(d, e) > -1) { - b.Assert.fail(b.Assert._formatMessage(c, "Value found in array [" + d + "].")); - } - }, doesNotContainItems:function (e, f, d) { - b.Assert._increment(); - for (var c = 0; c < e.length; c++) { - if (b.Array.indexOf(f, e[c]) > -1) { - b.Assert.fail(b.Assert._formatMessage(d, "Value found in array [" + f + "].")); - } - } - }, doesNotContainMatch:function (e, d, c) { - b.Assert._increment(); - if (typeof e != "function") { - throw new TypeError("ArrayAssert.doesNotContainMatch(): First argument must be a function."); - } - if (b.Array.some(d, e)) { - b.Assert.fail(b.Assert._formatMessage(c, "Value found in array [" + d + "].")); - } - }, indexOf:function (g, f, c, e) { - b.Assert._increment(); - for (var d = 0; d < f.length; d++) { - if (f[d] === g) { - if (c != d) { - b.Assert.fail(b.Assert._formatMessage(e, "Value exists at index " + d + " but should be at index " + c + ".")); - } - return; - } - } - b.Assert.fail(b.Assert._formatMessage(e, "Value doesn't exist in array [" + f + "].")); - }, itemsAreEqual:function (e, f, d) { - b.Assert._increment(); - if (e.length != f.length) { - b.Assert.fail(b.Assert._formatMessage(d, "Array should have a length of " + e.length + " but has a length of " + f.length)); - } - for (var c = 0; c < e.length; c++) { - if (e[c] != f[c]) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(d, "Values in position " + c + " are not equal."), e[c], f[c]); - } - } - }, itemsAreEquivalent:function (f, g, c, e) { - b.Assert._increment(); - if (typeof c != "function") { - throw new TypeError("ArrayAssert.itemsAreEquivalent(): Third argument must be a function."); - } - if (f.length != g.length) { - b.Assert.fail(b.Assert._formatMessage(e, "Array should have a length of " + f.length + " but has a length of " + g.length)); - } - for (var d = 0; d < f.length; d++) { - if (!c(f[d], g[d])) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(e, "Values in position " + d + " are not equivalent."), f[d], g[d]); - } - } - }, isEmpty:function (d, c) { - b.Assert._increment(); - if (d.length > 0) { - b.Assert.fail(b.Assert._formatMessage(c, "Array should be empty.")); - } - }, isNotEmpty:function (d, c) { - b.Assert._increment(); - if (d.length === 0) { - b.Assert.fail(b.Assert._formatMessage(c, "Array should not be empty.")); - } - }, itemsAreSame:function (e, f, d) { - b.Assert._increment(); - if (e.length != f.length) { - b.Assert.fail(b.Assert._formatMessage(d, "Array should have a length of " + e.length + " but has a length of " + f.length)); - } - for (var c = 0; c < e.length; c++) { - if (e[c] !== f[c]) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(d, "Values in position " + c + " are not the same."), e[c], f[c]); - } - } - }, lastIndexOf:function (g, f, c, e) { - for (var d = f.length; d >= 0; d--) { - if (f[d] === g) { - if (c != d) { - b.Assert.fail(b.Assert._formatMessage(e, "Value exists at index " + d + " but should be at index " + c + ".")); - } - return; - } - } - b.Assert.fail(b.Assert._formatMessage(e, "Value doesn't exist in array.")); - }}; - b.ObjectAssert = {areEqual:function (d, e, c) { - b.Assert._increment(); - b.Object.each(d, function (g, f) { - if (d[f] != e[f]) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Values should be equal for property " + f), d[f], e[f]); - } - }); - }, hasKey:function (c, d, e) { - b.Assert._increment(); - if (!(c in d)) { - b.fail(b.Assert._formatMessage(e, "Property '" + c + "' not found on object.")); - } - }, hasKeys:function (e, c, f) { - b.Assert._increment(); - for (var d = 0; d < e.length; d++) { - if (!(e[d] in c)) { - b.fail(b.Assert._formatMessage(f, "Property '" + e[d] + "' not found on object.")); - } - } - }, ownsKey:function (c, d, e) { - b.Assert._increment(); - if (!d.hasOwnProperty(c)) { - b.fail(b.Assert._formatMessage(e, "Property '" + c + "' not found on object instance.")); - } - }, ownsKeys:function (e, c, f) { - b.Assert._increment(); - for (var d = 0; d < e.length; d++) { - if (!c.hasOwnProperty(e[d])) { - b.fail(b.Assert._formatMessage(f, "Property '" + e[d] + "' not found on object instance.")); - } - } - }, ownsNoKeys:function (c, e) { - b.Assert._increment(); - var d = b.Object.keys(c); - if (d.length > 0) { - b.fail(b.Assert._formatMessage(e, "Object owns " + d.length + " properties but should own none.")); - } - }}; - b.DateAssert = {datesAreEqual:function (d, f, c) { - b.Assert._increment(); - if (d instanceof Date && f instanceof Date) { - var e = ""; - if (d.getFullYear() != f.getFullYear()) { - e = "Years should be equal."; - } - if (d.getMonth() != f.getMonth()) { - e = "Months should be equal."; - } - if (d.getDate() != f.getDate()) { - e = "Days of month should be equal."; - } - if (e.length) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, e), d, f); - } - } else { - throw new TypeError("Y.Assert.datesAreEqual(): Expected and actual values must be Date objects."); - } - }, timesAreEqual:function (d, f, c) { - b.Assert._increment(); - if (d instanceof Date && f instanceof Date) { - var e = ""; - if (d.getHours() != f.getHours()) { - e = "Hours should be equal."; - } - if (d.getMinutes() != f.getMinutes()) { - e = "Minutes should be equal."; - } - if (d.getSeconds() != f.getSeconds()) { - e = "Seconds should be equal."; - } - if (e.length) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, e), d, f); - } - } else { - throw new TypeError("DateY.AsserttimesAreEqual(): Expected and actual values must be Date objects."); - } - }}; - b.namespace("Test.Format"); - function a(c) { - return c.replace(/[<>"'&]/g, function (d) { - switch (d) { - case"<": - return"<"; - case">": - return">"; - case'"': - return"""; - case"'": - return"'"; - case"&": - return"&"; - } - }); - } - - b.Test.Format.JSON = function (c) { - return b.JSON.stringify(c); - }; - b.Test.Format.XML = function (d) { - function c(g) { - var e = b.Lang, f = "<" + g.type + ' name="' + a(g.name) + '"'; - if (e.isNumber(g.duration)) { - f += ' duration="' + g.duration + '"'; - } - if (g.type == "test") { - f += ' result="' + g.result + '" message="' + a(g.message) + '">'; - } else { - f += ' passed="' + g.passed + '" failed="' + g.failed + '" ignored="' + g.ignored + '" total="' + g.total + '">'; - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += c(h); - } - }); - } - f += ""; - return f; - } - - return'' + c(d); - }; - b.Test.Format.JUnitXML = function (c) { - function d(g) { - var e = b.Lang, f = ""; - switch (g.type) { - case"test": - if (g.result != "ignore") { - f = ''; - if (g.result == "fail") { - f += '"; - } - f += ""; - } - break; - case"testcase": - f = ''; - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += d(h); - } - }); - f += ""; - break; - case"testsuite": - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += d(h); - } - }); - break; - case"report": - f = ""; - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += d(h); - } - }); - f += ""; - } - return f; - } - - return'' + d(c); - }; - b.Test.Format.TAP = function (d) { - var e = 1; - - function c(g) { - var f = b.Lang, h = ""; - switch (g.type) { - case"test": - if (g.result != "ignore") { - h = "ok " + (e++) + " - " + g.name; - if (g.result == "fail") { - h = "not " + h + " - " + g.message; - } - h += "\n"; - } else { - h = "#Ignored test " + g.name + "\n"; - } - break; - case"testcase": - h = "#Begin testcase " + g.name + "(" + g.failed + " failed of " + g.total + ")\n"; - b.Object.each(g, function (i) { - if (f.isObject(i) && !f.isArray(i)) { - h += c(i); - } - }); - h += "#End testcase " + g.name + "\n"; - break; - case"testsuite": - h = "#Begin testsuite " + g.name + "(" + g.failed + " failed of " + g.total + ")\n"; - b.Object.each(g, function (i) { - if (f.isObject(i) && !f.isArray(i)) { - h += c(i); - } - }); - h += "#End testsuite " + g.name + "\n"; - break; - case"report": - b.Object.each(g, function (i) { - if (f.isObject(i) && !f.isArray(i)) { - h += c(i); - } - }); - } - return h; - } - - return"1.." + d.total + "\n" + c(d); - }; - b.namespace("Coverage.Format"); - b.Coverage.Format.JSON = function (c) { - return b.JSON.stringify(c); - }; - b.Coverage.Format.XdebugJSON = function (d) { - var c = {}; - b.Object.each(d, function (f, e) { - c[e] = d[e].lines; - }); - return b.JSON.stringify(c); - }; - b.namespace("Test"); - b.Test.Reporter = function (c, d) { - this.url = c; - this.format = d || b.Test.Format.XML; - this._fields = new Object(); - this._form = null; - this._iframe = null; - }; - b.Test.Reporter.prototype = {constructor:b.Test.Reporter, addField:function (c, d) { - this._fields[c] = d; - }, clearFields:function () { - this._fields = new Object(); - }, destroy:function () { - if (this._form) { - this._form.parentNode.removeChild(this._form); - this._form = null; - } - if (this._iframe) { - this._iframe.parentNode.removeChild(this._iframe); - this._iframe = null; - } - this._fields = null; - }, report:function (d) { - if (!this._form) { - this._form = document.createElement("form"); - this._form.method = "post"; - this._form.style.visibility = "hidden"; - this._form.style.position = "absolute"; - this._form.style.top = 0; - document.body.appendChild(this._form); - var c = document.createElement("div"); - c.innerHTML = ''; - this._iframe = c.firstChild; - this._iframe.src = "javascript:false"; - this._iframe.style.visibility = "hidden"; - this._iframe.style.position = "absolute"; - this._iframe.style.top = 0; - document.body.appendChild(this._iframe); - this._form.target = "yuiTestTarget"; - } - this._form.action = this.url; - while (this._form.hasChildNodes()) { - this._form.removeChild(this._form.lastChild); - } - this._fields.results = this.format(d); - this._fields.useragent = navigator.userAgent; - this._fields.timestamp = (new Date()).toLocaleString(); - b.Object.each(this._fields, function (f, g) { - if (typeof f != "function") { - var e = document.createElement("input"); - e.type = "hidden"; - e.name = g; - e.value = f; - this._form.appendChild(e); - } - }, this); - delete this._fields.results; - delete this._fields.useragent; - delete this._fields.timestamp; - if (arguments[1] !== false) { - this._form.submit(); - } - }}; - b.Mock = function (e) { - e = e || {}; - var c = null; - try { - c = b.Object(e); - } catch (d) { - c = {}; - b.log("Couldn't create mock with prototype.", "warn", "Mock"); - } - b.Object.each(e, function (f) { - if (b.Lang.isFunction(e[f])) { - c[f] = function () { - b.Assert.fail("Method " + f + "() was called but was not expected to be."); - }; - } - }); - return c; - }; - b.Mock.expect = function (d, h) { - if (!d.__expectations) { - d.__expectations = {}; - } - if (h.method) { - var g = h.method, f = h.args || h.arguments || [], c = h.returns, j = b.Lang.isNumber(h.callCount) ? h.callCount : 1, e = h.error, i = h.run || function () { - }; - d.__expectations[g] = h; - h.callCount = j; - h.actualCallCount = 0; - b.Array.each(f, function (k, l, m) { - if (!(m[l] instanceof b.Mock.Value)) { - m[l] = b.Mock.Value(b.Assert.areSame, [k], "Argument " + l + " of " + g + "() is incorrect."); - } - }); - if (j > 0) { - d[g] = function () { - try { - h.actualCallCount++; - b.Assert.areEqual(f.length, arguments.length, "Method " + g + "() passed incorrect number of arguments."); - for (var m = 0, k = f.length; m < k; m++) { - f[m].verify(arguments[m]); - } - i.apply(this, arguments); - if (e) { - throw e; - } - } catch (l) { - b.Test.Runner._handleError(l); - } - return c; - }; - } else { - d[g] = function () { - try { - b.Assert.fail("Method " + g + "() should not have been called."); - } catch (k) { - b.Test.Runner._handleError(k); - } - }; - } - } else { - if (h.property) { - d.__expectations[g] = h; - } - } - }; - b.Mock.verify = function (c) { - try { - b.Object.each(c.__expectations, function (e) { - if (e.method) { - b.Assert.areEqual(e.callCount, e.actualCallCount, "Method " + e.method + "() wasn't called the expected number of times."); - } else { - if (e.property) { - b.Assert.areEqual(e.value, c[e.property], "Property " + e.property + " wasn't set to the correct value."); - } - } - }); - } catch (d) { - b.Test.Runner._handleError(d); - } - }; - b.Mock.Value = function (e, c, d) { - if (b.instanceOf(this, b.Mock.Value)) { - this.verify = function (g) { - var f = [].concat(c || []); - f.push(g); - f.push(d); - e.apply(null, f); - }; - } else { - return new b.Mock.Value(e, c, d); - } - }; - b.Mock.Value.Any = b.Mock.Value(function () { - }); - b.Mock.Value.Boolean = b.Mock.Value(b.Assert.isBoolean); - b.Mock.Value.Number = b.Mock.Value(b.Assert.isNumber); - b.Mock.Value.String = b.Mock.Value(b.Assert.isString); - b.Mock.Value.Object = b.Mock.Value(b.Assert.isObject); - b.Mock.Value.Function = b.Mock.Value(b.Assert.isFunction); - if (typeof YUITest == "undefined" || !YUITest) { - YUITest = {TestRunner:b.Test.Runner, ResultsFormat:b.Test.Format, CoverageFormat:b.Coverage.Format}; - } -}, "3.4.1", {requires:["event-simulate", "event-custom", "substitute", "json-stringify"]}); diff --git a/tests/func/routing/routingtest_descriptor.json b/tests/func/routing/routingtest_descriptor.json index f25c69afc..7917f2393 100755 --- a/tests/func/routing/routingtest_descriptor.json +++ b/tests/func/routing/routingtest_descriptor.json @@ -4,7 +4,8 @@ "name" : "routing", - + "commonlib" : "../../base/yui-test.js", + "config" :{ "baseUrl" : "http://localhost:4082" }, @@ -17,30 +18,30 @@ "page" : "$$config.baseUrl$$/route-1/index" } }, - "BasicRouting2" : { - "group" : "functional,smoke,routing", - "params" : { + "BasicRouting2" : { + "group" : "functional,smoke,routing", + "params" : { "test" : "testbasicrouting2.js", "page" : "$$config.baseUrl$$/route-2/index" } }, "BasicRouting3" : { - "group" : "functional,smoke,routing", - "params" : { + "group" : "functional,smoke,routing", + "params" : { "test" : "testbasicrouting3.js", "page" : "$$config.baseUrl$$/myAction" } }, "BasicRouting4" : { "group" : "functional,smoke,routing", - "params" : { + "params" : { "test" : "testbasicrouting4.js", "page" : "$$config.baseUrl$$/route-2/myPath" } }, "BasicRouting5" : { "group" : "functional,smoke,routing", - "params" : { + "params" : { "test" : "testbasicrouting5.js", "page" : "$$config.baseUrl$$/route1/anything" } @@ -56,140 +57,140 @@ "group" : "functional,smoke,routing", "params" : { "scenario": [ - { - "page" : "$$config.baseUrl$$/route-1/run_index" - }, - { - "test" : "testbasicrouting7-1.js" - }, - { - "page" : "$$config.baseUrl$$/route-2/run_index" - }, - { - "test" : "testbasicrouting7-2.js" - } - ] + { + "page" : "$$config.baseUrl$$/route-1/run_index" + }, + { + "test" : "testbasicrouting7-1.js" + }, + { + "page" : "$$config.baseUrl$$/route-2/run_index" + }, + { + "test" : "testbasicrouting7-2.js" + } + ] } }, "BasicRouting8" : { "group" : "functional,smoke,routing", "params" : { "scenario": [ - { - "page" : "$$config.baseUrl$$/routepostget" - }, - { - "test" : "testbasicrouting8.js" - }, - { - "controller": "locator", - "params": { - "value": "#postinput", - "click": true - } - }, - { - "test" : "testbasicrouting8-1.js" - }, - { - "page" : "$$config.baseUrl$$/routepostget" - }, - { - "controller": "locator", - "params": { - "value": "#getinput", - "click": true - } - }, - { - "test" : "testbasicrouting8-2.js" - } - ] + { + "page" : "$$config.baseUrl$$/routepostget" + }, + { + "test" : "testbasicrouting8.js" + }, + { + "controller": "locator", + "params": { + "value": "#postinput", + "click": true + } + }, + { + "test" : "testbasicrouting8-1.js" + }, + { + "page" : "$$config.baseUrl$$/routepostget" + }, + { + "controller": "locator", + "params": { + "value": "#getinput", + "click": true + } + }, + { + "test" : "testbasicrouting8-2.js" + } + ] } }, "BasicRouting9" : { "group" : "functional,smoke,routing", "params" : { "scenario": [ - { - "page" : "$$config.baseUrl$$/showurl?mojit_name=route-2&mojit_action=index" - }, - { - "test" : "testbasicrouting9-1.js" - }, - { - "page" : "$$config.baseUrl$$/showurl?mojit_name=route-1&mojit_action=myAction" - }, - { - "test" : "testbasicrouting9-2.js" - } - ] + { + "page" : "$$config.baseUrl$$/showurl?mojit_name=route-2&mojit_action=index" + }, + { + "test" : "testbasicrouting9-1.js" + }, + { + "page" : "$$config.baseUrl$$/showurl?mojit_name=route-1&mojit_action=myAction" + }, + { + "test" : "testbasicrouting9-2.js" + } + ] } }, "BasicRouting10" : { "group" : "functional,smoke,routing", "params" : { "scenario": [ - { - "page" : "$$config.baseUrl$$/showurl?mojit_name=route-2&mojit_action=nothing&mojit_urlparams=http://www.abc.com" - }, - { - "test" : "testbasicrouting10-1.js" - }, - { - "page" : "$$config.baseUrl$$/showurl?mojit_name=route-2&mojit_action=nothing&mojit_verbs=POST" - }, - { - "test" : "testbasicrouting10-2.js" - } - ] + { + "page" : "$$config.baseUrl$$/showurl?mojit_name=route-2&mojit_action=nothing&mojit_urlparams=http://www.abc.com" + }, + { + "test" : "testbasicrouting10-1.js" + }, + { + "page" : "$$config.baseUrl$$/showurl?mojit_name=route-2&mojit_action=nothing&mojit_verbs=POST" + }, + { + "test" : "testbasicrouting10-2.js" + } + ] } }, "BasicRouting11" : { "group" : "functional,smoke,routing", "params" : { "scenario": [ - { - "page" : "$$config.baseUrl$$/showurl?mojit_url=/you/found/a/good/path" - }, - { - "test" : "testbasicrouting11pos.js" - }, - { - "page" : "$$config.baseUrl$$/showurl?mojit_url=/you/found/a/good/path?abc=efg" - }, - { - "test" : "testbasicrouting11pos.js" - }, - { - "page" : "$$config.baseUrl$$/showurl?mojit_url=/you/found/a/good/path&mojit_verb=GET" - }, - { - "test" : "testbasicrouting11pos.js" - }, - { - "page" : "$$config.baseUrl$$/showurl?mojit_url=/you/found/a/bad/path" - }, - { - "test" : "testbasicrouting11neg1.js" - }, - { - "page" : "$$config.baseUrl$$/showurl?mojit_url=/you/found/a/good/path&mojit_verb=POST" - }, - { - "test" : "testbasicrouting11neg2.js" - } - ] + { + "page" : "$$config.baseUrl$$/showurl?mojit_url=/you/found/a/good/path" + }, + { + "test" : "testbasicrouting11pos.js" + }, + { + "page" : "$$config.baseUrl$$/showurl?mojit_url=/you/found/a/good/path?abc=efg" + }, + { + "test" : "testbasicrouting11pos.js" + }, + { + "page" : "$$config.baseUrl$$/showurl?mojit_url=/you/found/a/good/path&mojit_verb=GET" + }, + { + "test" : "testbasicrouting11pos.js" + }, + { + "page" : "$$config.baseUrl$$/showurl?mojit_url=/you/found/a/bad/path" + }, + { + "test" : "testbasicrouting11neg1.js" + }, + { + "page" : "$$config.baseUrl$$/showurl?mojit_url=/you/found/a/good/path&mojit_verb=POST" + }, + { + "test" : "testbasicrouting11neg2.js" + } + ] } }, - "BasicRoutingNeg1" : { + "BasicRoutingNeg1" : { "group" : "functional,smoke,routing", "params" : { "test" : "testbasicroutingneg1.js", "page" : "$$config.baseUrl$$/route-2/myAction" } }, - "BasicRoutingNeg2" : { + "BasicRoutingNeg2" : { "group" : "functional,smoke,routing", "params" : { "test" : "testbasicroutingneg2.js", diff --git a/tests/func/routing/testbasicrouting1.js b/tests/func/routing/testbasicrouting1.js index 69d0c2896..540ba3074 100644 --- a/tests/func/routing/testbasicrouting1.js +++ b/tests/func/routing/testbasicrouting1.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRouting1"); suite.add(new Y.Test.Case({ "test BasicRouting1": function(){ diff --git a/tests/func/routing/testbasicrouting10-1.js b/tests/func/routing/testbasicrouting10-1.js index ce2230224..12da793a2 100644 --- a/tests/func/routing/testbasicrouting10-1.js +++ b/tests/func/routing/testbasicrouting10-1.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRouting10-1"); suite.add(new Y.Test.Case({ "test BasicRouting10-1": function(){ Y.Assert.areEqual('Click to execute the action \'route-2\' for the mojit \'nothing\'', Y.one('#mylink').get('innerHTML')); diff --git a/tests/func/routing/testbasicrouting10-2.js b/tests/func/routing/testbasicrouting10-2.js index 354625ad0..f60051569 100644 --- a/tests/func/routing/testbasicrouting10-2.js +++ b/tests/func/routing/testbasicrouting10-2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRouting10-2"); suite.add(new Y.Test.Case({ "test BasicRouting10-2": function(){ Y.Assert.areEqual('Click to execute the action \'route-2\' for the mojit \'nothing\'', Y.one('#mylink').get('innerHTML')); diff --git a/tests/func/routing/testbasicrouting11neg1.js b/tests/func/routing/testbasicrouting11neg1.js index 2f7443019..e1304d278 100644 --- a/tests/func/routing/testbasicrouting11neg1.js +++ b/tests/func/routing/testbasicrouting11neg1.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRouting11Neg1"); suite.add(new Y.Test.Case({ "test BasicRouting11Neg1": function(){ diff --git a/tests/func/routing/testbasicrouting11neg2.js b/tests/func/routing/testbasicrouting11neg2.js index 85257677a..85673d5c3 100644 --- a/tests/func/routing/testbasicrouting11neg2.js +++ b/tests/func/routing/testbasicrouting11neg2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRouting11Neg2"); suite.add(new Y.Test.Case({ "test BasicRouting11Neg2": function(){ diff --git a/tests/func/routing/testbasicrouting11pos.js b/tests/func/routing/testbasicrouting11pos.js index 884470608..192e29d3d 100644 --- a/tests/func/routing/testbasicrouting11pos.js +++ b/tests/func/routing/testbasicrouting11pos.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRouting11Pos"); suite.add(new Y.Test.Case({ "test BasicRouting11Pos": function(){ diff --git a/tests/func/routing/testbasicrouting2.js b/tests/func/routing/testbasicrouting2.js index 4552f1e74..9faf11e6d 100644 --- a/tests/func/routing/testbasicrouting2.js +++ b/tests/func/routing/testbasicrouting2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRouting2"); suite.add(new Y.Test.Case({ "test BasicRouting2": function(){ diff --git a/tests/func/routing/testbasicrouting3.js b/tests/func/routing/testbasicrouting3.js index 9b86bf865..6c23d6ba9 100644 --- a/tests/func/routing/testbasicrouting3.js +++ b/tests/func/routing/testbasicrouting3.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRouting3"); suite.add(new Y.Test.Case({ "test BasicRouting3": function(){ diff --git a/tests/func/routing/testbasicrouting4.js b/tests/func/routing/testbasicrouting4.js index fbe29892d..9d8769320 100644 --- a/tests/func/routing/testbasicrouting4.js +++ b/tests/func/routing/testbasicrouting4.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRouting4"); suite.add(new Y.Test.Case({ "test BasicRouting4": function(){ //todo diff --git a/tests/func/routing/testbasicrouting5.js b/tests/func/routing/testbasicrouting5.js index 0501251a1..2302f1e76 100644 --- a/tests/func/routing/testbasicrouting5.js +++ b/tests/func/routing/testbasicrouting5.js @@ -7,7 +7,7 @@ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRouting5"); suite.add(new Y.Test.Case({ "test BasicRouting5": function(){ diff --git a/tests/func/routing/testbasicrouting6.js b/tests/func/routing/testbasicrouting6.js index 757904ec1..7f5eddcc1 100644 --- a/tests/func/routing/testbasicrouting6.js +++ b/tests/func/routing/testbasicrouting6.js @@ -7,7 +7,7 @@ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRouting6"); suite.add(new Y.Test.Case({ "test BasicRouting6": function(){ diff --git a/tests/func/routing/testbasicrouting7-1.js b/tests/func/routing/testbasicrouting7-1.js index 2b99955be..712339279 100644 --- a/tests/func/routing/testbasicrouting7-1.js +++ b/tests/func/routing/testbasicrouting7-1.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRouting7-1"); suite.add(new Y.Test.Case({ "test BasicRouting7-1": function(){ Y.Assert.areEqual('This is a simple mojit for testing routing - SimpleRoute (route-1)', Y.one('#mytext').get('innerHTML')); diff --git a/tests/func/routing/testbasicrouting7-2.js b/tests/func/routing/testbasicrouting7-2.js index c88d300f8..e41df0217 100644 --- a/tests/func/routing/testbasicrouting7-2.js +++ b/tests/func/routing/testbasicrouting7-2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRouting7-2"); suite.add(new Y.Test.Case({ "test BasicRouting7-2": function(){ Y.Assert.areEqual('This is another simple mojit for testing routing - SimpleRoute2 (route-2)', Y.one('#mytext').get('innerHTML')); diff --git a/tests/func/routing/testbasicrouting8-1.js b/tests/func/routing/testbasicrouting8-1.js index a9060bace..8ef5b5a3a 100644 --- a/tests/func/routing/testbasicrouting8-1.js +++ b/tests/func/routing/testbasicrouting8-1.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRouting8-1"); suite.add(new Y.Test.Case({ "test BasicRouting8-1": function(){ diff --git a/tests/func/routing/testbasicrouting8-2.js b/tests/func/routing/testbasicrouting8-2.js index 425b62687..3ca535478 100644 --- a/tests/func/routing/testbasicrouting8-2.js +++ b/tests/func/routing/testbasicrouting8-2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRouting8-2"); suite.add(new Y.Test.Case({ "test BasicRouting8-2": function(){ diff --git a/tests/func/routing/testbasicrouting8.js b/tests/func/routing/testbasicrouting8.js index 72fbea65b..b146c8f69 100644 --- a/tests/func/routing/testbasicrouting8.js +++ b/tests/func/routing/testbasicrouting8.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRouting8"); suite.add(new Y.Test.Case({ "test BasicRouting8": function(){ diff --git a/tests/func/routing/testbasicrouting9-1.js b/tests/func/routing/testbasicrouting9-1.js index e57a269ee..8d8da7551 100644 --- a/tests/func/routing/testbasicrouting9-1.js +++ b/tests/func/routing/testbasicrouting9-1.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRouting9-1"); suite.add(new Y.Test.Case({ "test BasicRouting9-1": function(){ diff --git a/tests/func/routing/testbasicrouting9-2.js b/tests/func/routing/testbasicrouting9-2.js index 8339d6c6b..b6e9cad87 100644 --- a/tests/func/routing/testbasicrouting9-2.js +++ b/tests/func/routing/testbasicrouting9-2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRouting9-2"); suite.add(new Y.Test.Case({ "test BasicRouting9-2": function(){ Y.Assert.areEqual('Click to execute the action \'route-1\' for the mojit \'myAction\'', Y.one('#mylink').get('innerHTML')); diff --git a/tests/func/routing/testbasicroutingneg1.js b/tests/func/routing/testbasicroutingneg1.js index 7d4957555..8ba05731f 100644 --- a/tests/func/routing/testbasicroutingneg1.js +++ b/tests/func/routing/testbasicroutingneg1.js @@ -7,7 +7,7 @@ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRoutingNeg3"); suite.add(new Y.Test.Case({ "test BasicRoutingNeg3": function(){ diff --git a/tests/func/routing/testbasicroutingneg2.js b/tests/func/routing/testbasicroutingneg2.js index 7f31c41c5..3bbaef47e 100644 --- a/tests/func/routing/testbasicroutingneg2.js +++ b/tests/func/routing/testbasicroutingneg2.js @@ -7,7 +7,7 @@ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRoutingNeg3"); suite.add(new Y.Test.Case({ "test BasicRoutingNeg3": function(){ diff --git a/tests/func/routing/testbasicroutingneg3.js b/tests/func/routing/testbasicroutingneg3.js index 4501e805f..1241775f4 100644 --- a/tests/func/routing/testbasicroutingneg3.js +++ b/tests/func/routing/testbasicroutingneg3.js @@ -7,7 +7,7 @@ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', function (Y) { - var suite = new Y.Test.Suite("Routing"); + var suite = new Y.Test.Suite("Routing: BasicRoutingNeg3"); suite.add(new Y.Test.Case({ "test BasicRoutingNeg3": function(){ diff --git a/tests/func/serveronly/serveronlytest_descriptor.json b/tests/func/serveronly/serveronlytest_descriptor.json old mode 100755 new mode 100644 index ce865cfd4..945ae9e76 --- a/tests/func/serveronly/serveronlytest_descriptor.json +++ b/tests/func/serveronly/serveronlytest_descriptor.json @@ -4,8 +4,8 @@ "name" : "serveronly", - "commonlib" : "yui-test.js", - + "commonlib" : "../../base/yui-test.js", + "config" :{ "baseUrl" : "http://localhost:4083" }, @@ -18,44 +18,44 @@ "page" : "$$config.baseUrl$$/httpParent/testRequestObj" } }, - "HttpAddonResponseObject" : { - "group" : "smoke,httpaddon,serveronly", - "params" : { + "HttpAddonResponseObject" : { + "group" : "smoke,httpaddon,serveronly", + "params" : { "test" : "testhttpaddon-response.js", "page" : "$$config.baseUrl$$/httpParent/testResponseObj" } }, "HttpAddonRedirect" : { - "group" : "smoke,httpaddon,serveronly", - "params" : { + "group" : "smoke,httpaddon,serveronly", + "params" : { "test" : "testhttpaddon-redirect.js", "page" : "$$config.baseUrl$$/httpParent/testSimpleRedirect?method=GET&mojit=restWS&action=simpleWSCall" } }, "HttpAddonTrueXhr" : { "group" : "smoke,httpaddon,serveronly", - "params" : { + "params" : { "test" : "testhttpaddon-truexhr.js", "page" : "$$config.baseUrl$$/httpParent/callWSWithXhr?isXhr=true" } }, "HttpAddonFalseXhr" : { "group" : "smoke,httpaddon,serveronly", - "params" : { - "scenario": [ - { - "page" : "$$config.baseUrl$$/httpParent/callWSWithXhr?isXhr=false" - }, - { - "test" : "testhttpaddon-falsexhr.js" - }, - { - "page" : "$$config.baseUrl$$/httpParent/callWSWithXhr" - }, - { - "test" : "testhttpaddon-falsexhr.js" - } - ] + "params" : { + "scenario": [ + { + "page" : "$$config.baseUrl$$/httpParent/callWSWithXhr?isXhr=false" + }, + { + "test" : "testhttpaddon-falsexhr.js" + }, + { + "page" : "$$config.baseUrl$$/httpParent/callWSWithXhr" + }, + { + "test" : "testhttpaddon-falsexhr.js" + } + ] } }, "HttpAddonAddHeader" : { @@ -66,8 +66,8 @@ } }, "HttpAddonAddHeaders" : { - "group" : "smoke,httpaddon,serveronly", - "params" : { + "group" : "smoke,httpaddon,serveronly", + "params" : { "test" : "testhttpaddon-addheaders.js", "page" : "$$config.baseUrl$$/httpParent/testAddSetHeaders" } @@ -80,418 +80,418 @@ } }, "HttpAddonSetHeaders" : { - "group" : "smoke,httpaddon,serveronly", - "params" : { + "group" : "smoke,httpaddon,serveronly", + "params" : { "test" : "testhttpaddon-setheaders.js", "page" : "$$config.baseUrl$$/httpParent/testAddSetHeaders?header_option=set" } }, "HttpAddonGetHeaders" : { - "group" : "smoke,httpaddon,serveronly", - "params" : { + "group" : "smoke,httpaddon,serveronly", + "params" : { "test" : "testhttpaddon-getheaders.js", "page" : "$$config.baseUrl$$/httpParent/testGetHeaders" } }, - "simpleWSCallServer" : { + "simpleWSCallServer" : { "group" : "smoke,restlib,serveronly", - "params" : { - "scenario": [ - { + "params" : { + "scenario": [ + { "page" : "$$config.baseUrl$$/restWSFrame/index" }, { "controller": "locator", - "params": { - "value": "#a_simpleWS", - "click": true - } + "params": { + "value": "#a_simpleWS", + "click": true + } }, - { - "test" : "testrestlib-simpleWSCallServer.js" - } - ] + { + "test" : "testrestlib-simpleWSCallServer.js" + } + ] } }, - "inspectResponseServer" : { + "inspectResponseServer" : { "group" : "smoke,restlib,serveronly", "params" : { - "scenario": [ - { + "scenario": [ + { "page" : "$$config.baseUrl$$/restWSFrame/index" }, { "controller": "locator", - "params": { - "value": "#a_inspectResp", - "click": true - } + "params": { + "value": "#a_inspectResp", + "click": true + } }, - { - "test" : "testrestlib-inspectResponseServer.js" - } - ] + { + "test" : "testrestlib-inspectResponseServer.js" + } + ] } }, - "inspectResponseHeaderServer" : { + "inspectResponseHeaderServer" : { "group" : "smoke,restlib,serveronly", "params" : { - "scenario": [ - { + "scenario": [ + { "page" : "$$config.baseUrl$$/restWSFrame/index" }, { "controller": "locator", - "params": { - "value": "#a_inspectResp", - "click": true - } + "params": { + "value": "#a_inspectResp", + "click": true + } }, - { - "test" : "testrestlib-inspectResponseHeaderServer.js" - } - ] + { + "test" : "testrestlib-inspectResponseHeaderServer.js" + } + ] } }, - "inspectErrorServer" : { + "inspectErrorServer" : { "group" : "smoke,restlib,serveronly", "params" : { - "scenario": [ - { + "scenario": [ + { "page" : "$$config.baseUrl$$/restWSFrame/index" }, { "controller": "locator", - "params": { - "value": "#a_inspectErr", - "click": true - } + "params": { + "value": "#a_inspectErr", + "click": true + } }, - { - "test" : "testrestlib-inspectErrorServer.js" - } - ] + { + "test" : "testrestlib-inspectErrorServer.js" + } + ] } }, - "GETWithParamsServer" : { + "GETWithParamsServer" : { "group" : "smoke,restlib,serveronly", "params" : { - "scenario": [ - { + "scenario": [ + { "page" : "$$config.baseUrl$$/restWSFrame/index" }, { "controller": "locator", - "params": { - "value": "#a_getParam", - "click": true - } + "params": { + "value": "#a_getParam", + "click": true + } }, - { - "test" : "testrestlib-GETWithParamsServer.js" - } - ] + { + "test" : "testrestlib-GETWithParamsServer.js" + } + ] } }, - "GETWithParamsNegativeServer" : { + "GETWithParamsNegativeServer" : { "group" : "smoke,restlib,serveronly", "params" : { - "scenario": [ - { + "scenario": [ + { "page" : "$$config.baseUrl$$/restWSFrame/index" }, { "controller": "locator", - "params": { - "value": "#a_getParamNegative", - "click": true - } + "params": { + "value": "#a_getParamNegative", + "click": true + } }, - { - "test" : "testrestlib-GETWithParamsNegativeServer.js" - } - ] + { + "test" : "testrestlib-GETWithParamsNegativeServer.js" + } + ] } }, - "POSTWithParamsServer" : { + "POSTWithParamsServer" : { "group" : "smoke,restlib,serveronly", "params" : { - "scenario": [ - { + "scenario": [ + { "page" : "$$config.baseUrl$$/restWSFrame/index" }, { "controller": "locator", - "params": { - "value": "#a_postParam", - "click": true - } + "params": { + "value": "#a_postParam", + "click": true + } }, - { - "test" : "testrestlib-POSTWithParamsServer.js" - } - ] + { + "test" : "testrestlib-POSTWithParamsServer.js" + } + ] } }, - "POSTWithParamsNegativeServer" : { + "POSTWithParamsNegativeServer" : { "group" : "smoke,restlib,serveronly", "params" : { - "scenario": [ - { + "scenario": [ + { "page" : "$$config.baseUrl$$/restWSFrame/index" }, { "controller": "locator", - "params": { - "value": "#a_postParamNegative", - "click": true - } + "params": { + "value": "#a_postParamNegative", + "click": true + } }, - { - "test" : "testrestlib-POSTWithParamsNegativeServer.js" - } - ] + { + "test" : "testrestlib-POSTWithParamsNegativeServer.js" + } + ] } }, - "PUTWithParamsServer" : { + "PUTWithParamsServer" : { "group" : "smoke,restlib,serveronly", "params" : { - "scenario": [ + "scenario": [ { "page" : "$$config.baseUrl$$/restWSFrame/index" }, { "controller": "locator", - "params": { - "value": "#a_putParam", - "click": true - } + "params": { + "value": "#a_putParam", + "click": true + } }, - { - "test" : "testrestlib-PUTWithParamsServer.js" - } - ] + { + "test" : "testrestlib-PUTWithParamsServer.js" + } + ] } }, - "DELETEWithParamsServer" : { + "DELETEWithParamsServer" : { "group" : "smoke,restlib,serveronly", "params" : { - "scenario": [ - { + "scenario": [ + { "page" : "$$config.baseUrl$$/restWSFrame/index" }, { "controller": "locator", - "params": { - "value": "#a_deleteParam", - "click": true - } + "params": { + "value": "#a_deleteParam", + "click": true + } }, - { - "test" : "testrestlib-DELETEWithParamsServer.js" - } - ] + { + "test" : "testrestlib-DELETEWithParamsServer.js" + } + ] } }, - "HEADParamsServer" : { + "HEADParamsServer" : { "group" : "smoke,restlib,serveronly", "params" : { - "scenario": [ - { + "scenario": [ + { "page" : "$$config.baseUrl$$/restWSFrame/index" }, { "controller": "locator", - "params": { - "value": "#a_headParam", - "click": true - } + "params": { + "value": "#a_headParam", + "click": true + } }, - { - "test" : "testrestlib-HEADParamsServer.js" - } - ] + { + "test" : "testrestlib-HEADParamsServer.js" + } + ] } }, - "HeadersServer" : { + "HeadersServer" : { "group" : "smoke,restlib,serveronly", "params" : { - "scenario": [ - { + "scenario": [ + { "page" : "$$config.baseUrl$$/restWSFrame/index" }, { "controller": "locator", - "params": { - "value": "#a_headers", - "click": true - } + "params": { + "value": "#a_headers", + "click": true + } }, - { - "test" : "testrestlib-HeadersServer.js" - } + { + "test" : "testrestlib-HeadersServer.js" + } ] } }, - "SimpleWSCallClient" : { + "SimpleWSCallClient" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testrestlib-SimpleWSCallClient.js", "page" : "$$config.baseUrl$$/restWSFrame/index" } }, - "inspectResponseClient" : { + "inspectResponseClient" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testrestlib-inspectResponseClient.js", "page" : "$$config.baseUrl$$/restWSFrame/index" } }, - "inspectResponseHeaderClient" : { + "inspectResponseHeaderClient" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testrestlib-inspectResponseHeaderClient.js", "page" : "$$config.baseUrl$$/restWSFrame/index" } }, - "inspectErrorClient" : { + "inspectErrorClient" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testrestlib-inspectErrorClient.js", "page" : "$$config.baseUrl$$/restWSFrame/index" } }, - "GETWithParamsClient" : { + "GETWithParamsClient" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testrestlib-GETWithParamsClient.js", "page" : "$$config.baseUrl$$/restWSFrame/index" } }, - "GETWithParamsNegativeClient" : { + "GETWithParamsNegativeClient" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testrestlib-GETWithParamsNegativeClient.js", "page" : "$$config.baseUrl$$/restWSFrame/index" } }, - "POSTWithParamsClient" : { + "POSTWithParamsClient" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testrestlib-POSTWithParamsClient.js", "page" : "$$config.baseUrl$$/restWSFrame/index" } }, - "POSTWithParamsNegativeClient" : { + "POSTWithParamsNegativeClient" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testrestlib-POSTWithParamsNegativeClient.js", "page" : "$$config.baseUrl$$/restWSFrame/index" } }, - "PUTWithParamsClient" : { + "PUTWithParamsClient" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testrestlib-PUTWithParamsClient.js", "page" : "$$config.baseUrl$$/restWSFrame/index" } }, - "DELETEWithParamsClient" : { + "DELETEWithParamsClient" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testrestlib-DELETEWithParamsClient.js", "page" : "$$config.baseUrl$$/restWSFrame/index" } }, - "HeadersClient" : { + "HeadersClient" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testrestlib-HeadersClient.js", "page" : "$$config.baseUrl$$/restWSFrame/index" } }, - "bz5300267" : { + "bz5300267" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testbz5300267.js", "page" : "$$config.baseUrl$$/frame" } }, - "bz5249892" : { + "bz5249892" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testbz5249892.js", "page" : "$$config.baseUrl$$/frame" } }, - "bz5332780" : { + "bz5332780" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testbz5332780.js", "page" : "$$config.baseUrl$$/frame" } }, - "bz5264755" : { + "bz5264755" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testbz5264755.js", "page" : "$$config.baseUrl$$/frame" } }, - "bz5590319" : { + "bz5590319" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testbz5590319.js", "page" : "$$config.baseUrl$$/frame" } }, - "bz5366776" : { + "bz5366776" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testbz5366776.js", "page" : "$$config.baseUrl$$/frame" } }, - "bz5329232" : { + "bz5329232" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testbz5329232.js", "page" : "$$config.baseUrl$$/otherFeatures/index" } }, - "multiaction1" : { + "multiaction1" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testMultiActions1.js", "page" : "$$config.baseUrl$$/inst0" } }, - "multiaction2" : { + "multiaction2" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testMultiActions2.js", "page" : "$$config.baseUrl$$/inst1" } }, - "multiaction3" : { + "multiaction3" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testMultiActions3.js", "page" : "$$config.baseUrl$$/inst01" } }, - "multiaction4" : { + "multiaction4" : { "group" : "smoke,restlib,serveronly", "params" : { "test" : "testMultiActions4.js", "page" : "$$config.baseUrl$$/inst2" } }, - "refreshview" : { + "refreshview" : { "group" : "smoke,restlib,serveronly", "params" : { - "test" : "testRefreshview.js", - "page" : "$$config.baseUrl$$/refreshview" + "test" : "testRefreshview.js", + "page" : "$$config.baseUrl$$/refreshview" } } } diff --git a/tests/func/serveronly/testMultiActions1.js b/tests/func/serveronly/testMultiActions1.js index 771cea6c1..1df791ff6 100644 --- a/tests/func/serveronly/testMultiActions1.js +++ b/tests/func/serveronly/testMultiActions1.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: multiaction"); suite.add(new Y.Test.Case({ "test multiaction": function(){ diff --git a/tests/func/serveronly/testMultiActions2.js b/tests/func/serveronly/testMultiActions2.js index d1cfb6902..14eb890b7 100644 --- a/tests/func/serveronly/testMultiActions2.js +++ b/tests/func/serveronly/testMultiActions2.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: bz5300267"); suite.add(new Y.Test.Case({ "test bz5300267": function(){ diff --git a/tests/func/serveronly/testMultiActions3.js b/tests/func/serveronly/testMultiActions3.js index d1cfb6902..14eb890b7 100644 --- a/tests/func/serveronly/testMultiActions3.js +++ b/tests/func/serveronly/testMultiActions3.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: bz5300267"); suite.add(new Y.Test.Case({ "test bz5300267": function(){ diff --git a/tests/func/serveronly/testMultiActions4.js b/tests/func/serveronly/testMultiActions4.js index 2ae341bbb..afc62ea78 100644 --- a/tests/func/serveronly/testMultiActions4.js +++ b/tests/func/serveronly/testMultiActions4.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: bz5300267"); suite.add(new Y.Test.Case({ "test bz5300267": function(){ diff --git a/tests/func/serveronly/testRefreshview.js b/tests/func/serveronly/testRefreshview.js index 13edf3fdb..041012389 100644 --- a/tests/func/serveronly/testRefreshview.js +++ b/tests/func/serveronly/testRefreshview.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: refreshview"); suite.add(new Y.Test.Case({ "test refreshview": function(){ diff --git a/tests/func/serveronly/testbz4739992.js b/tests/func/serveronly/testbz4739992.js index 3c31e7a09..2f6c10a94 100644 --- a/tests/func/serveronly/testbz4739992.js +++ b/tests/func/serveronly/testbz4739992.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: bz4739992"); suite.add(new Y.Test.Case({ "test bz4739992": function(){ diff --git a/tests/func/serveronly/testbz5249892.js b/tests/func/serveronly/testbz5249892.js index f384647a0..f3fc0d578 100644 --- a/tests/func/serveronly/testbz5249892.js +++ b/tests/func/serveronly/testbz5249892.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: bz5249892"); suite.add(new Y.Test.Case({ "test bz5249892": function(){ diff --git a/tests/func/serveronly/testbz5264755.js b/tests/func/serveronly/testbz5264755.js index 4b851d109..40c4b4fce 100644 --- a/tests/func/serveronly/testbz5264755.js +++ b/tests/func/serveronly/testbz5264755.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: bz5264755"); suite.add(new Y.Test.Case({ "test bz5264755": function(){ diff --git a/tests/func/serveronly/testbz5300267.js b/tests/func/serveronly/testbz5300267.js index 2c633385b..06796287b 100644 --- a/tests/func/serveronly/testbz5300267.js +++ b/tests/func/serveronly/testbz5300267.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: bz5300267"); suite.add(new Y.Test.Case({ "test bz5300267": function(){ diff --git a/tests/func/serveronly/testbz5329232.js b/tests/func/serveronly/testbz5329232.js index 93716b692..a1f21792c 100644 --- a/tests/func/serveronly/testbz5329232.js +++ b/tests/func/serveronly/testbz5329232.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: bz5329232"); suite.add(new Y.Test.Case({ "test bz5329232": function(){ diff --git a/tests/func/serveronly/testbz5332780.js b/tests/func/serveronly/testbz5332780.js index 2eff7a039..0094e1cba 100644 --- a/tests/func/serveronly/testbz5332780.js +++ b/tests/func/serveronly/testbz5332780.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: bz5332780"); suite.add(new Y.Test.Case({ "test bz5332780": function(){ diff --git a/tests/func/serveronly/testbz5366776.js b/tests/func/serveronly/testbz5366776.js index e244c5643..7f692f581 100644 --- a/tests/func/serveronly/testbz5366776.js +++ b/tests/func/serveronly/testbz5366776.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: bz5366776"); suite.add(new Y.Test.Case({ "test bz5366776": function(){ diff --git a/tests/func/serveronly/testbz5590319.js b/tests/func/serveronly/testbz5590319.js index b7e5a779c..d6c77e16d 100644 --- a/tests/func/serveronly/testbz5590319.js +++ b/tests/func/serveronly/testbz5590319.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: bz5590319"); suite.add(new Y.Test.Case({ "test bz5590319": function(){ diff --git a/tests/func/serveronly/testhttpaddon-addheader.js b/tests/func/serveronly/testhttpaddon-addheader.js index a6a2d89c8..0db679d4f 100644 --- a/tests/func/serveronly/testhttpaddon-addheader.js +++ b/tests/func/serveronly/testhttpaddon-addheader.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: addHeader"); suite.add(new Y.Test.Case({ "test addHeader": function(){ var that = this; diff --git a/tests/func/serveronly/testhttpaddon-addheaders.js b/tests/func/serveronly/testhttpaddon-addheaders.js index 1ce2c0b9b..e9e7349b7 100644 --- a/tests/func/serveronly/testhttpaddon-addheaders.js +++ b/tests/func/serveronly/testhttpaddon-addheaders.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: addHeaders"); suite.add(new Y.Test.Case({ diff --git a/tests/func/serveronly/testhttpaddon-falsexhr.js b/tests/func/serveronly/testhttpaddon-falsexhr.js index 3848c238e..5c2651cf2 100644 --- a/tests/func/serveronly/testhttpaddon-falsexhr.js +++ b/tests/func/serveronly/testhttpaddon-falsexhr.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: falseXhr"); suite.add(new Y.Test.Case({ diff --git a/tests/func/serveronly/testhttpaddon-getheaders.js b/tests/func/serveronly/testhttpaddon-getheaders.js index 9c34bcf58..485a72671 100644 --- a/tests/func/serveronly/testhttpaddon-getheaders.js +++ b/tests/func/serveronly/testhttpaddon-getheaders.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: getHeaders"); suite.add(new Y.Test.Case({ "test getHeaders": function(){ Y.Assert.areEqual('All Headers match', Y.one('#output').get('innerHTML')); diff --git a/tests/func/serveronly/testhttpaddon-redirect.js b/tests/func/serveronly/testhttpaddon-redirect.js index d6cefb416..4633f53a4 100644 --- a/tests/func/serveronly/testhttpaddon-redirect.js +++ b/tests/func/serveronly/testhttpaddon-redirect.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: redirect"); suite.add(new Y.Test.Case({ diff --git a/tests/func/serveronly/testhttpaddon-request.js b/tests/func/serveronly/testhttpaddon-request.js index 10df26899..6c4316c0c 100644 --- a/tests/func/serveronly/testhttpaddon-request.js +++ b/tests/func/serveronly/testhttpaddon-request.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: requestObject"); suite.add(new Y.Test.Case({ diff --git a/tests/func/serveronly/testhttpaddon-response.js b/tests/func/serveronly/testhttpaddon-response.js index ed336ae6b..dcf0195ee 100644 --- a/tests/func/serveronly/testhttpaddon-response.js +++ b/tests/func/serveronly/testhttpaddon-response.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: responseObject"); suite.add(new Y.Test.Case({ diff --git a/tests/func/serveronly/testhttpaddon-setheader.js b/tests/func/serveronly/testhttpaddon-setheader.js index 4db47a5a8..982d50aa0 100644 --- a/tests/func/serveronly/testhttpaddon-setheader.js +++ b/tests/func/serveronly/testhttpaddon-setheader.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: setHeader"); suite.add(new Y.Test.Case({ diff --git a/tests/func/serveronly/testhttpaddon-setheaders.js b/tests/func/serveronly/testhttpaddon-setheaders.js index 2469bda80..1579c6bae 100644 --- a/tests/func/serveronly/testhttpaddon-setheaders.js +++ b/tests/func/serveronly/testhttpaddon-setheaders.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: setHeaders"); suite.add(new Y.Test.Case({ "test setHeaders": function(){ diff --git a/tests/func/serveronly/testhttpaddon-truexhr.js b/tests/func/serveronly/testhttpaddon-truexhr.js index d7433a387..90760e36f 100644 --- a/tests/func/serveronly/testhttpaddon-truexhr.js +++ b/tests/func/serveronly/testhttpaddon-truexhr.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: trueXhr"); suite.add(new Y.Test.Case({ diff --git a/tests/func/serveronly/testrestlib-DELETEWithParamsClient.js b/tests/func/serveronly/testrestlib-DELETEWithParamsClient.js index e7195f583..0fef99bca 100644 --- a/tests/func/serveronly/testrestlib-DELETEWithParamsClient.js +++ b/tests/func/serveronly/testrestlib-DELETEWithParamsClient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: DELETEWithParamsClient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/serveronly/testrestlib-DELETEWithParamsServer.js b/tests/func/serveronly/testrestlib-DELETEWithParamsServer.js index 4c3658f74..29114a008 100644 --- a/tests/func/serveronly/testrestlib-DELETEWithParamsServer.js +++ b/tests/func/serveronly/testrestlib-DELETEWithParamsServer.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: DELETEWithParamsServer"); suite.add(new Y.Test.Case({ "test DELETEWithParamsServer": function(){ diff --git a/tests/func/serveronly/testrestlib-GETWithParamsClient.js b/tests/func/serveronly/testrestlib-GETWithParamsClient.js index 5f27314fb..a5372b363 100644 --- a/tests/func/serveronly/testrestlib-GETWithParamsClient.js +++ b/tests/func/serveronly/testrestlib-GETWithParamsClient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: GETWithParamsClient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/serveronly/testrestlib-GETWithParamsNegativeClient.js b/tests/func/serveronly/testrestlib-GETWithParamsNegativeClient.js index 10b744b94..062f709f8 100644 --- a/tests/func/serveronly/testrestlib-GETWithParamsNegativeClient.js +++ b/tests/func/serveronly/testrestlib-GETWithParamsNegativeClient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: GETWithParamsNegativeClient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/serveronly/testrestlib-GETWithParamsNegativeServer.js b/tests/func/serveronly/testrestlib-GETWithParamsNegativeServer.js index c2443d3ad..7d0d82549 100644 --- a/tests/func/serveronly/testrestlib-GETWithParamsNegativeServer.js +++ b/tests/func/serveronly/testrestlib-GETWithParamsNegativeServer.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: GETWithParamsNegativeServer"); suite.add(new Y.Test.Case({ "test GETWithParamsNegativeServer": function(){ diff --git a/tests/func/serveronly/testrestlib-GETWithParamsServer.js b/tests/func/serveronly/testrestlib-GETWithParamsServer.js index 5f3b2e260..b77f8f4af 100644 --- a/tests/func/serveronly/testrestlib-GETWithParamsServer.js +++ b/tests/func/serveronly/testrestlib-GETWithParamsServer.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: GETWithParamsServer"); suite.add(new Y.Test.Case({ "test GETWithParamsServer": function(){ diff --git a/tests/func/serveronly/testrestlib-HEADParamsServer.js b/tests/func/serveronly/testrestlib-HEADParamsServer.js index 1975ba8ee..af5131a69 100644 --- a/tests/func/serveronly/testrestlib-HEADParamsServer.js +++ b/tests/func/serveronly/testrestlib-HEADParamsServer.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: HEADParamsServer"); suite.add(new Y.Test.Case({ "test HEADParamsServer": function(){ diff --git a/tests/func/serveronly/testrestlib-HeadersClient.js b/tests/func/serveronly/testrestlib-HeadersClient.js index 13f891903..80cccc554 100644 --- a/tests/func/serveronly/testrestlib-HeadersClient.js +++ b/tests/func/serveronly/testrestlib-HeadersClient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: HeadersClient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/serveronly/testrestlib-HeadersServer.js b/tests/func/serveronly/testrestlib-HeadersServer.js index 9e01b5059..6d020e060 100644 --- a/tests/func/serveronly/testrestlib-HeadersServer.js +++ b/tests/func/serveronly/testrestlib-HeadersServer.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: HeadersServer"); suite.add(new Y.Test.Case({ "test HeadersServer": function(){ diff --git a/tests/func/serveronly/testrestlib-POSTWithParamsClient.js b/tests/func/serveronly/testrestlib-POSTWithParamsClient.js index a14d16c97..443a9b9a1 100644 --- a/tests/func/serveronly/testrestlib-POSTWithParamsClient.js +++ b/tests/func/serveronly/testrestlib-POSTWithParamsClient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: POSTWithParamsClient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/serveronly/testrestlib-POSTWithParamsNegativeClient.js b/tests/func/serveronly/testrestlib-POSTWithParamsNegativeClient.js index 99c366734..8a663dd81 100644 --- a/tests/func/serveronly/testrestlib-POSTWithParamsNegativeClient.js +++ b/tests/func/serveronly/testrestlib-POSTWithParamsNegativeClient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: POSTWithParamsNegativeClient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/serveronly/testrestlib-POSTWithParamsNegativeServer.js b/tests/func/serveronly/testrestlib-POSTWithParamsNegativeServer.js index d154ba007..345897b18 100644 --- a/tests/func/serveronly/testrestlib-POSTWithParamsNegativeServer.js +++ b/tests/func/serveronly/testrestlib-POSTWithParamsNegativeServer.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: POSTWithParamsNegativeServer"); suite.add(new Y.Test.Case({ "test POSTWithParamsNegativeServer": function(){ diff --git a/tests/func/serveronly/testrestlib-POSTWithParamsServer.js b/tests/func/serveronly/testrestlib-POSTWithParamsServer.js index 5a72f6a2f..3ddb25e4a 100644 --- a/tests/func/serveronly/testrestlib-POSTWithParamsServer.js +++ b/tests/func/serveronly/testrestlib-POSTWithParamsServer.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: POSTWithParamsServer"); suite.add(new Y.Test.Case({ "test POSTWithParamsServer": function(){ diff --git a/tests/func/serveronly/testrestlib-PUTWithParamsClient.js b/tests/func/serveronly/testrestlib-PUTWithParamsClient.js index 7d878e8ff..53fbb336d 100644 --- a/tests/func/serveronly/testrestlib-PUTWithParamsClient.js +++ b/tests/func/serveronly/testrestlib-PUTWithParamsClient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: PUTWithParamsClient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/serveronly/testrestlib-PUTWithParamsServer.js b/tests/func/serveronly/testrestlib-PUTWithParamsServer.js index e430cc462..232bdffcd 100644 --- a/tests/func/serveronly/testrestlib-PUTWithParamsServer.js +++ b/tests/func/serveronly/testrestlib-PUTWithParamsServer.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: PUTWithParamsServer"); suite.add(new Y.Test.Case({ "test PUTWithParamsServer": function(){ diff --git a/tests/func/serveronly/testrestlib-SimpleWSCallClient.js b/tests/func/serveronly/testrestlib-SimpleWSCallClient.js index dd9bfe855..fde39206f 100644 --- a/tests/func/serveronly/testrestlib-SimpleWSCallClient.js +++ b/tests/func/serveronly/testrestlib-SimpleWSCallClient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: RestLibClient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/serveronly/testrestlib-inspectErrorClient.js b/tests/func/serveronly/testrestlib-inspectErrorClient.js index 98b76893b..f0268c37e 100644 --- a/tests/func/serveronly/testrestlib-inspectErrorClient.js +++ b/tests/func/serveronly/testrestlib-inspectErrorClient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: inspectErrorClient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/serveronly/testrestlib-inspectErrorServer.js b/tests/func/serveronly/testrestlib-inspectErrorServer.js index 91f9de753..2448dff5d 100644 --- a/tests/func/serveronly/testrestlib-inspectErrorServer.js +++ b/tests/func/serveronly/testrestlib-inspectErrorServer.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: inspectErrorServer"); suite.add(new Y.Test.Case({ "test inspectErrorServer": function(){ diff --git a/tests/func/serveronly/testrestlib-inspectResponseClient.js b/tests/func/serveronly/testrestlib-inspectResponseClient.js index 868436988..33519445f 100644 --- a/tests/func/serveronly/testrestlib-inspectResponseClient.js +++ b/tests/func/serveronly/testrestlib-inspectResponseClient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: RestLibClient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/serveronly/testrestlib-inspectResponseHeaderClient.js b/tests/func/serveronly/testrestlib-inspectResponseHeaderClient.js index 842a9b284..3ceeaaa7b 100644 --- a/tests/func/serveronly/testrestlib-inspectResponseHeaderClient.js +++ b/tests/func/serveronly/testrestlib-inspectResponseHeaderClient.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: inspectResponseHeaderClient"); suite.add(new Y.Test.Case({ diff --git a/tests/func/serveronly/testrestlib-inspectResponseHeaderServer.js b/tests/func/serveronly/testrestlib-inspectResponseHeaderServer.js index 8367c34ab..6c6941c5d 100644 --- a/tests/func/serveronly/testrestlib-inspectResponseHeaderServer.js +++ b/tests/func/serveronly/testrestlib-inspectResponseHeaderServer.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: inspectResponseHeaderServer"); suite.add(new Y.Test.Case({ "test inspectResponseHeaderServer": function(){ diff --git a/tests/func/serveronly/testrestlib-inspectResponseServer.js b/tests/func/serveronly/testrestlib-inspectResponseServer.js index 20822cdcc..70221f5a5 100644 --- a/tests/func/serveronly/testrestlib-inspectResponseServer.js +++ b/tests/func/serveronly/testrestlib-inspectResponseServer.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: inspectResponseServer"); suite.add(new Y.Test.Case({ "test inspectResponseServer": function(){ diff --git a/tests/func/serveronly/testrestlib-simpleWSCallServer.js b/tests/func/serveronly/testrestlib-simpleWSCallServer.js index 91510af53..3d721b264 100644 --- a/tests/func/serveronly/testrestlib-simpleWSCallServer.js +++ b/tests/func/serveronly/testrestlib-simpleWSCallServer.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', function (Y) { - var suite = new Y.Test.Suite("Serveronly"); + var suite = new Y.Test.Suite("ServerOnly: simpleWSCallServer"); suite.add(new Y.Test.Case({ "test simpleWSCallServer": function(){ diff --git a/tests/func/serveronly/yui-test.js b/tests/func/serveronly/yui-test.js deleted file mode 100644 index 882c91b0c..000000000 --- a/tests/func/serveronly/yui-test.js +++ /dev/null @@ -1,1105 +0,0 @@ -YUI.add("test", function (b) { - b.namespace("Test"); - b.Test.Case = function (c) { - this._should = {}; - for (var d in c) { - this[d] = c[d]; - } - if (!b.Lang.isString(this.name)) { - this.name = "testCase" + b.guid(); - } - }; - b.Test.Case.prototype = {resume:function (c) { - b.Test.Runner.resume(c); - }, wait:function (e, d) { - var c = arguments; - if (b.Lang.isFunction(c[0])) { - throw new b.Test.Wait(c[0], c[1]); - } else { - throw new b.Test.Wait(function () { - b.Assert.fail("Timeout: wait() called but resume() never called."); - }, (b.Lang.isNumber(c[0]) ? c[0] : 10000)); - } - }, setUp:function () { - }, tearDown:function () { - }}; - b.Test.Wait = function (d, c) { - this.segment = (b.Lang.isFunction(d) ? d : null); - this.delay = (b.Lang.isNumber(c) ? c : 0); - }; - b.namespace("Test"); - b.Test.Suite = function (c) { - this.name = ""; - this.items = []; - if (b.Lang.isString(c)) { - this.name = c; - } else { - if (b.Lang.isObject(c)) { - b.mix(this, c, true); - } - } - if (this.name === "") { - this.name = "testSuite" + b.guid(); - } - }; - b.Test.Suite.prototype = {add:function (c) { - if (c instanceof b.Test.Suite || c instanceof b.Test.Case) { - this.items.push(c); - } - return this; - }, setUp:function () { - }, tearDown:function () { - }}; - b.Test.Runner = (function () { - function d(e) { - this.testObject = e; - this.firstChild = null; - this.lastChild = null; - this.parent = null; - this.next = null; - this.results = {passed:0, failed:0, total:0, ignored:0, duration:0}; - if (e instanceof b.Test.Suite) { - this.results.type = "testsuite"; - this.results.name = e.name; - } else { - if (e instanceof b.Test.Case) { - this.results.type = "testcase"; - this.results.name = e.name; - } - } - } - - d.prototype = {appendChild:function (e) { - var f = new d(e); - if (this.firstChild === null) { - this.firstChild = this.lastChild = f; - } else { - this.lastChild.next = f; - this.lastChild = f; - } - f.parent = this; - return f; - }}; - function c() { - c.superclass.constructor.apply(this, arguments); - this.masterSuite = new b.Test.Suite("yuitests" + (new Date()).getTime()); - this._cur = null; - this._root = null; - this._log = true; - this._waiting = false; - this._running = false; - this._lastResults = null; - var f = [this.TEST_CASE_BEGIN_EVENT, this.TEST_CASE_COMPLETE_EVENT, this.TEST_SUITE_BEGIN_EVENT, this.TEST_SUITE_COMPLETE_EVENT, this.TEST_PASS_EVENT, this.TEST_FAIL_EVENT, this.TEST_IGNORE_EVENT, this.COMPLETE_EVENT, this.BEGIN_EVENT]; - for (var e = 0; e < f.length; e++) { - this.on(f[e], this._logEvent, this, true); - } - } - - b.extend(c, b.Event.Target, {TEST_CASE_BEGIN_EVENT:"testcasebegin", TEST_CASE_COMPLETE_EVENT:"testcasecomplete", TEST_SUITE_BEGIN_EVENT:"testsuitebegin", TEST_SUITE_COMPLETE_EVENT:"testsuitecomplete", TEST_PASS_EVENT:"pass", TEST_FAIL_EVENT:"fail", TEST_IGNORE_EVENT:"ignore", COMPLETE_EVENT:"complete", BEGIN_EVENT:"begin", disableLogging:function () { - this._log = false; - }, enableLogging:function () { - this._log = true; - }, _logEvent:function (g) { - var f = ""; - var e = ""; - switch (g.type) { - case this.BEGIN_EVENT: - f = "Testing began at " + (new Date()).toString() + "."; - e = "info"; - break; - case this.COMPLETE_EVENT: - f = b.substitute("Testing completed at " + (new Date()).toString() + ".\n" + "Passed:{passed} Failed:{failed} " + "Total:{total} ({ignored} ignored)", g.results); - e = "info"; - break; - case this.TEST_FAIL_EVENT: - f = g.testName + ": failed.\n" + g.error.getMessage(); - e = "fail"; - break; - case this.TEST_IGNORE_EVENT: - f = g.testName + ": ignored."; - e = "ignore"; - break; - case this.TEST_PASS_EVENT: - f = g.testName + ": passed."; - e = "pass"; - break; - case this.TEST_SUITE_BEGIN_EVENT: - f = 'Test suite "' + g.testSuite.name + '" started.'; - e = "info"; - break; - case this.TEST_SUITE_COMPLETE_EVENT: - f = b.substitute('Test suite "' + g.testSuite.name + '" completed' + ".\n" + "Passed:{passed} Failed:{failed} " + "Total:{total} ({ignored} ignored)", g.results); - e = "info"; - break; - case this.TEST_CASE_BEGIN_EVENT: - f = 'Test case "' + g.testCase.name + '" started.'; - e = "info"; - break; - case this.TEST_CASE_COMPLETE_EVENT: - f = b.substitute('Test case "' + g.testCase.name + '" completed.\n' + "Passed:{passed} Failed:{failed} " + "Total:{total} ({ignored} ignored)", g.results); - e = "info"; - break; - default: - f = "Unexpected event " + g.type; - f = "info"; - } - if (this._log) { - b.log(f, e, "TestRunner"); - } - }, _addTestCaseToTestTree:function (f, g) { - var h = f.appendChild(g), i, e; - for (i in g) { - if ((i.indexOf("test") === 0 || (i.toLowerCase().indexOf("should") > -1 && i.indexOf(" ") > -1)) && b.Lang.isFunction(g[i])) { - h.appendChild(i); - } - } - }, _addTestSuiteToTestTree:function (e, h) { - var g = e.appendChild(h); - for (var f = 0; f < h.items.length; f++) { - if (h.items[f] instanceof b.Test.Suite) { - this._addTestSuiteToTestTree(g, h.items[f]); - } else { - if (h.items[f] instanceof b.Test.Case) { - this._addTestCaseToTestTree(g, h.items[f]); - } - } - } - }, _buildTestTree:function () { - this._root = new d(this.masterSuite); - for (var e = 0; e < this.masterSuite.items.length; e++) { - if (this.masterSuite.items[e] instanceof b.Test.Suite) { - this._addTestSuiteToTestTree(this._root, this.masterSuite.items[e]); - } else { - if (this.masterSuite.items[e] instanceof b.Test.Case) { - this._addTestCaseToTestTree(this._root, this.masterSuite.items[e]); - } - } - } - }, _handleTestObjectComplete:function (e) { - if (b.Lang.isObject(e.testObject)) { - if (e.parent) { - e.parent.results.passed += e.results.passed; - e.parent.results.failed += e.results.failed; - e.parent.results.total += e.results.total; - e.parent.results.ignored += e.results.ignored; - e.parent.results[e.testObject.name] = e.results; - } - if (e.testObject instanceof b.Test.Suite) { - e.testObject.tearDown(); - e.results.duration = (new Date()) - e._start; - this.fire(this.TEST_SUITE_COMPLETE_EVENT, {testSuite:e.testObject, results:e.results}); - } else { - if (e.testObject instanceof b.Test.Case) { - e.results.duration = (new Date()) - e._start; - this.fire(this.TEST_CASE_COMPLETE_EVENT, {testCase:e.testObject, results:e.results}); - } - } - } - }, _next:function () { - if (this._cur === null) { - this._cur = this._root; - } else { - if (this._cur.firstChild) { - this._cur = this._cur.firstChild; - } else { - if (this._cur.next) { - this._cur = this._cur.next; - } else { - while (this._cur && !this._cur.next && this._cur !== this._root) { - this._handleTestObjectComplete(this._cur); - this._cur = this._cur.parent; - } - this._handleTestObjectComplete(this._cur); - if (this._cur == this._root) { - this._cur.results.type = "report"; - this._cur.results.timestamp = (new Date()).toLocaleString(); - this._cur.results.duration = (new Date()) - this._cur._start; - this._lastResults = this._cur.results; - this._running = false; - this.fire(this.COMPLETE_EVENT, {results:this._lastResults}); - this._cur = null; - } else { - this._cur = this._cur.next; - } - } - } - } - return this._cur; - }, _run:function () { - var g = false; - var f = this._next(); - if (f !== null) { - this._running = true; - this._lastResult = null; - var e = f.testObject; - if (b.Lang.isObject(e)) { - if (e instanceof b.Test.Suite) { - this.fire(this.TEST_SUITE_BEGIN_EVENT, {testSuite:e}); - f._start = new Date(); - e.setUp(); - } else { - if (e instanceof b.Test.Case) { - this.fire(this.TEST_CASE_BEGIN_EVENT, {testCase:e}); - f._start = new Date(); - } - } - if (typeof setTimeout != "undefined") { - setTimeout(function () { - b.Test.Runner._run(); - }, 0); - } else { - this._run(); - } - } else { - this._runTest(f); - } - } - }, _resumeTest:function (j) { - var e = this._cur; - this._waiting = false; - if (!e) { - return; - } - var k = e.testObject; - var h = e.parent.testObject; - if (h.__yui_wait) { - clearTimeout(h.__yui_wait); - delete h.__yui_wait; - } - var n = (h._should.fail || {})[k]; - var f = (h._should.error || {})[k]; - var i = false; - var l = null; - try { - j.apply(h); - if (n) { - l = new b.Assert.ShouldFail(); - i = true; - } else { - if (f) { - l = new b.Assert.ShouldError(); - i = true; - } - } - } catch (m) { - if (h.__yui_wait) { - clearTimeout(h.__yui_wait); - delete h.__yui_wait; - } - if (m instanceof b.Assert.Error) { - if (!n) { - l = m; - i = true; - } - } else { - if (m instanceof b.Test.Wait) { - if (b.Lang.isFunction(m.segment)) { - if (b.Lang.isNumber(m.delay)) { - if (typeof setTimeout != "undefined") { - h.__yui_wait = setTimeout(function () { - b.Test.Runner._resumeTest(m.segment); - }, m.delay); - this._waiting = true; - } else { - throw new Error("Asynchronous tests not supported in this environment."); - } - } - } - return; - } else { - if (!f) { - l = new b.Assert.UnexpectedError(m); - i = true; - } else { - if (b.Lang.isString(f)) { - if (m.message != f) { - l = new b.Assert.UnexpectedError(m); - i = true; - } - } else { - if (b.Lang.isFunction(f)) { - if (!(m instanceof f)) { - l = new b.Assert.UnexpectedError(m); - i = true; - } - } else { - if (b.Lang.isObject(f)) { - if (!(m instanceof f.constructor) || m.message != f.message) { - l = new b.Assert.UnexpectedError(m); - i = true; - } - } - } - } - } - } - } - } - if (i) { - this.fire(this.TEST_FAIL_EVENT, {testCase:h, testName:k, error:l}); - } else { - this.fire(this.TEST_PASS_EVENT, {testCase:h, testName:k}); - } - h.tearDown(); - var g = (new Date()) - e._start; - e.parent.results[k] = {result:i ? "fail" : "pass", message:l ? l.getMessage() : "Test passed", type:"test", name:k, duration:g}; - if (i) { - e.parent.results.failed++; - } else { - e.parent.results.passed++; - } - e.parent.results.total++; - if (typeof setTimeout != "undefined") { - setTimeout(function () { - b.Test.Runner._run(); - }, 0); - } else { - this._run(); - } - }, _handleError:function (e) { - if (this._waiting) { - this._resumeTest(function () { - throw e; - }); - } else { - throw e; - } - }, _runTest:function (h) { - var e = h.testObject; - var f = h.parent.testObject; - var i = f[e]; - var g = (f._should.ignore || {})[e]; - if (g) { - h.parent.results[e] = {result:"ignore", message:"Test ignored", type:"test", name:e}; - h.parent.results.ignored++; - h.parent.results.total++; - this.fire(this.TEST_IGNORE_EVENT, {testCase:f, testName:e}); - if (typeof setTimeout != "undefined") { - setTimeout(function () { - b.Test.Runner._run(); - }, 0); - } else { - this._run(); - } - } else { - h._start = new Date(); - f.setUp(); - this._resumeTest(i); - } - }, getName:function () { - return this.masterSuite.name; - }, setName:function (e) { - this.masterSuite.name = e; - }, fire:function (e, f) { - f = f || {}; - f.type = e; - c.superclass.fire.call(this, e, f); - }, add:function (e) { - this.masterSuite.add(e); - return this; - }, clear:function () { - this.masterSuite = new b.Test.Suite("yuitests" + (new Date()).getTime()); - }, isWaiting:function () { - return this._waiting; - }, isRunning:function () { - return this._running; - }, getResults:function (e) { - if (!this._running && this._lastResults) { - if (b.Lang.isFunction(e)) { - return e(this._lastResults); - } else { - return this._lastResults; - } - } else { - return null; - } - }, getCoverage:function (e) { - if (!this._running && typeof _yuitest_coverage == "object") { - if (b.Lang.isFunction(e)) { - return e(_yuitest_coverage); - } else { - return _yuitest_coverage; - } - } else { - return null; - } - }, resume:function (e) { - if (b.Test.Runner._waiting) { - this._resumeTest(e || function () { - }); - } else { - throw new Error("resume() called without wait()."); - } - }, run:function (e) { - var f = b.Test.Runner; - if (!e && this.masterSuite.items.length == 1 && this.masterSuite.items[0] instanceof b.Test.Suite) { - this.masterSuite = this.masterSuite.items[0]; - } - f._buildTestTree(); - f._root._start = new Date(); - f.fire(f.BEGIN_EVENT); - f._run(); - }}); - return new c(); - })(); - b.Assert = {_asserts:0, _formatMessage:function (d, c) { - var e = d; - if (b.Lang.isString(d) && d.length > 0) { - return b.Lang.substitute(d, {message:c}); - } else { - return c; - } - }, _getCount:function () { - return this._asserts; - }, _increment:function () { - this._asserts++; - }, _reset:function () { - this._asserts = 0; - }, fail:function (c) { - throw new b.Assert.Error(b.Assert._formatMessage(c, "Test force-failed.")); - }, areEqual:function (d, e, c) { - b.Assert._increment(); - if (d != e) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Values should be equal."), d, e); - } - }, areNotEqual:function (c, e, d) { - b.Assert._increment(); - if (c == e) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(d, "Values should not be equal."), c); - } - }, areNotSame:function (c, e, d) { - b.Assert._increment(); - if (c === e) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(d, "Values should not be the same."), c); - } - }, areSame:function (d, e, c) { - b.Assert._increment(); - if (d !== e) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Values should be the same."), d, e); - } - }, isFalse:function (d, c) { - b.Assert._increment(); - if (false !== d) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be false."), false, d); - } - }, isTrue:function (d, c) { - b.Assert._increment(); - if (true !== d) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be true."), true, d); - } - }, isNaN:function (d, c) { - b.Assert._increment(); - if (!isNaN(d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be NaN."), NaN, d); - } - }, isNotNaN:function (d, c) { - b.Assert._increment(); - if (isNaN(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Values should not be NaN."), NaN); - } - }, isNotNull:function (d, c) { - b.Assert._increment(); - if (b.Lang.isNull(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Values should not be null."), null); - } - }, isNotUndefined:function (d, c) { - b.Assert._increment(); - if (b.Lang.isUndefined(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should not be undefined."), undefined); - } - }, isNull:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isNull(d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be null."), null, d); - } - }, isUndefined:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isUndefined(d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be undefined."), undefined, d); - } - }, isArray:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isArray(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be an array."), d); - } - }, isBoolean:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isBoolean(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a Boolean."), d); - } - }, isFunction:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isFunction(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a function."), d); - } - }, isInstanceOf:function (d, e, c) { - b.Assert._increment(); - if (!(e instanceof d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value isn't an instance of expected type."), d, e); - } - }, isNumber:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isNumber(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a number."), d); - } - }, isObject:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isObject(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be an object."), d); - } - }, isString:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isString(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a string."), d); - } - }, isTypeOf:function (c, e, d) { - b.Assert._increment(); - if (typeof e != c) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(d, "Value should be of type " + c + "."), expected, typeof e); - } - }}; - b.assert = function (d, c) { - b.Assert._increment(); - if (!d) { - throw new b.Assert.Error(b.Assert._formatMessage(c, "Assertion failed.")); - } - }; - b.fail = b.Assert.fail; - b.Assert.Error = function (c) { - arguments.callee.superclass.constructor.call(this, c); - this.message = c; - this.name = "Assert Error"; - }; - b.extend(b.Assert.Error, Error, {getMessage:function () { - return this.message; - }, toString:function () { - return this.name + ": " + this.getMessage(); - }, valueOf:function () { - return this.toString(); - }}); - b.Assert.ComparisonFailure = function (d, c, e) { - arguments.callee.superclass.constructor.call(this, d); - this.expected = c; - this.actual = e; - this.name = "ComparisonFailure"; - }; - b.extend(b.Assert.ComparisonFailure, b.Assert.Error, {getMessage:function () { - return this.message + "\nExpected: " + this.expected + " (" + (typeof this.expected) + ")" + "\nActual: " + this.actual + " (" + (typeof this.actual) + ")"; - }}); - b.Assert.UnexpectedValue = function (d, c) { - arguments.callee.superclass.constructor.call(this, d); - this.unexpected = c; - this.name = "UnexpectedValue"; - }; - b.extend(b.Assert.UnexpectedValue, b.Assert.Error, {getMessage:function () { - return this.message + "\nUnexpected: " + this.unexpected + " (" + (typeof this.unexpected) + ") "; - }}); - b.Assert.ShouldFail = function (c) { - arguments.callee.superclass.constructor.call(this, c || "This test should fail but didn't."); - this.name = "ShouldFail"; - }; - b.extend(b.Assert.ShouldFail, b.Assert.Error); - b.Assert.ShouldError = function (c) { - arguments.callee.superclass.constructor.call(this, c || "This test should have thrown an error but didn't."); - this.name = "ShouldError"; - }; - b.extend(b.Assert.ShouldError, b.Assert.Error); - b.Assert.UnexpectedError = function (c) { - arguments.callee.superclass.constructor.call(this, "Unexpected error: " + c.message); - this.cause = c; - this.name = "UnexpectedError"; - this.stack = c.stack; - }; - b.extend(b.Assert.UnexpectedError, b.Assert.Error); - b.ArrayAssert = {contains:function (e, d, c) { - b.Assert._increment(); - if (b.Array.indexOf(d, e) == -1) { - b.Assert.fail(b.Assert._formatMessage(c, "Value " + e + " (" + (typeof e) + ") not found in array [" + d + "].")); - } - }, containsItems:function (e, f, d) { - b.Assert._increment(); - for (var c = 0; c < e.length; c++) { - if (b.Array.indexOf(f, e[c]) == -1) { - b.Assert.fail(b.Assert._formatMessage(d, "Value " + e[c] + " (" + (typeof e[c]) + ") not found in array [" + f + "].")); - } - } - }, containsMatch:function (e, d, c) { - b.Assert._increment(); - if (typeof e != "function") { - throw new TypeError("ArrayAssert.containsMatch(): First argument must be a function."); - } - if (!b.Array.some(d, e)) { - b.Assert.fail(b.Assert._formatMessage(c, "No match found in array [" + d + "].")); - } - }, doesNotContain:function (e, d, c) { - b.Assert._increment(); - if (b.Array.indexOf(d, e) > -1) { - b.Assert.fail(b.Assert._formatMessage(c, "Value found in array [" + d + "].")); - } - }, doesNotContainItems:function (e, f, d) { - b.Assert._increment(); - for (var c = 0; c < e.length; c++) { - if (b.Array.indexOf(f, e[c]) > -1) { - b.Assert.fail(b.Assert._formatMessage(d, "Value found in array [" + f + "].")); - } - } - }, doesNotContainMatch:function (e, d, c) { - b.Assert._increment(); - if (typeof e != "function") { - throw new TypeError("ArrayAssert.doesNotContainMatch(): First argument must be a function."); - } - if (b.Array.some(d, e)) { - b.Assert.fail(b.Assert._formatMessage(c, "Value found in array [" + d + "].")); - } - }, indexOf:function (g, f, c, e) { - b.Assert._increment(); - for (var d = 0; d < f.length; d++) { - if (f[d] === g) { - if (c != d) { - b.Assert.fail(b.Assert._formatMessage(e, "Value exists at index " + d + " but should be at index " + c + ".")); - } - return; - } - } - b.Assert.fail(b.Assert._formatMessage(e, "Value doesn't exist in array [" + f + "].")); - }, itemsAreEqual:function (e, f, d) { - b.Assert._increment(); - if (e.length != f.length) { - b.Assert.fail(b.Assert._formatMessage(d, "Array should have a length of " + e.length + " but has a length of " + f.length)); - } - for (var c = 0; c < e.length; c++) { - if (e[c] != f[c]) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(d, "Values in position " + c + " are not equal."), e[c], f[c]); - } - } - }, itemsAreEquivalent:function (f, g, c, e) { - b.Assert._increment(); - if (typeof c != "function") { - throw new TypeError("ArrayAssert.itemsAreEquivalent(): Third argument must be a function."); - } - if (f.length != g.length) { - b.Assert.fail(b.Assert._formatMessage(e, "Array should have a length of " + f.length + " but has a length of " + g.length)); - } - for (var d = 0; d < f.length; d++) { - if (!c(f[d], g[d])) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(e, "Values in position " + d + " are not equivalent."), f[d], g[d]); - } - } - }, isEmpty:function (d, c) { - b.Assert._increment(); - if (d.length > 0) { - b.Assert.fail(b.Assert._formatMessage(c, "Array should be empty.")); - } - }, isNotEmpty:function (d, c) { - b.Assert._increment(); - if (d.length === 0) { - b.Assert.fail(b.Assert._formatMessage(c, "Array should not be empty.")); - } - }, itemsAreSame:function (e, f, d) { - b.Assert._increment(); - if (e.length != f.length) { - b.Assert.fail(b.Assert._formatMessage(d, "Array should have a length of " + e.length + " but has a length of " + f.length)); - } - for (var c = 0; c < e.length; c++) { - if (e[c] !== f[c]) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(d, "Values in position " + c + " are not the same."), e[c], f[c]); - } - } - }, lastIndexOf:function (g, f, c, e) { - for (var d = f.length; d >= 0; d--) { - if (f[d] === g) { - if (c != d) { - b.Assert.fail(b.Assert._formatMessage(e, "Value exists at index " + d + " but should be at index " + c + ".")); - } - return; - } - } - b.Assert.fail(b.Assert._formatMessage(e, "Value doesn't exist in array.")); - }}; - b.ObjectAssert = {areEqual:function (d, e, c) { - b.Assert._increment(); - b.Object.each(d, function (g, f) { - if (d[f] != e[f]) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Values should be equal for property " + f), d[f], e[f]); - } - }); - }, hasKey:function (c, d, e) { - b.Assert._increment(); - if (!(c in d)) { - b.fail(b.Assert._formatMessage(e, "Property '" + c + "' not found on object.")); - } - }, hasKeys:function (e, c, f) { - b.Assert._increment(); - for (var d = 0; d < e.length; d++) { - if (!(e[d] in c)) { - b.fail(b.Assert._formatMessage(f, "Property '" + e[d] + "' not found on object.")); - } - } - }, ownsKey:function (c, d, e) { - b.Assert._increment(); - if (!d.hasOwnProperty(c)) { - b.fail(b.Assert._formatMessage(e, "Property '" + c + "' not found on object instance.")); - } - }, ownsKeys:function (e, c, f) { - b.Assert._increment(); - for (var d = 0; d < e.length; d++) { - if (!c.hasOwnProperty(e[d])) { - b.fail(b.Assert._formatMessage(f, "Property '" + e[d] + "' not found on object instance.")); - } - } - }, ownsNoKeys:function (c, e) { - b.Assert._increment(); - var d = b.Object.keys(c); - if (d.length > 0) { - b.fail(b.Assert._formatMessage(e, "Object owns " + d.length + " properties but should own none.")); - } - }}; - b.DateAssert = {datesAreEqual:function (d, f, c) { - b.Assert._increment(); - if (d instanceof Date && f instanceof Date) { - var e = ""; - if (d.getFullYear() != f.getFullYear()) { - e = "Years should be equal."; - } - if (d.getMonth() != f.getMonth()) { - e = "Months should be equal."; - } - if (d.getDate() != f.getDate()) { - e = "Days of month should be equal."; - } - if (e.length) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, e), d, f); - } - } else { - throw new TypeError("Y.Assert.datesAreEqual(): Expected and actual values must be Date objects."); - } - }, timesAreEqual:function (d, f, c) { - b.Assert._increment(); - if (d instanceof Date && f instanceof Date) { - var e = ""; - if (d.getHours() != f.getHours()) { - e = "Hours should be equal."; - } - if (d.getMinutes() != f.getMinutes()) { - e = "Minutes should be equal."; - } - if (d.getSeconds() != f.getSeconds()) { - e = "Seconds should be equal."; - } - if (e.length) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, e), d, f); - } - } else { - throw new TypeError("DateY.AsserttimesAreEqual(): Expected and actual values must be Date objects."); - } - }}; - b.namespace("Test.Format"); - function a(c) { - return c.replace(/[<>"'&]/g, function (d) { - switch (d) { - case"<": - return"<"; - case">": - return">"; - case'"': - return"""; - case"'": - return"'"; - case"&": - return"&"; - } - }); - } - - b.Test.Format.JSON = function (c) { - return b.JSON.stringify(c); - }; - b.Test.Format.XML = function (d) { - function c(g) { - var e = b.Lang, f = "<" + g.type + ' name="' + a(g.name) + '"'; - if (e.isNumber(g.duration)) { - f += ' duration="' + g.duration + '"'; - } - if (g.type == "test") { - f += ' result="' + g.result + '" message="' + a(g.message) + '">'; - } else { - f += ' passed="' + g.passed + '" failed="' + g.failed + '" ignored="' + g.ignored + '" total="' + g.total + '">'; - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += c(h); - } - }); - } - f += ""; - return f; - } - - return'' + c(d); - }; - b.Test.Format.JUnitXML = function (c) { - function d(g) { - var e = b.Lang, f = ""; - switch (g.type) { - case"test": - if (g.result != "ignore") { - f = ''; - if (g.result == "fail") { - f += '"; - } - f += ""; - } - break; - case"testcase": - f = ''; - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += d(h); - } - }); - f += ""; - break; - case"testsuite": - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += d(h); - } - }); - break; - case"report": - f = ""; - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += d(h); - } - }); - f += ""; - } - return f; - } - - return'' + d(c); - }; - b.Test.Format.TAP = function (d) { - var e = 1; - - function c(g) { - var f = b.Lang, h = ""; - switch (g.type) { - case"test": - if (g.result != "ignore") { - h = "ok " + (e++) + " - " + g.name; - if (g.result == "fail") { - h = "not " + h + " - " + g.message; - } - h += "\n"; - } else { - h = "#Ignored test " + g.name + "\n"; - } - break; - case"testcase": - h = "#Begin testcase " + g.name + "(" + g.failed + " failed of " + g.total + ")\n"; - b.Object.each(g, function (i) { - if (f.isObject(i) && !f.isArray(i)) { - h += c(i); - } - }); - h += "#End testcase " + g.name + "\n"; - break; - case"testsuite": - h = "#Begin testsuite " + g.name + "(" + g.failed + " failed of " + g.total + ")\n"; - b.Object.each(g, function (i) { - if (f.isObject(i) && !f.isArray(i)) { - h += c(i); - } - }); - h += "#End testsuite " + g.name + "\n"; - break; - case"report": - b.Object.each(g, function (i) { - if (f.isObject(i) && !f.isArray(i)) { - h += c(i); - } - }); - } - return h; - } - - return"1.." + d.total + "\n" + c(d); - }; - b.namespace("Coverage.Format"); - b.Coverage.Format.JSON = function (c) { - return b.JSON.stringify(c); - }; - b.Coverage.Format.XdebugJSON = function (d) { - var c = {}; - b.Object.each(d, function (f, e) { - c[e] = d[e].lines; - }); - return b.JSON.stringify(c); - }; - b.namespace("Test"); - b.Test.Reporter = function (c, d) { - this.url = c; - this.format = d || b.Test.Format.XML; - this._fields = new Object(); - this._form = null; - this._iframe = null; - }; - b.Test.Reporter.prototype = {constructor:b.Test.Reporter, addField:function (c, d) { - this._fields[c] = d; - }, clearFields:function () { - this._fields = new Object(); - }, destroy:function () { - if (this._form) { - this._form.parentNode.removeChild(this._form); - this._form = null; - } - if (this._iframe) { - this._iframe.parentNode.removeChild(this._iframe); - this._iframe = null; - } - this._fields = null; - }, report:function (d) { - if (!this._form) { - this._form = document.createElement("form"); - this._form.method = "post"; - this._form.style.visibility = "hidden"; - this._form.style.position = "absolute"; - this._form.style.top = 0; - document.body.appendChild(this._form); - var c = document.createElement("div"); - c.innerHTML = ''; - this._iframe = c.firstChild; - this._iframe.src = "javascript:false"; - this._iframe.style.visibility = "hidden"; - this._iframe.style.position = "absolute"; - this._iframe.style.top = 0; - document.body.appendChild(this._iframe); - this._form.target = "yuiTestTarget"; - } - this._form.action = this.url; - while (this._form.hasChildNodes()) { - this._form.removeChild(this._form.lastChild); - } - this._fields.results = this.format(d); - this._fields.useragent = navigator.userAgent; - this._fields.timestamp = (new Date()).toLocaleString(); - b.Object.each(this._fields, function (f, g) { - if (typeof f != "function") { - var e = document.createElement("input"); - e.type = "hidden"; - e.name = g; - e.value = f; - this._form.appendChild(e); - } - }, this); - delete this._fields.results; - delete this._fields.useragent; - delete this._fields.timestamp; - if (arguments[1] !== false) { - this._form.submit(); - } - }}; - b.Mock = function (e) { - e = e || {}; - var c = null; - try { - c = b.Object(e); - } catch (d) { - c = {}; - b.log("Couldn't create mock with prototype.", "warn", "Mock"); - } - b.Object.each(e, function (f) { - if (b.Lang.isFunction(e[f])) { - c[f] = function () { - b.Assert.fail("Method " + f + "() was called but was not expected to be."); - }; - } - }); - return c; - }; - b.Mock.expect = function (d, h) { - if (!d.__expectations) { - d.__expectations = {}; - } - if (h.method) { - var g = h.method, f = h.args || h.arguments || [], c = h.returns, j = b.Lang.isNumber(h.callCount) ? h.callCount : 1, e = h.error, i = h.run || function () { - }; - d.__expectations[g] = h; - h.callCount = j; - h.actualCallCount = 0; - b.Array.each(f, function (k, l, m) { - if (!(m[l] instanceof b.Mock.Value)) { - m[l] = b.Mock.Value(b.Assert.areSame, [k], "Argument " + l + " of " + g + "() is incorrect."); - } - }); - if (j > 0) { - d[g] = function () { - try { - h.actualCallCount++; - b.Assert.areEqual(f.length, arguments.length, "Method " + g + "() passed incorrect number of arguments."); - for (var m = 0, k = f.length; m < k; m++) { - f[m].verify(arguments[m]); - } - i.apply(this, arguments); - if (e) { - throw e; - } - } catch (l) { - b.Test.Runner._handleError(l); - } - return c; - }; - } else { - d[g] = function () { - try { - b.Assert.fail("Method " + g + "() should not have been called."); - } catch (k) { - b.Test.Runner._handleError(k); - } - }; - } - } else { - if (h.property) { - d.__expectations[g] = h; - } - } - }; - b.Mock.verify = function (c) { - try { - b.Object.each(c.__expectations, function (e) { - if (e.method) { - b.Assert.areEqual(e.callCount, e.actualCallCount, "Method " + e.method + "() wasn't called the expected number of times."); - } else { - if (e.property) { - b.Assert.areEqual(e.value, c[e.property], "Property " + e.property + " wasn't set to the correct value."); - } - } - }); - } catch (d) { - b.Test.Runner._handleError(d); - } - }; - b.Mock.Value = function (e, c, d) { - if (b.instanceOf(this, b.Mock.Value)) { - this.verify = function (g) { - var f = [].concat(c || []); - f.push(g); - f.push(d); - e.apply(null, f); - }; - } else { - return new b.Mock.Value(e, c, d); - } - }; - b.Mock.Value.Any = b.Mock.Value(function () { - }); - b.Mock.Value.Boolean = b.Mock.Value(b.Assert.isBoolean); - b.Mock.Value.Number = b.Mock.Value(b.Assert.isNumber); - b.Mock.Value.String = b.Mock.Value(b.Assert.isString); - b.Mock.Value.Object = b.Mock.Value(b.Assert.isObject); - b.Mock.Value.Function = b.Mock.Value(b.Assert.isFunction); - if (typeof YUITest == "undefined" || !YUITest) { - YUITest = {TestRunner:b.Test.Runner, ResultsFormat:b.Test.Format, CoverageFormat:b.Coverage.Format}; - } -}, "3.4.1", {requires:["event-simulate", "event-custom", "substitute", "json-stringify"]}); diff --git a/tests/func/usecases/testflickr1.js b/tests/func/usecases/testflickr1.js index e0a0e6fbc..066567f16 100644 --- a/tests/func/usecases/testflickr1.js +++ b/tests/func/usecases/testflickr1.js @@ -8,7 +8,7 @@ YUI({ }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("UseCase"); + var suite = new Y.Test.Suite("UseCases: flickr"); suite.add(new Y.Test.Case({ diff --git a/tests/func/usecases/testhello.js b/tests/func/usecases/testhello.js index 4feb3d068..ba7456333 100644 --- a/tests/func/usecases/testhello.js +++ b/tests/func/usecases/testhello.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("UseCase"); + var suite = new Y.Test.Suite("UseCases: hello"); suite.add(new Y.Test.Case({ diff --git a/tests/func/usecases/testi18n-de.js b/tests/func/usecases/testi18n-de.js index 1c2bf2388..00be6407c 100644 --- a/tests/func/usecases/testi18n-de.js +++ b/tests/func/usecases/testi18n-de.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("UseCase"); + var suite = new Y.Test.Suite("UseCases: i18n-de"); suite.add(new Y.Test.Case({ "test i18n-de": function() { diff --git a/tests/func/usecases/testi18n-neg.js b/tests/func/usecases/testi18n-neg.js index f94f3b99a..a130db5b9 100644 --- a/tests/func/usecases/testi18n-neg.js +++ b/tests/func/usecases/testi18n-neg.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("UseCase"); + var suite = new Y.Test.Suite("UseCases: i18n-neg"); suite.add(new Y.Test.Case({ "test i18n": function() { diff --git a/tests/func/usecases/testi18n.js b/tests/func/usecases/testi18n.js index d9989a209..1ee047386 100644 --- a/tests/func/usecases/testi18n.js +++ b/tests/func/usecases/testi18n.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("UseCase"); + var suite = new Y.Test.Suite("UseCases: i18n"); suite.add(new Y.Test.Case({ "test i18n": function() { diff --git a/tests/func/usecases/testi18nintlLang.js b/tests/func/usecases/testi18nintlLang.js index 11295849b..b80d7c152 100644 --- a/tests/func/usecases/testi18nintlLang.js +++ b/tests/func/usecases/testi18nintlLang.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("UseCase"); + var suite = new Y.Test.Suite("UseCases: i18nIntlLang"); suite.add(new Y.Test.Case({ "test i18n": function() { diff --git a/tests/func/usecases/testpagedflickr-de-page2.js b/tests/func/usecases/testpagedflickr-de-page2.js index be399cbcf..8e82edbc6 100644 --- a/tests/func/usecases/testpagedflickr-de-page2.js +++ b/tests/func/usecases/testpagedflickr-de-page2.js @@ -9,7 +9,7 @@ YUI({ }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("UseCase"); + var suite = new Y.Test.Suite("UseCases: pagedflickr-page2"); suite.add(new Y.Test.Case({ diff --git a/tests/func/usecases/testpagedflickr-de.js b/tests/func/usecases/testpagedflickr-de.js index 02254031b..3ff428c34 100644 --- a/tests/func/usecases/testpagedflickr-de.js +++ b/tests/func/usecases/testpagedflickr-de.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("UseCase"); + var suite = new Y.Test.Suite("UseCases: pagedflickr-de"); suite.add(new Y.Test.Case({ diff --git a/tests/func/usecases/testpagedflickr-page2.js b/tests/func/usecases/testpagedflickr-page2.js index 011902ca6..598262892 100644 --- a/tests/func/usecases/testpagedflickr-page2.js +++ b/tests/func/usecases/testpagedflickr-page2.js @@ -9,7 +9,7 @@ YUI({ }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("UseCase"); + var suite = new Y.Test.Suite("UseCases: pagedflickr-page2"); suite.add(new Y.Test.Case({ diff --git a/tests/func/usecases/testpagedflickr.js b/tests/func/usecases/testpagedflickr.js index 7ff086f87..e0dbac744 100644 --- a/tests/func/usecases/testpagedflickr.js +++ b/tests/func/usecases/testpagedflickr.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("UseCase"); + var suite = new Y.Test.Suite("UseCases: pagedflickr"); suite.add(new Y.Test.Case({ diff --git a/tests/func/usecases/testpreattachedbinder.js b/tests/func/usecases/testpreattachedbinder.js index 54e868705..155b85454 100644 --- a/tests/func/usecases/testpreattachedbinder.js +++ b/tests/func/usecases/testpreattachedbinder.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("UseCase"); + var suite = new Y.Test.Suite("UseCases: preattachedbinder"); suite.add(new Y.Test.Case({ "test preattachedbinder": function() { diff --git a/tests/func/usecases/testpreinit.js b/tests/func/usecases/testpreinit.js index fdfa6f24e..a9f3a4770 100644 --- a/tests/func/usecases/testpreinit.js +++ b/tests/func/usecases/testpreinit.js @@ -7,7 +7,7 @@ YUI({ logInclude: { TestRunner: true } }).use('node', 'node-event-simulate', 'test', 'console', 'intl', 'datatype-date-format', function (Y) { - var suite = new Y.Test.Suite("UseCase"); + var suite = new Y.Test.Suite("UseCases: preinit"); suite.add(new Y.Test.Case({ "test preinit": function() { diff --git a/tests/func/usecases/usecasestest_descriptor.json b/tests/func/usecases/usecasestest_descriptor.json index 4648d3c55..fedefb801 100755 --- a/tests/func/usecases/usecasestest_descriptor.json +++ b/tests/func/usecases/usecasestest_descriptor.json @@ -3,9 +3,9 @@ "settings": [ "master" ], "name" : "usecase", - - "commonlib" : "yui-test.js", - + + "commonlib" : "../../base/yui-test.js", + "config" :{ "baseUrl" : "http://localhost:4085" }, @@ -18,155 +18,155 @@ "page" : "$$config.baseUrl$$/hello-1/index" } }, - "flickr1" : { - "group" : "smoke,usecases", - "params" : { + "flickr1" : { + "group" : "smoke,usecases", + "params" : { "test" : "testflickr1.js", "page" : "$$config.baseUrl$$/flickr-1/index" } }, "i18n" : { - "group" : "smoke,usecases", - "params" : { + "group" : "smoke,usecases", + "params" : { "test" : "testi18n.js", "page" : "$$config.baseUrl$$/i18n-1/index" } }, "i18n-en" : { - "group" : "smoke,usecases", - "params" : { + "group" : "smoke,usecases", + "params" : { "test" : "testi18n.js", "page" : "$$config.baseUrl$$/i18n-1/index?lang=en-US" } }, "i18n-de" : { "group" : "smoke,usecases", - "params" : { + "params" : { "test" : "testi18n-de.js", "page" : "$$config.baseUrl$$/i18n-1/index?lang=de" } }, "i18n-fr" : { "group" : "smoke,usecases", - "params" : { + "params" : { "test" : "testi18n-neg.js", "page" : "$$config.baseUrl$$/i18n-1/index?lang=fr" } }, - "i18n-intlLang" : { + "i18n-intlLang" : { "group" : "smoke,usecases", - "params" : { + "params" : { "test" : "testi18nintlLang.js", "page" : "$$config.baseUrl$$/i18n-1/index" } }, "i18n-intlLang-de" : { "group" : "smoke,usecases", - "params" : { + "params" : { "test" : "testi18nintlLang.js", "page" : "$$config.baseUrl$$/i18n-1/index?lang=de" } }, - "i18n2" : { - "group" : "smoke,usecases", - "params" : { + "i18n2" : { + "group" : "smoke,usecases", + "params" : { "test" : "testi18n.js", "page" : "$$config.baseUrl$$/i18n-2/index" } }, "i18n2-en" : { - "group" : "smoke,usecases", - "params" : { + "group" : "smoke,usecases", + "params" : { "test" : "testi18n.js", "page" : "$$config.baseUrl$$/i18n-2/index?lang=en-US" } }, "i18n2-de" : { "group" : "smoke,usecases", - "params" : { + "params" : { "test" : "testi18n-de.js", "page" : "$$config.baseUrl$$/i18n-2/index?lang=de" } }, "i18n2-fr" : { "group" : "smoke,usecases", - "params" : { + "params" : { "test" : "testi18n-neg.js", "page" : "$$config.baseUrl$$/i18n-2/index?lang=fr" } }, "pagedflickr" : { "group" : "smoke,usecases", - "params" : { - "scenario": [ + "params" : { + "scenario": [ { "test" : "testpagedflickr.js", "page" : "$$config.baseUrl$$/flickr" }, { "controller": "locator", - "params": { - "value": "#paginate a", - "click": true - } + "params": { + "value": "#paginate a", + "click": true + } + }, + { + "test" : "testpagedflickr-page2.js" }, - { - "test" : "testpagedflickr-page2.js" - }, - { + { "controller": "locator", - "params": { - "value": "#paginate a", - "click": true - } + "params": { + "value": "#paginate a", + "click": true + } }, - { - "test" : "testpagedflickr.js" - } + { + "test" : "testpagedflickr.js" + } ] } }, - "pagedflickr-de" : { + "pagedflickr-de" : { "group" : "smoke,usecases", - "params" : { - "scenario": [ + "params" : { + "scenario": [ { "test" : "testpagedflickr-de.js", "page" : "$$config.baseUrl$$/flickr?lang=de" }, { "controller": "locator", - "params": { - "value": "#paginate a", - "click": true - } + "params": { + "value": "#paginate a", + "click": true + } + }, + { + "test" : "testpagedflickr-de-page2.js" }, - { - "test" : "testpagedflickr-de-page2.js" - }, - { + { "controller": "locator", - "params": { - "value": "#paginate a", - "click": true - } + "params": { + "value": "#paginate a", + "click": true + } }, - { - "test" : "testpagedflickr-de.js" - } + { + "test" : "testpagedflickr-de.js" + } ] } }, - "preinit" : { - "group" : "smoke,usecases", - "params" : { + "preinit" : { + "group" : "smoke,usecases", + "params" : { "test" : "testpreinit.js", "page" : "$$config.baseUrl$$/flickr2" } }, - "preattachbinder" : { - "group" : "smoke,usecases", - "params" : { + "preattachbinder" : { + "group" : "smoke,usecases", + "params" : { "test" : "testpreattachedbinder.js", "page" : "$$config.baseUrl$$/flickr2" } diff --git a/tests/func/usecases/yui-test.js b/tests/func/usecases/yui-test.js deleted file mode 100644 index 882c91b0c..000000000 --- a/tests/func/usecases/yui-test.js +++ /dev/null @@ -1,1105 +0,0 @@ -YUI.add("test", function (b) { - b.namespace("Test"); - b.Test.Case = function (c) { - this._should = {}; - for (var d in c) { - this[d] = c[d]; - } - if (!b.Lang.isString(this.name)) { - this.name = "testCase" + b.guid(); - } - }; - b.Test.Case.prototype = {resume:function (c) { - b.Test.Runner.resume(c); - }, wait:function (e, d) { - var c = arguments; - if (b.Lang.isFunction(c[0])) { - throw new b.Test.Wait(c[0], c[1]); - } else { - throw new b.Test.Wait(function () { - b.Assert.fail("Timeout: wait() called but resume() never called."); - }, (b.Lang.isNumber(c[0]) ? c[0] : 10000)); - } - }, setUp:function () { - }, tearDown:function () { - }}; - b.Test.Wait = function (d, c) { - this.segment = (b.Lang.isFunction(d) ? d : null); - this.delay = (b.Lang.isNumber(c) ? c : 0); - }; - b.namespace("Test"); - b.Test.Suite = function (c) { - this.name = ""; - this.items = []; - if (b.Lang.isString(c)) { - this.name = c; - } else { - if (b.Lang.isObject(c)) { - b.mix(this, c, true); - } - } - if (this.name === "") { - this.name = "testSuite" + b.guid(); - } - }; - b.Test.Suite.prototype = {add:function (c) { - if (c instanceof b.Test.Suite || c instanceof b.Test.Case) { - this.items.push(c); - } - return this; - }, setUp:function () { - }, tearDown:function () { - }}; - b.Test.Runner = (function () { - function d(e) { - this.testObject = e; - this.firstChild = null; - this.lastChild = null; - this.parent = null; - this.next = null; - this.results = {passed:0, failed:0, total:0, ignored:0, duration:0}; - if (e instanceof b.Test.Suite) { - this.results.type = "testsuite"; - this.results.name = e.name; - } else { - if (e instanceof b.Test.Case) { - this.results.type = "testcase"; - this.results.name = e.name; - } - } - } - - d.prototype = {appendChild:function (e) { - var f = new d(e); - if (this.firstChild === null) { - this.firstChild = this.lastChild = f; - } else { - this.lastChild.next = f; - this.lastChild = f; - } - f.parent = this; - return f; - }}; - function c() { - c.superclass.constructor.apply(this, arguments); - this.masterSuite = new b.Test.Suite("yuitests" + (new Date()).getTime()); - this._cur = null; - this._root = null; - this._log = true; - this._waiting = false; - this._running = false; - this._lastResults = null; - var f = [this.TEST_CASE_BEGIN_EVENT, this.TEST_CASE_COMPLETE_EVENT, this.TEST_SUITE_BEGIN_EVENT, this.TEST_SUITE_COMPLETE_EVENT, this.TEST_PASS_EVENT, this.TEST_FAIL_EVENT, this.TEST_IGNORE_EVENT, this.COMPLETE_EVENT, this.BEGIN_EVENT]; - for (var e = 0; e < f.length; e++) { - this.on(f[e], this._logEvent, this, true); - } - } - - b.extend(c, b.Event.Target, {TEST_CASE_BEGIN_EVENT:"testcasebegin", TEST_CASE_COMPLETE_EVENT:"testcasecomplete", TEST_SUITE_BEGIN_EVENT:"testsuitebegin", TEST_SUITE_COMPLETE_EVENT:"testsuitecomplete", TEST_PASS_EVENT:"pass", TEST_FAIL_EVENT:"fail", TEST_IGNORE_EVENT:"ignore", COMPLETE_EVENT:"complete", BEGIN_EVENT:"begin", disableLogging:function () { - this._log = false; - }, enableLogging:function () { - this._log = true; - }, _logEvent:function (g) { - var f = ""; - var e = ""; - switch (g.type) { - case this.BEGIN_EVENT: - f = "Testing began at " + (new Date()).toString() + "."; - e = "info"; - break; - case this.COMPLETE_EVENT: - f = b.substitute("Testing completed at " + (new Date()).toString() + ".\n" + "Passed:{passed} Failed:{failed} " + "Total:{total} ({ignored} ignored)", g.results); - e = "info"; - break; - case this.TEST_FAIL_EVENT: - f = g.testName + ": failed.\n" + g.error.getMessage(); - e = "fail"; - break; - case this.TEST_IGNORE_EVENT: - f = g.testName + ": ignored."; - e = "ignore"; - break; - case this.TEST_PASS_EVENT: - f = g.testName + ": passed."; - e = "pass"; - break; - case this.TEST_SUITE_BEGIN_EVENT: - f = 'Test suite "' + g.testSuite.name + '" started.'; - e = "info"; - break; - case this.TEST_SUITE_COMPLETE_EVENT: - f = b.substitute('Test suite "' + g.testSuite.name + '" completed' + ".\n" + "Passed:{passed} Failed:{failed} " + "Total:{total} ({ignored} ignored)", g.results); - e = "info"; - break; - case this.TEST_CASE_BEGIN_EVENT: - f = 'Test case "' + g.testCase.name + '" started.'; - e = "info"; - break; - case this.TEST_CASE_COMPLETE_EVENT: - f = b.substitute('Test case "' + g.testCase.name + '" completed.\n' + "Passed:{passed} Failed:{failed} " + "Total:{total} ({ignored} ignored)", g.results); - e = "info"; - break; - default: - f = "Unexpected event " + g.type; - f = "info"; - } - if (this._log) { - b.log(f, e, "TestRunner"); - } - }, _addTestCaseToTestTree:function (f, g) { - var h = f.appendChild(g), i, e; - for (i in g) { - if ((i.indexOf("test") === 0 || (i.toLowerCase().indexOf("should") > -1 && i.indexOf(" ") > -1)) && b.Lang.isFunction(g[i])) { - h.appendChild(i); - } - } - }, _addTestSuiteToTestTree:function (e, h) { - var g = e.appendChild(h); - for (var f = 0; f < h.items.length; f++) { - if (h.items[f] instanceof b.Test.Suite) { - this._addTestSuiteToTestTree(g, h.items[f]); - } else { - if (h.items[f] instanceof b.Test.Case) { - this._addTestCaseToTestTree(g, h.items[f]); - } - } - } - }, _buildTestTree:function () { - this._root = new d(this.masterSuite); - for (var e = 0; e < this.masterSuite.items.length; e++) { - if (this.masterSuite.items[e] instanceof b.Test.Suite) { - this._addTestSuiteToTestTree(this._root, this.masterSuite.items[e]); - } else { - if (this.masterSuite.items[e] instanceof b.Test.Case) { - this._addTestCaseToTestTree(this._root, this.masterSuite.items[e]); - } - } - } - }, _handleTestObjectComplete:function (e) { - if (b.Lang.isObject(e.testObject)) { - if (e.parent) { - e.parent.results.passed += e.results.passed; - e.parent.results.failed += e.results.failed; - e.parent.results.total += e.results.total; - e.parent.results.ignored += e.results.ignored; - e.parent.results[e.testObject.name] = e.results; - } - if (e.testObject instanceof b.Test.Suite) { - e.testObject.tearDown(); - e.results.duration = (new Date()) - e._start; - this.fire(this.TEST_SUITE_COMPLETE_EVENT, {testSuite:e.testObject, results:e.results}); - } else { - if (e.testObject instanceof b.Test.Case) { - e.results.duration = (new Date()) - e._start; - this.fire(this.TEST_CASE_COMPLETE_EVENT, {testCase:e.testObject, results:e.results}); - } - } - } - }, _next:function () { - if (this._cur === null) { - this._cur = this._root; - } else { - if (this._cur.firstChild) { - this._cur = this._cur.firstChild; - } else { - if (this._cur.next) { - this._cur = this._cur.next; - } else { - while (this._cur && !this._cur.next && this._cur !== this._root) { - this._handleTestObjectComplete(this._cur); - this._cur = this._cur.parent; - } - this._handleTestObjectComplete(this._cur); - if (this._cur == this._root) { - this._cur.results.type = "report"; - this._cur.results.timestamp = (new Date()).toLocaleString(); - this._cur.results.duration = (new Date()) - this._cur._start; - this._lastResults = this._cur.results; - this._running = false; - this.fire(this.COMPLETE_EVENT, {results:this._lastResults}); - this._cur = null; - } else { - this._cur = this._cur.next; - } - } - } - } - return this._cur; - }, _run:function () { - var g = false; - var f = this._next(); - if (f !== null) { - this._running = true; - this._lastResult = null; - var e = f.testObject; - if (b.Lang.isObject(e)) { - if (e instanceof b.Test.Suite) { - this.fire(this.TEST_SUITE_BEGIN_EVENT, {testSuite:e}); - f._start = new Date(); - e.setUp(); - } else { - if (e instanceof b.Test.Case) { - this.fire(this.TEST_CASE_BEGIN_EVENT, {testCase:e}); - f._start = new Date(); - } - } - if (typeof setTimeout != "undefined") { - setTimeout(function () { - b.Test.Runner._run(); - }, 0); - } else { - this._run(); - } - } else { - this._runTest(f); - } - } - }, _resumeTest:function (j) { - var e = this._cur; - this._waiting = false; - if (!e) { - return; - } - var k = e.testObject; - var h = e.parent.testObject; - if (h.__yui_wait) { - clearTimeout(h.__yui_wait); - delete h.__yui_wait; - } - var n = (h._should.fail || {})[k]; - var f = (h._should.error || {})[k]; - var i = false; - var l = null; - try { - j.apply(h); - if (n) { - l = new b.Assert.ShouldFail(); - i = true; - } else { - if (f) { - l = new b.Assert.ShouldError(); - i = true; - } - } - } catch (m) { - if (h.__yui_wait) { - clearTimeout(h.__yui_wait); - delete h.__yui_wait; - } - if (m instanceof b.Assert.Error) { - if (!n) { - l = m; - i = true; - } - } else { - if (m instanceof b.Test.Wait) { - if (b.Lang.isFunction(m.segment)) { - if (b.Lang.isNumber(m.delay)) { - if (typeof setTimeout != "undefined") { - h.__yui_wait = setTimeout(function () { - b.Test.Runner._resumeTest(m.segment); - }, m.delay); - this._waiting = true; - } else { - throw new Error("Asynchronous tests not supported in this environment."); - } - } - } - return; - } else { - if (!f) { - l = new b.Assert.UnexpectedError(m); - i = true; - } else { - if (b.Lang.isString(f)) { - if (m.message != f) { - l = new b.Assert.UnexpectedError(m); - i = true; - } - } else { - if (b.Lang.isFunction(f)) { - if (!(m instanceof f)) { - l = new b.Assert.UnexpectedError(m); - i = true; - } - } else { - if (b.Lang.isObject(f)) { - if (!(m instanceof f.constructor) || m.message != f.message) { - l = new b.Assert.UnexpectedError(m); - i = true; - } - } - } - } - } - } - } - } - if (i) { - this.fire(this.TEST_FAIL_EVENT, {testCase:h, testName:k, error:l}); - } else { - this.fire(this.TEST_PASS_EVENT, {testCase:h, testName:k}); - } - h.tearDown(); - var g = (new Date()) - e._start; - e.parent.results[k] = {result:i ? "fail" : "pass", message:l ? l.getMessage() : "Test passed", type:"test", name:k, duration:g}; - if (i) { - e.parent.results.failed++; - } else { - e.parent.results.passed++; - } - e.parent.results.total++; - if (typeof setTimeout != "undefined") { - setTimeout(function () { - b.Test.Runner._run(); - }, 0); - } else { - this._run(); - } - }, _handleError:function (e) { - if (this._waiting) { - this._resumeTest(function () { - throw e; - }); - } else { - throw e; - } - }, _runTest:function (h) { - var e = h.testObject; - var f = h.parent.testObject; - var i = f[e]; - var g = (f._should.ignore || {})[e]; - if (g) { - h.parent.results[e] = {result:"ignore", message:"Test ignored", type:"test", name:e}; - h.parent.results.ignored++; - h.parent.results.total++; - this.fire(this.TEST_IGNORE_EVENT, {testCase:f, testName:e}); - if (typeof setTimeout != "undefined") { - setTimeout(function () { - b.Test.Runner._run(); - }, 0); - } else { - this._run(); - } - } else { - h._start = new Date(); - f.setUp(); - this._resumeTest(i); - } - }, getName:function () { - return this.masterSuite.name; - }, setName:function (e) { - this.masterSuite.name = e; - }, fire:function (e, f) { - f = f || {}; - f.type = e; - c.superclass.fire.call(this, e, f); - }, add:function (e) { - this.masterSuite.add(e); - return this; - }, clear:function () { - this.masterSuite = new b.Test.Suite("yuitests" + (new Date()).getTime()); - }, isWaiting:function () { - return this._waiting; - }, isRunning:function () { - return this._running; - }, getResults:function (e) { - if (!this._running && this._lastResults) { - if (b.Lang.isFunction(e)) { - return e(this._lastResults); - } else { - return this._lastResults; - } - } else { - return null; - } - }, getCoverage:function (e) { - if (!this._running && typeof _yuitest_coverage == "object") { - if (b.Lang.isFunction(e)) { - return e(_yuitest_coverage); - } else { - return _yuitest_coverage; - } - } else { - return null; - } - }, resume:function (e) { - if (b.Test.Runner._waiting) { - this._resumeTest(e || function () { - }); - } else { - throw new Error("resume() called without wait()."); - } - }, run:function (e) { - var f = b.Test.Runner; - if (!e && this.masterSuite.items.length == 1 && this.masterSuite.items[0] instanceof b.Test.Suite) { - this.masterSuite = this.masterSuite.items[0]; - } - f._buildTestTree(); - f._root._start = new Date(); - f.fire(f.BEGIN_EVENT); - f._run(); - }}); - return new c(); - })(); - b.Assert = {_asserts:0, _formatMessage:function (d, c) { - var e = d; - if (b.Lang.isString(d) && d.length > 0) { - return b.Lang.substitute(d, {message:c}); - } else { - return c; - } - }, _getCount:function () { - return this._asserts; - }, _increment:function () { - this._asserts++; - }, _reset:function () { - this._asserts = 0; - }, fail:function (c) { - throw new b.Assert.Error(b.Assert._formatMessage(c, "Test force-failed.")); - }, areEqual:function (d, e, c) { - b.Assert._increment(); - if (d != e) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Values should be equal."), d, e); - } - }, areNotEqual:function (c, e, d) { - b.Assert._increment(); - if (c == e) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(d, "Values should not be equal."), c); - } - }, areNotSame:function (c, e, d) { - b.Assert._increment(); - if (c === e) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(d, "Values should not be the same."), c); - } - }, areSame:function (d, e, c) { - b.Assert._increment(); - if (d !== e) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Values should be the same."), d, e); - } - }, isFalse:function (d, c) { - b.Assert._increment(); - if (false !== d) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be false."), false, d); - } - }, isTrue:function (d, c) { - b.Assert._increment(); - if (true !== d) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be true."), true, d); - } - }, isNaN:function (d, c) { - b.Assert._increment(); - if (!isNaN(d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be NaN."), NaN, d); - } - }, isNotNaN:function (d, c) { - b.Assert._increment(); - if (isNaN(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Values should not be NaN."), NaN); - } - }, isNotNull:function (d, c) { - b.Assert._increment(); - if (b.Lang.isNull(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Values should not be null."), null); - } - }, isNotUndefined:function (d, c) { - b.Assert._increment(); - if (b.Lang.isUndefined(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should not be undefined."), undefined); - } - }, isNull:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isNull(d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be null."), null, d); - } - }, isUndefined:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isUndefined(d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value should be undefined."), undefined, d); - } - }, isArray:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isArray(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be an array."), d); - } - }, isBoolean:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isBoolean(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a Boolean."), d); - } - }, isFunction:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isFunction(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a function."), d); - } - }, isInstanceOf:function (d, e, c) { - b.Assert._increment(); - if (!(e instanceof d)) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Value isn't an instance of expected type."), d, e); - } - }, isNumber:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isNumber(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a number."), d); - } - }, isObject:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isObject(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be an object."), d); - } - }, isString:function (d, c) { - b.Assert._increment(); - if (!b.Lang.isString(d)) { - throw new b.Assert.UnexpectedValue(b.Assert._formatMessage(c, "Value should be a string."), d); - } - }, isTypeOf:function (c, e, d) { - b.Assert._increment(); - if (typeof e != c) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(d, "Value should be of type " + c + "."), expected, typeof e); - } - }}; - b.assert = function (d, c) { - b.Assert._increment(); - if (!d) { - throw new b.Assert.Error(b.Assert._formatMessage(c, "Assertion failed.")); - } - }; - b.fail = b.Assert.fail; - b.Assert.Error = function (c) { - arguments.callee.superclass.constructor.call(this, c); - this.message = c; - this.name = "Assert Error"; - }; - b.extend(b.Assert.Error, Error, {getMessage:function () { - return this.message; - }, toString:function () { - return this.name + ": " + this.getMessage(); - }, valueOf:function () { - return this.toString(); - }}); - b.Assert.ComparisonFailure = function (d, c, e) { - arguments.callee.superclass.constructor.call(this, d); - this.expected = c; - this.actual = e; - this.name = "ComparisonFailure"; - }; - b.extend(b.Assert.ComparisonFailure, b.Assert.Error, {getMessage:function () { - return this.message + "\nExpected: " + this.expected + " (" + (typeof this.expected) + ")" + "\nActual: " + this.actual + " (" + (typeof this.actual) + ")"; - }}); - b.Assert.UnexpectedValue = function (d, c) { - arguments.callee.superclass.constructor.call(this, d); - this.unexpected = c; - this.name = "UnexpectedValue"; - }; - b.extend(b.Assert.UnexpectedValue, b.Assert.Error, {getMessage:function () { - return this.message + "\nUnexpected: " + this.unexpected + " (" + (typeof this.unexpected) + ") "; - }}); - b.Assert.ShouldFail = function (c) { - arguments.callee.superclass.constructor.call(this, c || "This test should fail but didn't."); - this.name = "ShouldFail"; - }; - b.extend(b.Assert.ShouldFail, b.Assert.Error); - b.Assert.ShouldError = function (c) { - arguments.callee.superclass.constructor.call(this, c || "This test should have thrown an error but didn't."); - this.name = "ShouldError"; - }; - b.extend(b.Assert.ShouldError, b.Assert.Error); - b.Assert.UnexpectedError = function (c) { - arguments.callee.superclass.constructor.call(this, "Unexpected error: " + c.message); - this.cause = c; - this.name = "UnexpectedError"; - this.stack = c.stack; - }; - b.extend(b.Assert.UnexpectedError, b.Assert.Error); - b.ArrayAssert = {contains:function (e, d, c) { - b.Assert._increment(); - if (b.Array.indexOf(d, e) == -1) { - b.Assert.fail(b.Assert._formatMessage(c, "Value " + e + " (" + (typeof e) + ") not found in array [" + d + "].")); - } - }, containsItems:function (e, f, d) { - b.Assert._increment(); - for (var c = 0; c < e.length; c++) { - if (b.Array.indexOf(f, e[c]) == -1) { - b.Assert.fail(b.Assert._formatMessage(d, "Value " + e[c] + " (" + (typeof e[c]) + ") not found in array [" + f + "].")); - } - } - }, containsMatch:function (e, d, c) { - b.Assert._increment(); - if (typeof e != "function") { - throw new TypeError("ArrayAssert.containsMatch(): First argument must be a function."); - } - if (!b.Array.some(d, e)) { - b.Assert.fail(b.Assert._formatMessage(c, "No match found in array [" + d + "].")); - } - }, doesNotContain:function (e, d, c) { - b.Assert._increment(); - if (b.Array.indexOf(d, e) > -1) { - b.Assert.fail(b.Assert._formatMessage(c, "Value found in array [" + d + "].")); - } - }, doesNotContainItems:function (e, f, d) { - b.Assert._increment(); - for (var c = 0; c < e.length; c++) { - if (b.Array.indexOf(f, e[c]) > -1) { - b.Assert.fail(b.Assert._formatMessage(d, "Value found in array [" + f + "].")); - } - } - }, doesNotContainMatch:function (e, d, c) { - b.Assert._increment(); - if (typeof e != "function") { - throw new TypeError("ArrayAssert.doesNotContainMatch(): First argument must be a function."); - } - if (b.Array.some(d, e)) { - b.Assert.fail(b.Assert._formatMessage(c, "Value found in array [" + d + "].")); - } - }, indexOf:function (g, f, c, e) { - b.Assert._increment(); - for (var d = 0; d < f.length; d++) { - if (f[d] === g) { - if (c != d) { - b.Assert.fail(b.Assert._formatMessage(e, "Value exists at index " + d + " but should be at index " + c + ".")); - } - return; - } - } - b.Assert.fail(b.Assert._formatMessage(e, "Value doesn't exist in array [" + f + "].")); - }, itemsAreEqual:function (e, f, d) { - b.Assert._increment(); - if (e.length != f.length) { - b.Assert.fail(b.Assert._formatMessage(d, "Array should have a length of " + e.length + " but has a length of " + f.length)); - } - for (var c = 0; c < e.length; c++) { - if (e[c] != f[c]) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(d, "Values in position " + c + " are not equal."), e[c], f[c]); - } - } - }, itemsAreEquivalent:function (f, g, c, e) { - b.Assert._increment(); - if (typeof c != "function") { - throw new TypeError("ArrayAssert.itemsAreEquivalent(): Third argument must be a function."); - } - if (f.length != g.length) { - b.Assert.fail(b.Assert._formatMessage(e, "Array should have a length of " + f.length + " but has a length of " + g.length)); - } - for (var d = 0; d < f.length; d++) { - if (!c(f[d], g[d])) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(e, "Values in position " + d + " are not equivalent."), f[d], g[d]); - } - } - }, isEmpty:function (d, c) { - b.Assert._increment(); - if (d.length > 0) { - b.Assert.fail(b.Assert._formatMessage(c, "Array should be empty.")); - } - }, isNotEmpty:function (d, c) { - b.Assert._increment(); - if (d.length === 0) { - b.Assert.fail(b.Assert._formatMessage(c, "Array should not be empty.")); - } - }, itemsAreSame:function (e, f, d) { - b.Assert._increment(); - if (e.length != f.length) { - b.Assert.fail(b.Assert._formatMessage(d, "Array should have a length of " + e.length + " but has a length of " + f.length)); - } - for (var c = 0; c < e.length; c++) { - if (e[c] !== f[c]) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(d, "Values in position " + c + " are not the same."), e[c], f[c]); - } - } - }, lastIndexOf:function (g, f, c, e) { - for (var d = f.length; d >= 0; d--) { - if (f[d] === g) { - if (c != d) { - b.Assert.fail(b.Assert._formatMessage(e, "Value exists at index " + d + " but should be at index " + c + ".")); - } - return; - } - } - b.Assert.fail(b.Assert._formatMessage(e, "Value doesn't exist in array.")); - }}; - b.ObjectAssert = {areEqual:function (d, e, c) { - b.Assert._increment(); - b.Object.each(d, function (g, f) { - if (d[f] != e[f]) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, "Values should be equal for property " + f), d[f], e[f]); - } - }); - }, hasKey:function (c, d, e) { - b.Assert._increment(); - if (!(c in d)) { - b.fail(b.Assert._formatMessage(e, "Property '" + c + "' not found on object.")); - } - }, hasKeys:function (e, c, f) { - b.Assert._increment(); - for (var d = 0; d < e.length; d++) { - if (!(e[d] in c)) { - b.fail(b.Assert._formatMessage(f, "Property '" + e[d] + "' not found on object.")); - } - } - }, ownsKey:function (c, d, e) { - b.Assert._increment(); - if (!d.hasOwnProperty(c)) { - b.fail(b.Assert._formatMessage(e, "Property '" + c + "' not found on object instance.")); - } - }, ownsKeys:function (e, c, f) { - b.Assert._increment(); - for (var d = 0; d < e.length; d++) { - if (!c.hasOwnProperty(e[d])) { - b.fail(b.Assert._formatMessage(f, "Property '" + e[d] + "' not found on object instance.")); - } - } - }, ownsNoKeys:function (c, e) { - b.Assert._increment(); - var d = b.Object.keys(c); - if (d.length > 0) { - b.fail(b.Assert._formatMessage(e, "Object owns " + d.length + " properties but should own none.")); - } - }}; - b.DateAssert = {datesAreEqual:function (d, f, c) { - b.Assert._increment(); - if (d instanceof Date && f instanceof Date) { - var e = ""; - if (d.getFullYear() != f.getFullYear()) { - e = "Years should be equal."; - } - if (d.getMonth() != f.getMonth()) { - e = "Months should be equal."; - } - if (d.getDate() != f.getDate()) { - e = "Days of month should be equal."; - } - if (e.length) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, e), d, f); - } - } else { - throw new TypeError("Y.Assert.datesAreEqual(): Expected and actual values must be Date objects."); - } - }, timesAreEqual:function (d, f, c) { - b.Assert._increment(); - if (d instanceof Date && f instanceof Date) { - var e = ""; - if (d.getHours() != f.getHours()) { - e = "Hours should be equal."; - } - if (d.getMinutes() != f.getMinutes()) { - e = "Minutes should be equal."; - } - if (d.getSeconds() != f.getSeconds()) { - e = "Seconds should be equal."; - } - if (e.length) { - throw new b.Assert.ComparisonFailure(b.Assert._formatMessage(c, e), d, f); - } - } else { - throw new TypeError("DateY.AsserttimesAreEqual(): Expected and actual values must be Date objects."); - } - }}; - b.namespace("Test.Format"); - function a(c) { - return c.replace(/[<>"'&]/g, function (d) { - switch (d) { - case"<": - return"<"; - case">": - return">"; - case'"': - return"""; - case"'": - return"'"; - case"&": - return"&"; - } - }); - } - - b.Test.Format.JSON = function (c) { - return b.JSON.stringify(c); - }; - b.Test.Format.XML = function (d) { - function c(g) { - var e = b.Lang, f = "<" + g.type + ' name="' + a(g.name) + '"'; - if (e.isNumber(g.duration)) { - f += ' duration="' + g.duration + '"'; - } - if (g.type == "test") { - f += ' result="' + g.result + '" message="' + a(g.message) + '">'; - } else { - f += ' passed="' + g.passed + '" failed="' + g.failed + '" ignored="' + g.ignored + '" total="' + g.total + '">'; - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += c(h); - } - }); - } - f += ""; - return f; - } - - return'' + c(d); - }; - b.Test.Format.JUnitXML = function (c) { - function d(g) { - var e = b.Lang, f = ""; - switch (g.type) { - case"test": - if (g.result != "ignore") { - f = ''; - if (g.result == "fail") { - f += '"; - } - f += ""; - } - break; - case"testcase": - f = ''; - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += d(h); - } - }); - f += ""; - break; - case"testsuite": - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += d(h); - } - }); - break; - case"report": - f = ""; - b.Object.each(g, function (h) { - if (e.isObject(h) && !e.isArray(h)) { - f += d(h); - } - }); - f += ""; - } - return f; - } - - return'' + d(c); - }; - b.Test.Format.TAP = function (d) { - var e = 1; - - function c(g) { - var f = b.Lang, h = ""; - switch (g.type) { - case"test": - if (g.result != "ignore") { - h = "ok " + (e++) + " - " + g.name; - if (g.result == "fail") { - h = "not " + h + " - " + g.message; - } - h += "\n"; - } else { - h = "#Ignored test " + g.name + "\n"; - } - break; - case"testcase": - h = "#Begin testcase " + g.name + "(" + g.failed + " failed of " + g.total + ")\n"; - b.Object.each(g, function (i) { - if (f.isObject(i) && !f.isArray(i)) { - h += c(i); - } - }); - h += "#End testcase " + g.name + "\n"; - break; - case"testsuite": - h = "#Begin testsuite " + g.name + "(" + g.failed + " failed of " + g.total + ")\n"; - b.Object.each(g, function (i) { - if (f.isObject(i) && !f.isArray(i)) { - h += c(i); - } - }); - h += "#End testsuite " + g.name + "\n"; - break; - case"report": - b.Object.each(g, function (i) { - if (f.isObject(i) && !f.isArray(i)) { - h += c(i); - } - }); - } - return h; - } - - return"1.." + d.total + "\n" + c(d); - }; - b.namespace("Coverage.Format"); - b.Coverage.Format.JSON = function (c) { - return b.JSON.stringify(c); - }; - b.Coverage.Format.XdebugJSON = function (d) { - var c = {}; - b.Object.each(d, function (f, e) { - c[e] = d[e].lines; - }); - return b.JSON.stringify(c); - }; - b.namespace("Test"); - b.Test.Reporter = function (c, d) { - this.url = c; - this.format = d || b.Test.Format.XML; - this._fields = new Object(); - this._form = null; - this._iframe = null; - }; - b.Test.Reporter.prototype = {constructor:b.Test.Reporter, addField:function (c, d) { - this._fields[c] = d; - }, clearFields:function () { - this._fields = new Object(); - }, destroy:function () { - if (this._form) { - this._form.parentNode.removeChild(this._form); - this._form = null; - } - if (this._iframe) { - this._iframe.parentNode.removeChild(this._iframe); - this._iframe = null; - } - this._fields = null; - }, report:function (d) { - if (!this._form) { - this._form = document.createElement("form"); - this._form.method = "post"; - this._form.style.visibility = "hidden"; - this._form.style.position = "absolute"; - this._form.style.top = 0; - document.body.appendChild(this._form); - var c = document.createElement("div"); - c.innerHTML = ''; - this._iframe = c.firstChild; - this._iframe.src = "javascript:false"; - this._iframe.style.visibility = "hidden"; - this._iframe.style.position = "absolute"; - this._iframe.style.top = 0; - document.body.appendChild(this._iframe); - this._form.target = "yuiTestTarget"; - } - this._form.action = this.url; - while (this._form.hasChildNodes()) { - this._form.removeChild(this._form.lastChild); - } - this._fields.results = this.format(d); - this._fields.useragent = navigator.userAgent; - this._fields.timestamp = (new Date()).toLocaleString(); - b.Object.each(this._fields, function (f, g) { - if (typeof f != "function") { - var e = document.createElement("input"); - e.type = "hidden"; - e.name = g; - e.value = f; - this._form.appendChild(e); - } - }, this); - delete this._fields.results; - delete this._fields.useragent; - delete this._fields.timestamp; - if (arguments[1] !== false) { - this._form.submit(); - } - }}; - b.Mock = function (e) { - e = e || {}; - var c = null; - try { - c = b.Object(e); - } catch (d) { - c = {}; - b.log("Couldn't create mock with prototype.", "warn", "Mock"); - } - b.Object.each(e, function (f) { - if (b.Lang.isFunction(e[f])) { - c[f] = function () { - b.Assert.fail("Method " + f + "() was called but was not expected to be."); - }; - } - }); - return c; - }; - b.Mock.expect = function (d, h) { - if (!d.__expectations) { - d.__expectations = {}; - } - if (h.method) { - var g = h.method, f = h.args || h.arguments || [], c = h.returns, j = b.Lang.isNumber(h.callCount) ? h.callCount : 1, e = h.error, i = h.run || function () { - }; - d.__expectations[g] = h; - h.callCount = j; - h.actualCallCount = 0; - b.Array.each(f, function (k, l, m) { - if (!(m[l] instanceof b.Mock.Value)) { - m[l] = b.Mock.Value(b.Assert.areSame, [k], "Argument " + l + " of " + g + "() is incorrect."); - } - }); - if (j > 0) { - d[g] = function () { - try { - h.actualCallCount++; - b.Assert.areEqual(f.length, arguments.length, "Method " + g + "() passed incorrect number of arguments."); - for (var m = 0, k = f.length; m < k; m++) { - f[m].verify(arguments[m]); - } - i.apply(this, arguments); - if (e) { - throw e; - } - } catch (l) { - b.Test.Runner._handleError(l); - } - return c; - }; - } else { - d[g] = function () { - try { - b.Assert.fail("Method " + g + "() should not have been called."); - } catch (k) { - b.Test.Runner._handleError(k); - } - }; - } - } else { - if (h.property) { - d.__expectations[g] = h; - } - } - }; - b.Mock.verify = function (c) { - try { - b.Object.each(c.__expectations, function (e) { - if (e.method) { - b.Assert.areEqual(e.callCount, e.actualCallCount, "Method " + e.method + "() wasn't called the expected number of times."); - } else { - if (e.property) { - b.Assert.areEqual(e.value, c[e.property], "Property " + e.property + " wasn't set to the correct value."); - } - } - }); - } catch (d) { - b.Test.Runner._handleError(d); - } - }; - b.Mock.Value = function (e, c, d) { - if (b.instanceOf(this, b.Mock.Value)) { - this.verify = function (g) { - var f = [].concat(c || []); - f.push(g); - f.push(d); - e.apply(null, f); - }; - } else { - return new b.Mock.Value(e, c, d); - } - }; - b.Mock.Value.Any = b.Mock.Value(function () { - }); - b.Mock.Value.Boolean = b.Mock.Value(b.Assert.isBoolean); - b.Mock.Value.Number = b.Mock.Value(b.Assert.isNumber); - b.Mock.Value.String = b.Mock.Value(b.Assert.isString); - b.Mock.Value.Object = b.Mock.Value(b.Assert.isObject); - b.Mock.Value.Function = b.Mock.Value(b.Assert.isFunction); - if (typeof YUITest == "undefined" || !YUITest) { - YUITest = {TestRunner:b.Test.Runner, ResultsFormat:b.Test.Format, CoverageFormat:b.Coverage.Format}; - } -}, "3.4.1", {requires:["event-simulate", "event-custom", "substitute", "json-stringify"]}); From 245998a997c0d84f9aebfa61c9bb2158d90dfd4f Mon Sep 17 00:00:00 2001 From: Fabian Frank Date: Tue, 11 Sep 2012 19:42:00 -0700 Subject: [PATCH 07/17] improve error handling and messaging notify the user with more meaningful messages when trying to run mojits that don't exist or are not configured correctly. --- lib/app/addons/rs/url.server.js | 5 +++++ lib/store.server.js | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/app/addons/rs/url.server.js b/lib/app/addons/rs/url.server.js index fd8c589ed..30c06ab9e 100644 --- a/lib/app/addons/rs/url.server.js +++ b/lib/app/addons/rs/url.server.js @@ -157,6 +157,11 @@ YUI.add('addon-rs-url', function(Y, NAME) { */ onGetMojitTypeDetails: function(evt) { var ress = this.get('host').getResources(evt.args.env, evt.args.ctx, {type: 'mojit', name: evt.args.mojitType}); + + if (!ress || !ress[0]) { + throw new Error('Unable to compute assets root for mojit "' + evt.mojit.type + '". This usually happens when trying to run a mojit that does not exist.'); + } + evt.mojit.assetsRoot = ress[0].url + '/assets'; }, diff --git a/lib/store.server.js b/lib/store.server.js index 67324c1aa..cd9234f48 100644 --- a/lib/store.server.js +++ b/lib/store.server.js @@ -1413,7 +1413,9 @@ YUI.add('mojito-resource-store', function(Y, NAME) { // The base will need to carry its ID with it. spec.id = spec.base; appConfig = this.getAppConfig(ctx); - base = appConfig.specs[spec.base]; + + // appConfig.specs might be undefined, for example in newly created apps + base = appConfig.specs && appConfig.specs[spec.base]; if (!base) { // look in resources @@ -1426,7 +1428,7 @@ YUI.add('mojito-resource-store', function(Y, NAME) { } } if (!base) { - throw new Error('Unknown base of "' + spec.base + '"'); + throw new Error('Unknown base "' + spec.base + '". You should have configured "' + spec.base + '" in application.json under specs or used "@' + spec.base + '" if you wanted to specify a mojit name.'); } delete spec.base; From 671bffbd4a0a2bd82c166d1898497ec57f20c26b Mon Sep 17 00:00:00 2001 From: Ric Allinson Date: Wed, 12 Sep 2012 09:23:06 -0700 Subject: [PATCH 08/17] Bug fix for accessing app.json builds with correct context. --- lib/app/commands/build.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/app/commands/build.js b/lib/app/commands/build.js index e7d8ddbc9..b0b1005a1 100644 --- a/lib/app/commands/build.js +++ b/lib/app/commands/build.js @@ -71,7 +71,8 @@ exports.run = function(params, options, callback) { cwd = process.cwd(), destination, appConfig, - config = {}; + config = {}, + context = {}; Y.applyConfig({ useSync: true, @@ -84,11 +85,17 @@ exports.run = function(params, options, callback) { } } }); + + if (typeof options.context === 'string') { + // Parse the context into an object + context = utils.contextCsvToObject(options.context); + } + Y.use('mojito-util', 'mojito-resource-store'); Y.applyConfig({useSync: false}); store = new Y.mojito.ResourceStore({ root: cwd, - context: {} + context: context }); if (!params[0]) { From ff5180cf223c960f2325a850dbe26f1d03ed9bc3 Mon Sep 17 00:00:00 2001 From: Michael Ridgway Date: Wed, 12 Sep 2012 09:47:17 -0700 Subject: [PATCH 09/17] Removing 0.4 build since it is unsupported --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c4565a60c..e02f5a0c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ language: node_js node_js: - 0.8 - 0.6 - - 0.4 before_script: ./travis/before_script.sh script: ./travis/script.sh notifications: From 50f0898b7fcf6935345412cc4c86ea87c06a7e81 Mon Sep 17 00:00:00 2001 From: Fabian Frank Date: Wed, 12 Sep 2012 10:07:49 -0700 Subject: [PATCH 10/17] updating UT for new error message --- lib/tests/autoload/store.server-tests.js | 2 +- tests/unit/lib/test-store.server.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tests/autoload/store.server-tests.js b/lib/tests/autoload/store.server-tests.js index afa5f7dce..b17d6df2e 100644 --- a/lib/tests/autoload/store.server-tests.js +++ b/lib/tests/autoload/store.server-tests.js @@ -300,7 +300,7 @@ YUI.add('mojito-store-server-tests', function(Y, NAME) { var spec = { base: 'nonexistant' }; store.expandInstance(spec, {}, function(err, instance) { A.isNotUndefined(err); - A.areSame('Unknown base of "nonexistant"', err.message); + A.areSame('Unknown base "nonexistant". You should have configured "nonexistant" in application.json under specs or used "@nonexistant" if you wanted to specify a mojit name.', err.message); A.isUndefined(instance); }); }, diff --git a/tests/unit/lib/test-store.server.js b/tests/unit/lib/test-store.server.js index 8bcca4c9e..699eb8ca0 100644 --- a/tests/unit/lib/test-store.server.js +++ b/tests/unit/lib/test-store.server.js @@ -309,7 +309,7 @@ YUI().use( var spec = { base: 'nonexistant' }; store.expandInstance(spec, {}, function(err, instance) { A.isNotUndefined(err); - A.areSame('Unknown base of "nonexistant"', err.message); + A.areSame('Unknown base "nonexistant". You should have configured "nonexistant" in application.json under specs or used "@nonexistant" if you wanted to specify a mojit name.', err.message); A.isUndefined(instance); }); }, From 43cd1e4ae2052dc777c075288e5eb52671d83953 Mon Sep 17 00:00:00 2001 From: Isao Yagi Date: Thu, 13 Sep 2012 10:31:47 -0700 Subject: [PATCH 11/17] fix issue #496 package.json/engines.node:">.4",npm:">1.0" --- package.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index d99402c67..3ababe252 100644 --- a/package.json +++ b/package.json @@ -44,8 +44,8 @@ "mojito": "bin/mojito" }, "engines": { - "node": ">= 0.4.0 < 0.7.0", - "npm": ">= 1.0.0" + "node": ">0.4", + "npm": ">1.0" }, "devDependencies": { "node-static": "~0.6.1", @@ -62,10 +62,6 @@ "test": "./tests/run.js test -u --group server --driver nodejs && ./tests/run.js test -u --group client --driver selenium" }, "yahoo": { - "bugzilla": { - "product": "Mojito", - "component": "General" - }, "mojito": { "type": "bundle", "location": "lib/app" From 1dda504653e63f748332008b52f9bbb025ee9724 Mon Sep 17 00:00:00 2001 From: Lichun Zhan Date: Thu, 13 Sep 2012 16:54:38 -0700 Subject: [PATCH 12/17] fix issue #507 Add hi group in dimensions.json --- lib/dimensions.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/dimensions.json b/lib/dimensions.json index e5cfbbf30..a60836ac3 100644 --- a/lib/dimensions.json +++ b/lib/dimensions.json @@ -98,6 +98,9 @@ "fr-CA": null, "fr-FR": null, "fr-GF": null + }, + "hi": { + "hi-IN": null }, "hu": { "hu-HU": null From 543c0c158d01ba702a1fce50e80083554631956d Mon Sep 17 00:00:00 2001 From: Lichun Zhan Date: Fri, 14 Sep 2012 11:16:50 -0700 Subject: [PATCH 13/17] replace tab with spaces --- lib/dimensions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dimensions.json b/lib/dimensions.json index a60836ac3..32778a871 100644 --- a/lib/dimensions.json +++ b/lib/dimensions.json @@ -99,7 +99,7 @@ "fr-FR": null, "fr-GF": null }, - "hi": { + "hi": { "hi-IN": null }, "hu": { From 587ff0eab722fd27e3e3195b42cb9198e0b322b4 Mon Sep 17 00:00:00 2001 From: Michael Ridgway Date: Fri, 14 Sep 2012 15:06:41 -0700 Subject: [PATCH 14/17] Adds a --path option to run.js to allow specifying a path to find the test descriptors or applications --- tests/run.js | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/tests/run.js b/tests/run.js index 87343270c..45e9c49a2 100755 --- a/tests/run.js +++ b/tests/run.js @@ -1,6 +1,7 @@ #!/usr/bin/env node var fs = require('fs'), + path = require('path'), wrench = require('wrench'), libpath = require('path'), program = require('commander'), @@ -24,6 +25,7 @@ program.command('test') .option('--group ', 'Arrow group') .option('--driver ', 'Arrow driver') .option('--browser ', 'Arrow browser') + .option('--path ', 'Path to find the tests') .action(test); program.command('build') @@ -46,6 +48,8 @@ function test (cmd) { } cmd.unitBrowser = cmd.unitBrowser || cmd.browser || 'firefox'; cmd.funcBrowser = cmd.funcBrowser || cmd.browser || 'firefox'; + cmd.unitPath = path.resolve(cwd, cmd.unitPath || cmd.path || './unit'); + cmd.funcPath = path.resolve(cwd, cmd.funcPath || cmd.path || './func'); if (cmd.arrow) { series.push(startArrowServer); } @@ -53,7 +57,7 @@ function test (cmd) { if ('phantomjs' !== cmd.unitBrowser) { if (cmd.selenium) { series.push(function (callback) { - startArrowSelenium(cmd.unitBrowser, callback); + startArrowSelenium(cmd, callback); }); } } @@ -70,7 +74,7 @@ function test (cmd) { if ('phantomjs' !== cmd.funcBrowser) { if (cmd.selenium) { series.push(function (callback) { - startArrowSelenium(cmd.funcBrowser, callback); + startArrowSelenium(cmd, callback); }); } } @@ -113,7 +117,7 @@ function startArrowServer (callback) { function runUnitTests (cmd, callback) { console.log('---Running Unit Tests---'); - var arrowReportDir = cwd + '/artifacts/arrowreport/unit/'; + var arrowReportDir = cmd.unitPath + '/artifacts/arrowreport/'; try { wrench.rmdirSyncRecursive(arrowReportDir); } catch (e) {} @@ -121,7 +125,7 @@ function runUnitTests (cmd, callback) { var commandArgs = [ cwd + "/../node_modules/yahoo-arrow/index.js", - cwd + "/unit/**/*_descriptor.json", + cmd.unitPath + "/**/*_descriptor.json", "--report=true", "--reportFolder=" + arrowReportDir ]; @@ -135,7 +139,7 @@ function runUnitTests (cmd, callback) { cmd.group && commandArgs.push('--group=' + cmd.group); var p = runCommand( - cwd + '/unit', + cmd.unitPath, "node", commandArgs, function (code) { @@ -150,9 +154,9 @@ function runUnitTests (cmd, callback) { function build (cmd, callback) { console.log('---Building Apps---'); runCommand( - cwd + '/func/applications/frameworkapp/common', + cmd.funcPath + '/applications/frameworkapp/common', cwd + "/../bin/mojito", - ['build', 'html5app', cwd + '/func/applications/frameworkapp/flatfile'], + ['build', 'html5app', cmd.funcPath + '/applications/frameworkapp/flatfile'], callback ); } @@ -160,7 +164,7 @@ function build (cmd, callback) { function deploy (cmd, callback) { console.log('---Deploying Apps---'); var appSeries = [], - appsConfig = JSON.parse(fs.readFileSync(cwd + '/func/applications/apps.json', 'utf8')), + appsConfig = JSON.parse(fs.readFileSync(cmd.funcPath + '/applications/apps.json', 'utf8')), apps = appsConfig.applications; for (var i=0; i Date: Tue, 18 Sep 2012 11:57:44 +0200 Subject: [PATCH 15/17] fixed multiple typos in the code example as well as typo in explanation (could would) --- docs/dev_guide/code_exs/route_config.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/dev_guide/code_exs/route_config.rst b/docs/dev_guide/code_exs/route_config.rst index 0a40376f1..4994b3fab 100644 --- a/docs/dev_guide/code_exs/route_config.rst +++ b/docs/dev_guide/code_exs/route_config.rst @@ -33,7 +33,7 @@ is created, which can then be associated in a route defined in ``routes.json``. ] The example ``routes.json`` below associates the ``mapped_mojit`` instance defined in ``application.json`` with a path and explicitly calls the ``index`` action. If the controller for ``RoutingMojit`` had the function ``myFunction``, -you could would use the following to call it: ``mapped_mojit.myFunction``. Based on the ``custom-route`` route below, when an HTTP GET call is made on the URL ``http:{domain}:8666/custom-route``, +you would use the following to call it: ``mapped_mojit.myFunction``. Based on the ``custom-route`` route below, when an HTTP GET call is made on the URL ``http:{domain}:8666/custom-route``, the ``index`` action is called from the ``custom-route`` instance. .. code-block:: javascript @@ -64,11 +64,11 @@ method ``post_params`` from the ``post-route`` mojit instance. "verbs": ["get"], "path": "/custom-route", "call": "mapped_mojit.index" - } + }, "another-route": { - "verbs": ["post"] + "verbs": ["post"], "path": "/*", - "call": mojit-post-route.post_params" + "call": "mojit-post-route.post_params" } } ] From 8208de5b2dcada4b5ae10755fde5d3b297c713d2 Mon Sep 17 00:00:00 2001 From: Joe Catera Date: Tue, 18 Sep 2012 09:21:18 -0700 Subject: [PATCH 16/17] Fixed link to dimensions.json. --- docs/dev_guide/topics/mojito_using_contexts.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev_guide/topics/mojito_using_contexts.rst b/docs/dev_guide/topics/mojito_using_contexts.rst index d96c6cc7e..11e58fec2 100644 --- a/docs/dev_guide/topics/mojito_using_contexts.rst +++ b/docs/dev_guide/topics/mojito_using_contexts.rst @@ -83,7 +83,7 @@ following compound context: ``"environment:test,device:android"`` - ``device:palm`` - ``lang:{BCP 47 language tag}`` -You can view the supported BCP 47 language tags and default contexts in the `dimensions.json `_ file of Mojito. +You can view the supported BCP 47 language tags and default contexts in the `dimensions.json `_ file of Mojito. Configuration Precedence ======================== From 8017431a6fcf6a3798f1dc450e9811c214b6bd5a Mon Sep 17 00:00:00 2001 From: Drew Folta Date: Tue, 18 Sep 2012 14:00:41 -0700 Subject: [PATCH 17/17] delinted --- lib/app/addons/ac/models.common.js | 4 +++- lib/app/addons/ac/output-adapter.common.js | 4 ++-- lib/app/autoload/action-context.common.js | 8 ++++---- lib/app/autoload/controller-context.common.js | 10 ++++++++-- lib/app/autoload/dispatch.common.js | 5 ++--- lib/app/autoload/perf.server.js | 2 +- lib/index.js | 5 +++-- lib/store.server.js | 4 +++- 8 files changed, 26 insertions(+), 16 deletions(-) diff --git a/lib/app/addons/ac/models.common.js b/lib/app/addons/ac/models.common.js index a6a0a1ac2..4c9fc8052 100644 --- a/lib/app/addons/ac/models.common.js +++ b/lib/app/addons/ac/models.common.js @@ -61,7 +61,9 @@ YUI.add('mojito-models-addon', function (Y, NAME) { // returning from cache if exists return models[modelName]; - }, this, command.instance.config /* config (first arg) */); + }, this, + command.instance.config /* config (first arg) */ + ); } diff --git a/lib/app/addons/ac/output-adapter.common.js b/lib/app/addons/ac/output-adapter.common.js index 92b146e8d..1a7fce840 100644 --- a/lib/app/addons/ac/output-adapter.common.js +++ b/lib/app/addons/ac/output-adapter.common.js @@ -202,13 +202,13 @@ YUI.add('mojito-output-adapter-addon', function(Y, NAME) { } // Will use hb to render mu templates anyway - if (rendererCache['hb'] === undefined || rendererCache['mu'] === undefined) { + if (rendererCache.hb === undefined || rendererCache.mu === undefined) { rendererCache = { hb: new (Y.mojito.addons.viewEngines.hb)(''), // viewId mu: new (Y.mojito.addons.viewEngines.mu)('', {}) // viewId, viewOptions }; } - renderer = rendererCache['hb']; + renderer = rendererCache.hb; renderer.viewId = meta.view.id; renderer.render(data, instance.type, contentPath, adapter, meta, more); diff --git a/lib/app/autoload/action-context.common.js b/lib/app/autoload/action-context.common.js index 8506e2740..0a6856e09 100644 --- a/lib/app/autoload/action-context.common.js +++ b/lib/app/autoload/action-context.common.js @@ -210,7 +210,6 @@ YUI.add('mojito-action-context', function(Y, NAME) { if (CACHE[ac.type]) { dependencies = CACHE[ac.type]; } else { - firstTime = true; for (addonName in addons) { if (addons.hasOwnProperty(addonName)) { if (!dependencies[addonName]) { @@ -251,7 +250,8 @@ YUI.add('mojito-action-context', function(Y, NAME) { var controller = opts.controller, command = opts.command, actionFunction = command.action, - perf = Y.mojito.perf.timeline('mojito', 'ac:init', 'set up AC object', command); + perf = Y.mojito.perf.timeline('mojito', 'ac:init', 'set up AC object', command), + error; this.action = command.action; this.type = command.instance.type; @@ -277,7 +277,7 @@ YUI.add('mojito-action-context', function(Y, NAME) { actionFunction = '__call'; } else { // If there is still no joy then die - error = new Error("No method '" + command.action + "' on controller type '" + instance.type + "'"); + error = new Error("No method '" + opts.command.action + "' on controller type '" + opts.instance.type + "'"); error.code = 404; throw error; } @@ -380,7 +380,7 @@ YUI.add('mojito-action-context', function(Y, NAME) { }, '0.1.0', {requires: [ // following are ACPs are always available - 'mojito-output-adapter-addon', + 'mojito-output-adapter-addon' // << RIC // 'mojito-config-addon', // 'mojito-url-addon', diff --git a/lib/app/autoload/controller-context.common.js b/lib/app/autoload/controller-context.common.js index 1be2a9b1e..f08817b14 100644 --- a/lib/app/autoload/controller-context.common.js +++ b/lib/app/autoload/controller-context.common.js @@ -18,7 +18,8 @@ YUI.add('mojito-controller-context', function(Y, NAME) { this.dispatch = opts.dispatch; this.store = opts.store; this.Y = opts.Y; - this.shareYUIInstance = false; Y.mojito.util.shouldShareYUIInstance(opts.appShareYUIInstance, this.instance); + this.shareYUIInstance = false; + Y.mojito.util.shouldShareYUIInstance(opts.appShareYUIInstance, this.instance); this.init(); } @@ -27,7 +28,8 @@ YUI.add('mojito-controller-context', function(Y, NAME) { init: function() { - var c = this.Y.mojito.controllers[this.instance['controller-module']]; + var c = this.Y.mojito.controllers[this.instance['controller-module']], + controller; controller = this.controller = Y.mojito.util.heir(c); @@ -37,6 +39,7 @@ YUI.add('mojito-controller-context', function(Y, NAME) { return; // << RIC + /* var error, // Not really an instance...more like constructor options...see // controller.init() call below. @@ -111,6 +114,7 @@ YUI.add('mojito-controller-context', function(Y, NAME) { this.models[modelName] = modelInstance; } }, this); + */ }, @@ -138,6 +142,7 @@ YUI.add('mojito-controller-context', function(Y, NAME) { return; // << RIC + /* var instance = this.instance, config = command.instance.config, // this is the action that will be executed @@ -199,6 +204,7 @@ YUI.add('mojito-controller-context', function(Y, NAME) { } this.Y.mojito.perf.mark('mojito', 'core_dispatch_end', 'invoked action', perfID); + */ } }; diff --git a/lib/app/autoload/dispatch.common.js b/lib/app/autoload/dispatch.common.js index 3fa18eb09..61ba8c959 100644 --- a/lib/app/autoload/dispatch.common.js +++ b/lib/app/autoload/dispatch.common.js @@ -28,7 +28,8 @@ YUI.add('mojito-dispatcher', function(Y, NAME) { coreYuiModules = [], usePrecomputed, useOnDemand, - appShareYUIInstance; + appShareYUIInstance, + yuiOnce = YUI(); /* Optimization methods: @@ -68,8 +69,6 @@ YUI.add('mojito-dispatcher', function(Y, NAME) { place to see if it provides benefits. */ - var yuiOnce = YUI(); - /* See docs for the dispatch function in action-context.common.js */ function dispatch(command, adapter) { diff --git a/lib/app/autoload/perf.server.js b/lib/app/autoload/perf.server.js index 3824aaa3b..dd36865b3 100644 --- a/lib/app/autoload/perf.server.js +++ b/lib/app/autoload/perf.server.js @@ -5,7 +5,7 @@ */ -/*jslint anon:true, sloppy:true, nomen:true*/ +/*jslint anon:true, sloppy:true, nomen:true, stupid:true*/ /*global YUI,require,process*/ YUI.add('mojito-perf', function (Y, NAME) { diff --git a/lib/index.js b/lib/index.js index 7c2281402..5ef86ec0e 100644 --- a/lib/index.js +++ b/lib/index.js @@ -103,7 +103,8 @@ MojitoServer.prototype = { hasMojito, midConfig, dispatcher, - perfConfig; + perfConfig, + ric_dispatcher; if (!options) { options = {}; @@ -254,7 +255,7 @@ MojitoServer.prototype = { }; // Pass the "Resource Store" by wrapping it with the adapter - var ric_dispatcher = Y.mojito.Dispatcher.init( + ric_dispatcher = Y.mojito.Dispatcher.init( Y.mojito.ResourceStoreAdapter.init('server', store, logger), CORE_YUI_MODULES, logger, diff --git a/lib/store.server.js b/lib/store.server.js index 25aee2182..81427992b 100644 --- a/lib/store.server.js +++ b/lib/store.server.js @@ -227,6 +227,7 @@ YUI.add('mojito-resource-store', function(Y, NAME) { // << RIC return true; + /* var k, parts, p, @@ -266,6 +267,7 @@ YUI.add('mojito-resource-store', function(Y, NAME) { } } return true; + */ }, @@ -306,7 +308,7 @@ YUI.add('mojito-resource-store', function(Y, NAME) { * @return {object} the application configuration contextualized by the "ctx" argument. */ getAppConfig: function(ctx) { - var appConfig, + var appConfig, key, ycb;