launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #04199
[Merge] lp:~wallyworld/launchpad/yui-test-cleanup-807294 into lp:launchpad
Ian Booth has proposed merging lp:~wallyworld/launchpad/yui-test-cleanup-807294 into lp:launchpad with lp:~wallyworld/launchpad/duplicate-picker-info as a prerequisite.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #807294 in Launchpad itself: "Consolidate duplicate code in javascript tests"
https://bugs.launchpad.net/launchpad/+bug/807294
For more details, see:
https://code.launchpad.net/~wallyworld/launchpad/yui-test-cleanup-807294/+merge/67281
This branch consolidates duplicate code copied throughout the lp yui tests. Only test code is changed.
== Implementation ==
Introduce a new testrunner.js module which contains the javascript to run each test suite. yui tests now do:
Y.lp.testing.Runner.run(suite);
instead of cut'n'paste of the "Lock stock and barrel" block of code.
The testrunner.js also contains a common yui_config object so that each test suite simply creates a yui object instead of copying the same config options all over ie replace YUI{...options...}) with YUI().
The testrunner.js also creates the log div when it sets up the test so there is no longer any need for each html file to include a <div id='log'><div>
Finally, a test.css file was used to import all the required css so that each html file didn't have to repeat the same block of markup.
The above eliminates a lot of cut'n'paste in the tests.
As a driveby, a wait timeout used in the test_distroseries tests was increased to 90ms to allow the test to run and pass consistently whereas it would previously intermittently fail.
== Tests ==
bin/test -vvc --layer=YUI
Running canonical.testing.layers.YUITestLayer tests:
Set up canonical.testing.layers.BaseLayer in 0.277 seconds.
Set up canonical.testing.layers.FunctionalLayer in 10.985 seconds.
Set up canonical.testing.layers.YUITestLayer in 0.008 seconds.
Running:
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/app/javascript/autocomplete/tests/test_autocomplete.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/app/javascript/formoverlay/tests/test_formoverlay.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/app/javascript/picker/tests/test_personpicker.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/app/javascript/picker/tests/test_picker_patcher.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/app/javascript/picker/tests/test_picker.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/app/javascript/activator/tests/test_activator.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/app/javascript/anim/tests/test_anim.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/app/javascript/overlay/tests/test_overlay.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/app/javascript/tests/test_multicheckboxwidget.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/app/javascript/tests/test_expander.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/app/javascript/tests/test_lp_client.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/app/javascript/tests/test_lp_names.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/app/javascript/tests/test_hide_comment.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/app/javascript/tests/test_lp_collapsibles.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/app/javascript/inlineedit/tests/test_inline_edit.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/app/javascript/choiceedit/tests/test_choiceedit.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/bugs/javascript/tests/test_filebug_dupfinder.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/bugs/javascript/tests/test_bug_notification_level.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/bugs/javascript/tests/test_subscribers_list.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/bugs/javascript/tests/test_subscription.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/bugs/javascript/tests/test_me_too.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/bugs/javascript/tests/test_bug_subscription_portlet.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/code/javascript/tests/test_productseries-setbranch.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/code/javascript/tests/test_branchdiff.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/registry/javascript/tests/test_timeline.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/registry/javascript/tests/test_structural_subscription.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/registry/javascript/tests/test_milestone_table.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/registry/javascript/tests/test_distroseries.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/soyuz/javascript/tests/test_archivesubscribers_index.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/soyuz/javascript/tests/test_lp_dynamic_dom_updater.html
/home/ian/projects/lp-branches/devel-sandbox/lib/lp/translations/javascript/tests/test_sourcepackage_sharing_details.html
Ran 32 tests with 0 failures and 0 errors in 1 minutes 15.709 seconds.
Tearing down left over layers:
Tear down canonical.testing.layers.YUITestLayer ... not supported
Tear down canonical.testing.layers.FunctionalLayer ... not supported
Tear down canonical.testing.layers.BaseLayer in 0.006 seconds.
The test_longpoll.html was run manually because it lives in a path not picked up by the test finder.
== Lint ==
Some lint was fixed but there's lots of existing lint in the ported lazj-js tests which can be fixed in another branch.
--
https://code.launchpad.net/~wallyworld/launchpad/yui-test-cleanup-807294/+merge/67281
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wallyworld/launchpad/yui-test-cleanup-807294 into lp:launchpad.
=== modified file 'lib/lp/app/javascript/activator/tests/test_activator.html'
--- lib/lp/app/javascript/activator/tests/test_activator.html 2011-07-06 05:13:30 +0000
+++ lib/lp/app/javascript/activator/tests/test_activator.html 2011-07-08 06:23:55 +0000
@@ -4,12 +4,22 @@
<head>
<title>Activator</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../../app/javascript/testing/testrunner.js"></script>
+>>>>>>> MERGE-SOURCE
<!-- The module under test -->
<script type="text/javascript" src="../activator.js"></script>
@@ -21,6 +31,9 @@
</head>
<body class="yui3-skin-sam">
+<<<<<<< TREE
<div id="log"></div>
+=======
+>>>>>>> MERGE-SOURCE
</body>
</html>
=== modified file 'lib/lp/app/javascript/activator/tests/test_activator.js'
--- lib/lp/app/javascript/activator/tests/test_activator.js 2011-07-06 05:13:30 +0000
+++ lib/lp/app/javascript/activator/tests/test_activator.js 2011-07-08 06:23:55 +0000
@@ -1,5 +1,6 @@
/* Copyright (c) 2009, Canonical Ltd. All rights reserved. */
+<<<<<<< TREE
YUI({
base: '../../../../../canonical/launchpad/icing/yui/',
filter: 'raw',
@@ -7,6 +8,10 @@
fetchCSS: false
}).use('test', 'console', 'node', 'lazr.activator',
'event', 'event-simulate', function(Y) {
+=======
+YUI().use('lp.testing.runner', 'test', 'console', 'node', 'lazr.activator',
+ 'event', 'event-simulate', function(Y) {
+>>>>>>> MERGE-SOURCE
var Assert = Y.Assert; // For easy access to isTrue(), etc.
@@ -273,6 +278,7 @@
}
}));
+<<<<<<< TREE
// Lock, stock, and two smoking barrels.
var handle_complete = function(data) {
window.status = '::::' + JSON.stringify(data);
@@ -288,5 +294,8 @@
Y.on('domready', function() {
Y.Test.Runner.run();
});
+=======
+Y.lp.testing.Runner.run(suite);
+>>>>>>> MERGE-SOURCE
});
=== modified file 'lib/lp/app/javascript/anim/tests/test_anim.html'
--- lib/lp/app/javascript/anim/tests/test_anim.html 2011-07-06 05:13:30 +0000
+++ lib/lp/app/javascript/anim/tests/test_anim.html 2011-07-08 06:23:55 +0000
@@ -4,12 +4,22 @@
<head>
<title>Anim</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../../app/javascript/testing/testrunner.js"></script>
+>>>>>>> MERGE-SOURCE
<!-- The module under test -->
<script type="text/javascript" src="../anim.js"></script>
@@ -20,7 +30,5 @@
</head>
<body class="yui3-skin-sam">
-
-<div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/app/javascript/anim/tests/test_anim.js'
--- lib/lp/app/javascript/anim/tests/test_anim.js 2011-07-06 05:13:30 +0000
+++ lib/lp/app/javascript/anim/tests/test_anim.js 2011-07-08 06:23:55 +0000
@@ -1,5 +1,6 @@
/* Copyright (c) 2009, Canonical Ltd. All rights reserved. */
+<<<<<<< TREE
YUI({
base: '../../../../../canonical/launchpad/icing/yui/',
filter: 'raw',
@@ -7,6 +8,10 @@
fetchCSS: false
}).use('test', 'console', 'node', 'lazr.anim',
'event', 'event-simulate', function(Y) {
+=======
+YUI().use('lp.testing.runner', 'test', 'console', 'node', 'lazr.anim',
+ 'event', 'event-simulate', function(Y) {
+>>>>>>> MERGE-SOURCE
var Assert = Y.Assert; // For easy access to isTrue(), etc.
@@ -186,6 +191,7 @@
}
}));
+<<<<<<< TREE
// Lock, stock, and two smoking barrels.
var handle_complete = function(data) {
window.status = '::::' + JSON.stringify(data);
@@ -201,5 +207,8 @@
Y.on('domready', function() {
Y.Test.Runner.run();
});
+=======
+Y.lp.testing.Runner.run(suite);
+>>>>>>> MERGE-SOURCE
});
=== modified file 'lib/lp/app/javascript/autocomplete/tests/test_autocomplete.html'
--- lib/lp/app/javascript/autocomplete/tests/test_autocomplete.html 2011-07-06 05:13:30 +0000
+++ lib/lp/app/javascript/autocomplete/tests/test_autocomplete.html 2011-07-08 06:23:55 +0000
@@ -4,12 +4,22 @@
<head>
<title>autocomplete unit tests</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../../app/javascript/testing/testrunner.js"></script>
+>>>>>>> MERGE-SOURCE
<!-- The module under test -->
<script type="text/javascript" src="../autocomplete.js"></script>
@@ -19,9 +29,5 @@
</head>
<body class="yui3-skin-sam">
-
- <!-- Widget markup goes here... -->
-
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/app/javascript/autocomplete/tests/test_autocomplete.js'
--- lib/lp/app/javascript/autocomplete/tests/test_autocomplete.js 2011-07-06 05:13:30 +0000
+++ lib/lp/app/javascript/autocomplete/tests/test_autocomplete.js 2011-07-08 06:23:55 +0000
@@ -1,5 +1,6 @@
/* Copyright (c) 2009, Canonical Ltd. All rights reserved. */
+<<<<<<< TREE
YUI({
base: '../../../../../canonical/launchpad/icing/yui/',
filter: 'raw',
@@ -7,6 +8,10 @@
fetchCSS: false
}).use('test', 'console', 'node', 'lazr.autocomplete',
'event', 'event-simulate', function(Y) {
+=======
+YUI().use('lp.testing.runner', 'test', 'console', 'node', 'lazr.autocomplete',
+ 'event', 'event-simulate', function(Y) {
+>>>>>>> MERGE-SOURCE
/*****************************
*
@@ -569,6 +574,7 @@
}
}));
+<<<<<<< TREE
// Lock, stock, and two smoking barrels.
var handle_complete = function(data) {
window.status = '::::' + JSON.stringify(data);
@@ -584,5 +590,8 @@
Y.on('domready', function() {
Y.Test.Runner.run();
});
+=======
+Y.lp.testing.Runner.run(suite);
+>>>>>>> MERGE-SOURCE
});
=== modified file 'lib/lp/app/javascript/choiceedit/tests/test_choiceedit.html'
--- lib/lp/app/javascript/choiceedit/tests/test_choiceedit.html 2011-07-06 05:13:30 +0000
+++ lib/lp/app/javascript/choiceedit/tests/test_choiceedit.html 2011-07-08 06:23:55 +0000
@@ -3,12 +3,22 @@
<head>
<title>Status Editor</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../../app/javascript/testing/testrunner.js"></script>
+>>>>>>> MERGE-SOURCE
<!-- Dependency -->
<script type="text/javascript" src="../../lazr/lazr.js"></script>
@@ -22,7 +32,5 @@
<script type="text/javascript" src="test_choiceedit.js"></script>
</head>
<body class="yui3-skin-sam">
-
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js'
--- lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js 2011-07-06 05:13:30 +0000
+++ lib/lp/app/javascript/choiceedit/tests/test_choiceedit.js 2011-07-08 06:23:55 +0000
@@ -1,5 +1,6 @@
/* Copyright (c) 2008, Canonical Ltd. All rights reserved. */
+<<<<<<< TREE
YUI({
base: '../../../../../canonical/launchpad/icing/yui/',
filter: 'raw',
@@ -7,6 +8,10 @@
fetchCSS: false
}).use('test', 'console', 'node', 'lazr.choiceedit',
'event', 'event-simulate', 'widget-stack', function(Y) {
+=======
+YUI().use('lp.testing.runner', 'test', 'console', 'node', 'lazr.choiceedit',
+ 'event', 'event-simulate', 'widget-stack', function(Y) {
+>>>>>>> MERGE-SOURCE
// Local aliases
var Assert = Y.Assert,
@@ -527,6 +532,7 @@
}
}));
+<<<<<<< TREE
// Lock, stock, and two smoking barrels.
var handle_complete = function(data) {
window.status = '::::' + JSON.stringify(data);
@@ -542,5 +548,8 @@
Y.on('domready', function() {
Y.Test.Runner.run();
});
+=======
+Y.lp.testing.Runner.run(suite);
+>>>>>>> MERGE-SOURCE
});
=== modified file 'lib/lp/app/javascript/formoverlay/tests/test_formoverlay.html'
--- lib/lp/app/javascript/formoverlay/tests/test_formoverlay.html 2011-07-06 05:13:30 +0000
+++ lib/lp/app/javascript/formoverlay/tests/test_formoverlay.html 2011-07-08 06:23:55 +0000
@@ -3,12 +3,22 @@
<head>
<title>Form Overlay</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../../app/javascript/testing/testrunner.js"></script>
+>>>>>>> MERGE-SOURCE
<!-- dependent modules from lazr-->
<script type="text/javascript" src="../../lazr/lazr.js"></script>
@@ -27,6 +37,5 @@
<body class="yui3-skin-sam">
<div id="form_overlay_example">
</div>
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/app/javascript/formoverlay/tests/test_formoverlay.js'
--- lib/lp/app/javascript/formoverlay/tests/test_formoverlay.js 2011-07-06 05:13:30 +0000
+++ lib/lp/app/javascript/formoverlay/tests/test_formoverlay.js 2011-07-08 06:23:55 +0000
@@ -1,5 +1,6 @@
/* Copyright (c) 2008, Canonical Ltd. All rights reserved. */
+<<<<<<< TREE
YUI({
base: '../../../../../canonical/launchpad/icing/yui/',
filter: 'raw',
@@ -7,6 +8,11 @@
fetchCSS: false
}).use('test', 'dump', 'console', 'node', 'lazr.formoverlay',
'event', 'event-simulate', 'lazr.testing.mockio', function(Y) {
+=======
+YUI().use('lp.testing.runner', 'test', 'dump', 'console', 'node',
+ 'lazr.formoverlay', 'event', 'event-simulate',
+ 'lazr.testing.mockio', function(Y) {
+>>>>>>> MERGE-SOURCE
var Assert = Y.Assert; // For easy access to isTrue(), etc.
@@ -502,6 +508,7 @@
}
}));
+<<<<<<< TREE
// Lock, stock, and two smoking barrels.
var handle_complete = function(data) {
window.status = '::::' + JSON.stringify(data);
@@ -517,5 +524,8 @@
Y.on('domready', function() {
Y.Test.Runner.run();
});
+=======
+Y.lp.testing.Runner.run(suite);
+>>>>>>> MERGE-SOURCE
});
=== modified file 'lib/lp/app/javascript/inlineedit/tests/test_inline_edit.html'
--- lib/lp/app/javascript/inlineedit/tests/test_inline_edit.html 2011-07-06 05:13:30 +0000
+++ lib/lp/app/javascript/inlineedit/tests/test_inline_edit.html 2011-07-08 06:23:55 +0000
@@ -4,12 +4,22 @@
<head>
<title>Inline Edit</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../../app/javascript/testing/testrunner.js"></script>
+>>>>>>> MERGE-SOURCE
<!-- The module under test -->
<script type="text/javascript" src="../editor.js"></script>
@@ -21,6 +31,5 @@
</head>
<body class="yui3-skin-sam">
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/app/javascript/inlineedit/tests/test_inline_edit.js'
--- lib/lp/app/javascript/inlineedit/tests/test_inline_edit.js 2011-07-06 14:18:59 +0000
+++ lib/lp/app/javascript/inlineedit/tests/test_inline_edit.js 2011-07-08 06:23:55 +0000
@@ -1,5 +1,6 @@
/* Copyright (c) 2009, Canonical Ltd. All rights reserved. */
+<<<<<<< TREE
YUI({
base: '../../../../../canonical/launchpad/icing/yui/',
filter: 'raw',
@@ -9,6 +10,12 @@
'event', 'event-simulate', 'plugin', function(Y) {
var SAMPLE_HTML = " \
+=======
+YUI().use('lp.testing.runner', 'test', 'console', 'node', 'lazr.editor',
+ 'event', 'event-simulate', 'plugin', function(Y) {
+
+var SAMPLE_HTML = " \
+>>>>>>> MERGE-SOURCE
<h1>Single-line editing</h1> \
<div id='editable_single_text'> \
<span id='single_text' class='yui3-editable_text-text'>Some editable inline text.</span> \
@@ -1248,6 +1255,7 @@
}
}));
+<<<<<<< TREE
// Lock, stock, and two smoking barrels.
var handle_complete = function(data) {
window.status = '::::' + JSON.stringify(data);
@@ -1263,5 +1271,8 @@
Y.on('domready', function() {
Y.Test.Runner.run();
});
+=======
+Y.lp.testing.Runner.run(suite);
+>>>>>>> MERGE-SOURCE
});
=== modified file 'lib/lp/app/javascript/overlay/tests/test_overlay.html'
--- lib/lp/app/javascript/overlay/tests/test_overlay.html 2011-07-06 05:13:30 +0000
+++ lib/lp/app/javascript/overlay/tests/test_overlay.html 2011-07-08 06:23:55 +0000
@@ -4,6 +4,7 @@
<head>
<title>Pretty Overlay</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
@@ -11,6 +12,15 @@
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../../app/javascript/testing/testrunner.js"></script>
+>>>>>>> MERGE-SOURCE
<!-- The module under test -->
<script type="text/javascript" src="../overlay.js"></script>
@@ -20,6 +30,5 @@
</head>
<body class="yui3-skin-sam">
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/app/javascript/overlay/tests/test_overlay.js'
--- lib/lp/app/javascript/overlay/tests/test_overlay.js 2011-07-06 05:13:30 +0000
+++ lib/lp/app/javascript/overlay/tests/test_overlay.js 2011-07-08 06:23:55 +0000
@@ -1,5 +1,6 @@
/* Copyright (c) 2009, Canonical Ltd. All rights reserved. */
+<<<<<<< TREE
YUI({
base: '../../../../../canonical/launchpad/icing/yui/',
filter: 'raw',
@@ -7,6 +8,10 @@
fetchCSS: false
}).use('test', 'console', 'node', 'lazr.overlay',
'event', 'event-simulate', 'widget-stack', function(Y) {
+=======
+YUI().use('lp.testing.runner', 'test', 'console', 'node', 'lazr.overlay',
+ 'event', 'event-simulate', 'widget-stack', function(Y) {
+>>>>>>> MERGE-SOURCE
// KeyCode for escape
var ESCAPE = 27;
@@ -216,6 +221,7 @@
}));
+<<<<<<< TREE
// Lock, stock, and two smoking barrels.
var handle_complete = function(data) {
window.status = '::::' + JSON.stringify(data);
@@ -231,5 +237,8 @@
Y.on('domready', function() {
Y.Test.Runner.run();
});
+=======
+Y.lp.testing.Runner.run(suite);
+>>>>>>> MERGE-SOURCE
});
=== modified file 'lib/lp/app/javascript/picker/tests/test_personpicker.html'
--- lib/lp/app/javascript/picker/tests/test_personpicker.html 2011-07-06 05:13:30 +0000
+++ lib/lp/app/javascript/picker/tests/test_personpicker.html 2011-07-08 06:23:55 +0000
@@ -1,5 +1,6 @@
<html>
<head>
+<<<<<<< TREE
<title>Launchpad PersonPicker</title>
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
@@ -20,6 +21,26 @@
<script type="text/javascript" src="../../lazr/lazr.js"></script>
<script type="text/javascript" src="../../overlay/overlay.js"></script>
<script type="text/javascript" src="../picker.js"></script>
+=======
+ <title>Launchpad PersonPicker</title>
+
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../../app/javascript/testing/testrunner.js"></script>
+
+ <!-- Some required dependencies -->
+ <script type="text/javascript" src="../../client.js"></script>
+ <script type="text/javascript" src="../../lp.js"></script>
+ <script type="text/javascript" src="../../activator/activator.js"></script>
+ <script type="text/javascript" src="../../anim/anim.js"></script>
+ <script type="text/javascript" src="../../lazr/lazr.js"></script>
+ <script type="text/javascript" src="../../overlay/overlay.js"></script>
+ <script type="text/javascript" src="../picker.js"></script>
+>>>>>>> MERGE-SOURCE
<script type="text/javascript" src="../picker_patcher.js"></script>
<!-- The module under test -->
@@ -45,6 +66,5 @@
</span>
</span>
</div>
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/app/javascript/picker/tests/test_picker.html'
--- lib/lp/app/javascript/picker/tests/test_picker.html 2011-07-06 05:13:30 +0000
+++ lib/lp/app/javascript/picker/tests/test_picker.html 2011-07-08 06:23:55 +0000
@@ -4,12 +4,22 @@
<head>
<title>Picker</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../../app/javascript/testing/testrunner.js"></script>
+>>>>>>> MERGE-SOURCE
<!-- The module under test -->
<script type="text/javascript" src="../../overlay/overlay.js"></script>
@@ -21,6 +31,5 @@
<script type="text/javascript" src="test_picker.js"></script>
</head>
<body class="yui3-skin-sam">
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/app/javascript/picker/tests/test_picker.js'
--- lib/lp/app/javascript/picker/tests/test_picker.js 2011-07-06 14:18:59 +0000
+++ lib/lp/app/javascript/picker/tests/test_picker.js 2011-07-08 06:23:55 +0000
@@ -1,5 +1,6 @@
/* Copyright (c) 2009, Canonical Ltd. All rights reserved. */
+<<<<<<< TREE
YUI({
base: '../../../../../canonical/launchpad/icing/yui/',
filter: 'raw',
@@ -7,6 +8,10 @@
fetchCSS: false
}).use('test', 'console', 'dump', 'node', 'lazr.picker',
'event', 'event-simulate', function(Y) {
+=======
+YUI().use('lp.testing.runner', 'test', 'console', 'node', 'lazr.picker',
+ 'event', 'event-simulate', 'dump', function(Y) {
+>>>>>>> MERGE-SOURCE
// Local aliases
var Assert = Y.Assert,
@@ -961,6 +966,7 @@
}));
+<<<<<<< TREE
// Lock, stock, and two smoking barrels.
var handle_complete = function(data) {
window.status = '::::' + JSON.stringify(data);
@@ -976,5 +982,8 @@
Y.on('domready', function() {
Y.Test.Runner.run();
});
+=======
+Y.lp.testing.Runner.run(suite);
+>>>>>>> MERGE-SOURCE
});
=== modified file 'lib/lp/app/javascript/picker/tests/test_picker_patcher.html'
--- lib/lp/app/javascript/picker/tests/test_picker_patcher.html 2011-07-06 05:13:30 +0000
+++ lib/lp/app/javascript/picker/tests/test_picker_patcher.html 2011-07-08 06:23:55 +0000
@@ -4,12 +4,22 @@
<head>
<title>Launchpad Picker</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet" href="../../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../../app/javascript/testing/testrunner.js"></script>
+>>>>>>> MERGE-SOURCE
<!-- Some required dependencies -->
<script type="text/javascript" src="../../activator/activator.js"></script>
@@ -43,6 +53,5 @@
</span>
</span>
</div>
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/app/javascript/picker/tests/test_picker_patcher.js'
--- lib/lp/app/javascript/picker/tests/test_picker_patcher.js 2011-07-08 03:08:43 +0000
+++ lib/lp/app/javascript/picker/tests/test_picker_patcher.js 2011-07-08 06:23:55 +0000
@@ -1,13 +1,17 @@
/* Copyright (c) 2011, Canonical Ltd. All rights reserved. */
+<<<<<<< TREE
YUI({
base: '../../../../../canonical/launchpad/icing/yui/',
filter: 'raw',
combine: false,
fetchCSS: false
}).use('test', 'console', 'node', 'lp', 'lp.client', 'escape', 'event',
+=======
+YUI().use('lp.testing.runner', 'test', 'console', 'node', 'lp', 'lp.client',
+>>>>>>> MERGE-SOURCE
'event-focus', 'event-simulate', 'lazr.picker', 'lazr.person-picker',
- 'lp.app.picker', 'node-event-simulate',
+ 'lp.app.picker', 'node-event-simulate', 'escape', 'event',
function(Y) {
var Assert = Y.Assert;
@@ -511,21 +515,6 @@
}));
-
-// Lock, stock, and two smoking barrels.
-var handle_complete = function(data) {
- window.status = '::::' + JSON.stringify(data);
- };
-Y.Test.Runner.on('complete', handle_complete);
-Y.Test.Runner.add(suite);
-
-var yui_console = new Y.Console({
- newestOnTop: false
-});
-yui_console.render('#log');
-
-Y.on('domready', function() {
- Y.Test.Runner.run();
-});
+Y.lp.testing.Runner.run(suite);
});
=== renamed file 'lib/canonical/launchpad/javascript/test.css' => 'lib/lp/app/javascript/testing/test.css'
--- lib/canonical/launchpad/javascript/test.css 2011-03-18 11:46:39 +0000
+++ lib/lp/app/javascript/testing/test.css 2011-07-08 06:23:55 +0000
@@ -1,4 +1,8 @@
-@import url("../icing/yui/assets/skins/sam/skin.css");
+@import url("../../../../canonical/launchpad/icing/style-3-0.css");
+@import url("../../../../canonical/launchpad/icing/yui/assets/skins/sam/skin.css");
+@import url("../../../../canonical/launchpad/icing/yui/cssreset/reset.css");
+@import url("../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css");
+@import url("../../../../canonical/launchpad/icing/yui/cssbase/base.css");
/* Taken and customized from testlogger.css */
.yui-console-entry-src { display:none; }
=== added file 'lib/lp/app/javascript/testing/testrunner.js'
--- lib/lp/app/javascript/testing/testrunner.js 1970-01-01 00:00:00 +0000
+++ lib/lp/app/javascript/testing/testrunner.js 2011-07-08 06:23:55 +0000
@@ -0,0 +1,41 @@
+/* Copyright (c) 2011, Canonical Ltd. All rights reserved. */
+
+var YUI_config = {
+ filter: 'raw',
+ combine: false,
+ fetchCSS: false
+};
+
+YUI.add("lp.testing.runner", function(Y) {
+
+/**
+ * Testing utilities.
+ *
+ * @module lp.testing
+ * @namespace lp
+ */
+
+var Runner = Y.namespace("lp.testing.Runner");
+
+Runner.run = function(suite) {
+
+ // Lock, stock, and two smoking barrels.
+ var handle_complete = function(data) {
+ window.status = '::::' + JSON.stringify(data);
+ };
+ Y.Test.Runner.on('complete', handle_complete);
+ Y.Test.Runner.add(suite);
+
+ Y.on("domready", function() {
+ var log = Y.Node.create('<div></div>');
+ Y.one(document.body).appendChild(log);
+ var yconsole = new Y.Console({
+ newestOnTop: false,
+ useBrowserConsole: true
+ });
+ yconsole.render(log);
+ Y.Test.Runner.run();
+ });
+};
+
+}, "0.1", {"requires": ["oop", "test", "console"]});
=== modified file 'lib/lp/app/javascript/tests/test_expander.html'
--- lib/lp/app/javascript/tests/test_expander.html 2011-07-06 01:25:31 +0000
+++ lib/lp/app/javascript/tests/test_expander.html 2011-07-08 06:23:55 +0000
@@ -1,5 +1,6 @@
<html>
<head>
+<<<<<<< TREE
<title>Expander widget</title>
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
@@ -13,6 +14,20 @@
href="../../../../canonical/launchpad/javascript/test.css" />
<script type="text/javascript" src="../client.js"></script>
<script type="text/javascript" src="../lp.js"></script>
+=======
+ <title>Expander widget</title>
+
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
+
+ <script type="text/javascript" src="../client.js"></script>
+ <script type="text/javascript" src="../lp.js"></script>
+>>>>>>> MERGE-SOURCE
<!-- The module under test -->
<script type="text/javascript" src="../expander.js"></script>
@@ -21,7 +36,6 @@
<script type="text/javascript" src="test_expander.js"></script>
</head>
<body class="yui3-skin-sam">
-
<!-- The example markup required by the script to run -->
<div class="test-hook">
</div>
=== modified file 'lib/lp/app/javascript/tests/test_hide_comment.html'
--- lib/lp/app/javascript/tests/test_hide_comment.html 2011-07-06 01:25:31 +0000
+++ lib/lp/app/javascript/tests/test_hide_comment.html 2011-07-08 06:23:55 +0000
@@ -1,5 +1,6 @@
<html>
<head>
+<<<<<<< TREE
<title>Launchpad Comment Hiding</title>
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
@@ -11,6 +12,18 @@
href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet"
href="../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <title>Launchpad Comment Hiding</title>
+
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
+
+>>>>>>> MERGE-SOURCE
<script type="text/javascript" src="../../../app/javascript/client.js"></script>
<script type="text/javascript" src="../../../app/javascript/lp.js"></script>
@@ -42,8 +55,5 @@
</div>
</div>
-
- <!-- The test output -->
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/app/javascript/tests/test_hide_comment.js'
--- lib/lp/app/javascript/tests/test_hide_comment.js 2011-06-07 16:42:11 +0000
+++ lib/lp/app/javascript/tests/test_hide_comment.js 2011-07-08 06:23:55 +0000
@@ -2,12 +2,8 @@
* GNU Affero General Public License version 3 (see the file LICENSE).
*/
-YUI({
- base: '../../../../canonical/launchpad/icing/yui/',
- filter: 'raw', combine: false,
- fetchCSS: false
- }).use('test', 'console', 'node', 'node-event-simulate',
- 'lp.comments.hide', function(Y) {
+YUI().use('lp.testing.runner', 'test', 'console', 'node',
+ 'lp.comments.hide', 'node-event-simulate', function(Y) {
var suite = new Y.Test.Suite("lp.comments.hide Tests");
@@ -79,18 +75,7 @@
}
}));
- // Lock, stock, and two smoking barrels.
- var handle_complete = function(data) {
- window.status = '::::' + JSON.stringify(data);
- };
- Y.Test.Runner.on('complete', handle_complete);
- Y.Test.Runner.add(suite);
-
- var console = new Y.Console({newestOnTop: false});
- console.render('#log');
-
- Y.on('domready', function() {
- Y.Test.Runner.run();
- });
+ Y.lp.testing.Runner.run(suite);
+
});
=== modified file 'lib/lp/app/javascript/tests/test_lp_client.html'
--- lib/lp/app/javascript/tests/test_lp_client.html 2011-07-06 01:25:31 +0000
+++ lib/lp/app/javascript/tests/test_lp_client.html 2011-07-08 06:23:55 +0000
@@ -3,12 +3,22 @@
<head>
<title>Launchpad lp.client moduel</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet" href="../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
+>>>>>>> MERGE-SOURCE
<!-- The module under test -->
<script type="text/javascript" src="../client.js"></script>
=== modified file 'lib/lp/app/javascript/tests/test_lp_client.js'
--- lib/lp/app/javascript/tests/test_lp_client.js 2011-06-07 16:42:11 +0000
+++ lib/lp/app/javascript/tests/test_lp_client.js 2011-07-08 06:23:55 +0000
@@ -1,11 +1,7 @@
/* Copyright (c) 2011, Canonical Ltd. All rights reserved. */
-YUI({
- base: '../../../../canonical/launchpad/icing/yui/',
- filter: 'raw',
- combine: false,
- fetchCSS: false
- }).use('test', 'console', 'lp.client', 'escape', function(Y) {
+YUI().use('lp.testing.runner', 'test', 'console', 'lp.client',
+ 'escape', function(Y) {
var Assert = Y.Assert; // For easy access to isTrue(), etc.
@@ -281,20 +277,6 @@
}));
-
-// Lock, stock, and two smoking barrels.
-var handle_complete = function(data) {
- window.status = '::::' + JSON.stringify(data);
- };
-Y.Test.Runner.on('complete', handle_complete);
-Y.Test.Runner.add(suite);
-
-var yui_console = new Y.Console({
- newestOnTop: false
-});
-yui_console.render('#log');
-
-Y.on('domready', function() {
- Y.Test.Runner.run();
-});
+Y.lp.testing.Runner.run(suite);
+
});
=== modified file 'lib/lp/app/javascript/tests/test_lp_collapsibles.html'
--- lib/lp/app/javascript/tests/test_lp_collapsibles.html 2011-07-06 01:25:31 +0000
+++ lib/lp/app/javascript/tests/test_lp_collapsibles.html 2011-07-08 06:23:55 +0000
@@ -3,6 +3,7 @@
<head>
<title>Launchpad Collapsibles</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
@@ -14,6 +15,20 @@
<script type="text/javascript" src="../effects/effects.js"></script>
<!-- The module under test -->
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
+
+ <!-- Some required dependencies -->
+ <script type="text/javascript" src="../effects/effects.js"></script>
+
+ <!-- The module under test -->
+>>>>>>> MERGE-SOURCE
<script type="text/javascript" src="../lp.js"></script>
<!-- The test suite -->
=== modified file 'lib/lp/app/javascript/tests/test_lp_collapsibles.js'
--- lib/lp/app/javascript/tests/test_lp_collapsibles.js 2011-06-22 18:53:35 +0000
+++ lib/lp/app/javascript/tests/test_lp_collapsibles.js 2011-07-08 06:23:55 +0000
@@ -1,11 +1,7 @@
/* Copyright (c) 2009, Canonical Ltd. All rights reserved. */
-YUI({
- base: '../../../../canonical/launchpad/icing/yui/',
- filter: 'raw',
- combine: false,
- fetchCSS: false
- }).use('test', 'console', 'lp', 'lazr.effects', function(Y) {
+YUI().use('lp.testing.runner', 'test', 'console', 'lp',
+ 'lazr.effects', function(Y) {
var Assert = Y.Assert; // For easy access to isTrue(), etc.
@@ -332,19 +328,6 @@
}
}));
-// Lock, stock, and two smoking barrels.
-var handle_complete = function(data) {
- window.status = '::::' + JSON.stringify(data);
- };
-Y.Test.Runner.on('complete', handle_complete);
-Y.Test.Runner.add(suite);
-
-var yui_console = new Y.Console({
- newestOnTop: false
-});
-yui_console.render('#log');
-
-Y.on('domready', function() {
- Y.Test.Runner.run();
-});
+Y.lp.testing.Runner.run(suite);
+
});
=== modified file 'lib/lp/app/javascript/tests/test_lp_names.html'
--- lib/lp/app/javascript/tests/test_lp_names.html 2011-07-06 01:25:31 +0000
+++ lib/lp/app/javascript/tests/test_lp_names.html 2011-07-08 06:23:55 +0000
@@ -3,12 +3,22 @@
<head>
<title>Launchpad Name Conversion</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet" href="../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
+>>>>>>> MERGE-SOURCE
<!-- The module under test -->
<script type="text/javascript" src="../lp-names.js"></script>
=== modified file 'lib/lp/app/javascript/tests/test_multicheckboxwidget.html'
--- lib/lp/app/javascript/tests/test_multicheckboxwidget.html 2011-07-06 01:25:31 +0000
+++ lib/lp/app/javascript/tests/test_multicheckboxwidget.html 2011-07-08 06:23:55 +0000
@@ -4,12 +4,13 @@
<head>
<title>Multicheckbox Widget</title>
- <!-- YUI 3.0 Setup -->
- <script type="text/javascript" src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
- <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
- <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
- <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
- <link rel="stylesheet" href="../../../../canonical/launchpad/javascript/test.css" />
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
<!-- Some required dependencies -->
<script type="text/javascript" src="../client.js"></script>
@@ -40,6 +41,5 @@
</span>
</span>
</div>
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/app/javascript/tests/test_multicheckboxwidget.js'
--- lib/lp/app/javascript/tests/test_multicheckboxwidget.js 2011-06-08 16:00:57 +0000
+++ lib/lp/app/javascript/tests/test_multicheckboxwidget.js 2011-07-08 06:23:55 +0000
@@ -1,12 +1,7 @@
/* Copyright (c) 2011, Canonical Ltd. All rights reserved. */
-YUI({
- base: '../../../../canonical/launchpad/icing/yui/',
- filter: 'raw',
- combine: false,
- fetchCSS: false
- }).use('test', 'console', 'dom', 'event', 'event-simulate',
- 'lazr.overlay', 'lazr.activator',
+YUI().use('lp.testing.runner', 'test', 'console', 'dom', 'event',
+ 'event-simulate', 'lazr.overlay', 'lazr.activator',
'lp.client', 'lp.app.multicheckbox',
function(Y) {
@@ -169,19 +164,6 @@
}));
-// Lock, stock, and two smoking barrels.
-var handle_complete = function(data) {
- window.status = '::::' + JSON.stringify(data);
- };
-Y.Test.Runner.on('complete', handle_complete);
-Y.Test.Runner.add(suite);
-
-var yui_console = new Y.Console({
- newestOnTop: false
-});
-yui_console.render('#log');
-
-Y.on('domready', function() {
- Y.Test.Runner.run();
-});
+Y.lp.testing.Runner.run(suite);
+
});
=== modified file 'lib/lp/app/longpoll/javascript/tests/test_longpoll.html'
--- lib/lp/app/longpoll/javascript/tests/test_longpoll.html 2011-07-07 09:59:11 +0000
+++ lib/lp/app/longpoll/javascript/tests/test_longpoll.html 2011-07-08 06:23:55 +0000
@@ -1,3 +1,4 @@
+<<<<<<< TREE
<!DOCTYPE
HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
@@ -28,3 +29,30 @@
<div id="log"></div>
</body>
</html>
+=======
+<!DOCTYPE
+ HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+ <head>
+ <title>Launchpad Longpoll</title>
+
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../../app/javascript/testing/testrunner.js"></script>
+
+ <!-- Required modules -->
+ <script type="text/javascript" src="../../../../app/javascript/client.js"></script>
+ <!-- The module under test -->
+ <script type="text/javascript" src="../longpoll.js"></script>
+ <!-- The test suite -->
+ <script type="text/javascript" src="test_longpoll.js"></script>
+ </head>
+ <body class="yui3-skin-sam">
+ </body>
+</html>
+>>>>>>> MERGE-SOURCE
=== modified file 'lib/lp/app/longpoll/javascript/tests/test_longpoll.js'
--- lib/lp/app/longpoll/javascript/tests/test_longpoll.js 2011-07-07 09:59:11 +0000
+++ lib/lp/app/longpoll/javascript/tests/test_longpoll.js 2011-07-08 06:23:55 +0000
@@ -1,3 +1,4 @@
+<<<<<<< TREE
/* Copyright (c) 2011, Canonical Ltd. All rights reserved. */
YUI({
@@ -275,3 +276,268 @@
Y.Test.Runner.run();
});
});
+=======
+/* Copyright (c) 2011, Canonical Ltd. All rights reserved. */
+
+YUI().use(
+ 'lp.testing.runner', 'test', 'console', 'node-event-simulate', 'json',
+ 'lp.app.longpoll',
+ function(Y) {
+
+ var suite = new Y.Test.Suite("longpoll Tests");
+ var longpoll = Y.lp.app.longpoll;
+
+ var testLongPollSingleton = {
+ name: 'TestLongPollSingleton',
+ tearDown: function() {
+ // Cleanup the singleton;
+ longpoll._manager = null;
+ },
+
+ testGetSingletonLongPollManager: function() {
+ Y.Assert.isNull(longpoll._manager);
+ var manager = longpoll.getLongPollManager();
+ Y.Assert.isNotNull(longpoll._manager);
+ var manager2 = longpoll.getLongPollManager();
+ Y.Assert.areSame(manager, manager2);
+ },
+
+ testInitLongPollManagerNoLongPoll: function() {
+ // if LP.cache.longpoll.key is undefined: no longpoll manager
+ // is created by setupLongPollManager.
+ window.LP = {
+ links: {},
+ cache: {}
+ };
+
+ longpoll.setupLongPollManager(true);
+ Y.Assert.isNull(longpoll._manager);
+ },
+
+ testInitLongPollManagerLongPoll: function() {
+ window.LP = {
+ links: {},
+ cache: {
+ longpoll: {
+ key: 'key',
+ uri: '/+longpoll/'
+ }
+ }
+ };
+
+ longpoll.setupLongPollManager(true);
+ Y.Assert.isNotNull(longpoll._manager);
+ }
+ };
+
+ suite.add(new Y.Test.Case(testLongPollSingleton));
+
+ var testLongPoll = {
+ name: 'TestLongPoll',
+
+ setUp: function() {
+ var manager = longpoll.getLongPollManager();
+ manager._repoll = false;
+ this.createBaseLP();
+ },
+
+ tearDown: function() {
+ // Cleanup the singleton;
+ longpoll._manager = null;
+ },
+
+ createBaseLP:function() {
+ window.LP = {
+ links: {},
+ cache: {}
+ };
+ },
+
+ setupLPCache: function() {
+ LP.cache.longpoll = {
+ key: 'key',
+ uri: '/+longpoll/'
+ };
+ },
+
+ setupLongPoll: function(nb_calls) {
+ this.setupLPCache();
+ return longpoll.setupLongPollManager(true);
+ },
+
+ testInitLongPollManagerQueueName: function() {
+ var manager = this.setupLongPoll();
+ Y.Assert.areEqual(LP.cache.longpoll.key, manager.key);
+ Y.Assert.areEqual(LP.cache.longpoll.uri, manager.uri);
+ Y.Assert.isFalse(Y.Lang.isValue(manager.nb_calls));
+ },
+
+ testPollStarted: function() {
+ var fired = false;
+ Y.on(longpoll.longpoll_start_event, function() {
+ fired = true;
+ });
+ var manager = this.setupLongPoll();
+ Y.Assert.isTrue(fired, "Start event not fired.");
+ },
+
+ testPollFailure: function() {
+ var fired = false;
+ Y.on(longpoll.longpoll_fail_event, function() {
+ fired = true;
+ });
+ // Monkeypatch io to simulate failure.
+ var manager = longpoll.getLongPollManager();
+ manager._io = function(uri, config) {
+ config.on.failure();
+ };
+ this.setupLongPoll();
+ Y.Assert.isTrue(fired, "Failure event not fired.");
+ },
+
+ testSuccessPollInvalidData: function() {
+ var manager = longpoll.getLongPollManager();
+ var custom_response = "{{";
+ var response = {
+ responseText: custom_response
+ };
+ var res = manager.successPoll("2", response);
+ Y.Assert.isFalse(res);
+ },
+
+ testSuccessPollMalformedData: function() {
+ var manager = longpoll.getLongPollManager();
+ var response = {
+ responseText: '{ "event_data": "6" }'
+ };
+ var res = manager.successPoll("2", response);
+ Y.Assert.isFalse(res);
+ },
+
+ testSuccessPollWellformedData: function() {
+ var manager = longpoll.getLongPollManager();
+ var response = {
+ responseText: '{ "event_key": "4", "event_data": "6"}'
+ };
+ var res = manager.successPoll("2", response);
+ Y.Assert.isTrue(res);
+ },
+
+ testPollDelay: function() {
+ // Create event listeners.
+ var longdelay_event_fired = false;
+ Y.on(longpoll.longpoll_longdelay, function(data) {
+ longdelay_event_fired = true;
+ });
+ var shortdelay_event_fired = false;
+ Y.on(longpoll.longpoll_shortdelay, function(data) {
+ shortdelay_event_fired = true;
+ });
+ var manager = longpoll.getLongPollManager();
+ // Monkeypatch io to simulate failure.
+ manager._io = function(uri, config) {
+ config.on.failure();
+ };
+ Y.Assert.areEqual(0, manager._failed_attempts);
+ this.setupLongPoll();
+ Y.Assert.areEqual(1, manager._failed_attempts);
+ var i, delay;
+ for (i=0; i<longpoll.MAX_SHORT_DELAY_FAILED_ATTEMPTS-2; i++) {
+ Y.Assert.areEqual(i+1, manager._failed_attempts);
+ delay = manager._pollDelay();
+ Y.Assert.areEqual(delay, longpoll.SHORT_DELAY);
+ }
+ // After MAX_SHORT_DELAY_FAILED_ATTEMPTS failed attempts, the
+ // delay returned by _pollDelay is LONG_DELAY and
+ // longpoll_longdelay is fired.
+ Y.Assert.isFalse(longdelay_event_fired);
+ delay = manager._pollDelay();
+ Y.Assert.isTrue(longdelay_event_fired);
+ Y.Assert.areEqual(delay, longpoll.LONG_DELAY);
+
+ // Monkeypatch io to simulate success.
+ manager._io = function(uri, config) {
+ config.on.success();
+ };
+ // After a success, longpoll.longpoll_shortdelay is fired.
+ Y.Assert.isFalse(shortdelay_event_fired);
+ delay = manager.poll();
+ Y.Assert.isTrue(shortdelay_event_fired);
+ },
+
+ testPollUriSequence: function() {
+ // Each new polling increses the sequence parameter:
+ // /+longpoll/?uuid=key&sequence=1
+ // /+longpoll/?uuid=key&sequence=2
+ // /+longpoll/?uuid=key&sequence=3
+ // ..
+ var count = 0;
+ // Monkeypatch io to simulate failure.
+ var manager = longpoll.getLongPollManager();
+ manager._io = function(uri, config) {
+ Y.Assert.areEqual(
+ '/+longpoll/?uuid=key&sequence=' + (count+1),
+ uri);
+ count = count + 1;
+ var response = {
+ responseText: '{"i":2}'
+ };
+ config.on.success(2, response);
+ };
+ this.setupLongPoll();
+ Y.Assert.isTrue(count === 1, "Uri not requested.");
+ },
+
+ testPollPayLoadBad: function() {
+ // If a non valid response is returned, longpoll_fail_event
+ // is fired.
+ var fired = false;
+ Y.on(longpoll.longpoll_fail_event, function() {
+ fired = true;
+ });
+ var manager = longpoll.getLongPollManager();
+ // Monkeypatch io.
+ manager._io = function(uri, config) {
+ var response = {
+ responseText: "{non valid json"
+ };
+ config.on.success(2, response);
+ };
+ this.setupLongPoll();
+ Y.Assert.isTrue(fired, "Failure event not fired.");
+ },
+
+ testPollPayLoadOk: function() {
+ // Create a valid message.
+ var custom_event = 'my-event';
+ var custom_payload = {5: 'i'};
+ var custom_response = {
+ 'event_key': custom_event,
+ 'event_data': custom_payload
+ };
+ var fired = false;
+ Y.on(custom_event, function(data) {
+ fired = true;
+ Y.Assert.areEqual(data, custom_payload);
+ });
+ var manager = longpoll.getLongPollManager();
+ // Monkeypatch io.
+ manager._io = function(uri, config) {
+ var response = {
+ responseText: Y.JSON.stringify(custom_response)
+ };
+ config.on.success(2, response);
+ };
+ this.setupLongPoll();
+ Y.Assert.isTrue(fired, "Custom event not fired.");
+ }
+
+
+ };
+
+ suite.add(new Y.Test.Case(testLongPoll));
+
+ Y.lp.testing.Runner.run(suite);
+
+});
+>>>>>>> MERGE-SOURCE
=== modified file 'lib/lp/bugs/javascript/tests/test_bug_notification_level.html'
--- lib/lp/bugs/javascript/tests/test_bug_notification_level.html 2011-07-06 01:25:31 +0000
+++ lib/lp/bugs/javascript/tests/test_bug_notification_level.html 2011-07-08 06:23:55 +0000
@@ -1,7 +1,8 @@
<html>
<head>
- <title>Bug notification level set-up</title>
+ <title>Bug notification level set-up</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<script type="text/javascript"
src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
@@ -13,6 +14,15 @@
href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet"
href="../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
+>>>>>>> MERGE-SOURCE
<script type="text/javascript"
src="../../../app/javascript/client.js"></script>
@@ -35,9 +45,5 @@
</style>
</head>
<body class="yui3-skin-sam">
- <!-- Example markup required by test suite -->
-
- <!-- The test output -->
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/bugs/javascript/tests/test_bug_subscription_portlet.html'
--- lib/lp/bugs/javascript/tests/test_bug_subscription_portlet.html 2011-07-06 01:25:31 +0000
+++ lib/lp/bugs/javascript/tests/test_bug_subscription_portlet.html 2011-07-08 06:23:55 +0000
@@ -1,7 +1,8 @@
<html>
<head>
- <title>Bug subscriptions: descriptions and unsubscribe actions</title>
+ <title>Bug subscriptions: descriptions and unsubscribe actions</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<script type="text/javascript"
src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
@@ -13,6 +14,15 @@
href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet"
href="../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
+>>>>>>> MERGE-SOURCE
<script type="text/javascript"
src="../../../app/javascript/client.js"></script>
@@ -41,8 +51,5 @@
</style>
</head>
<body class="yui3-skin-sam">
-
- <!-- The test output -->
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/bugs/javascript/tests/test_filebug_dupfinder.html'
--- lib/lp/bugs/javascript/tests/test_filebug_dupfinder.html 2011-07-06 01:25:31 +0000
+++ lib/lp/bugs/javascript/tests/test_filebug_dupfinder.html 2011-07-08 06:23:55 +0000
@@ -1,7 +1,8 @@
<html>
-<head>
- <title>File bug functionality</title>
+ <head>
+ <title>File bug functionality</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<script type="text/javascript"
src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
@@ -13,6 +14,15 @@
href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet"
href="../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
+>>>>>>> MERGE-SOURCE
<script type="text/javascript"
src="../../../app/javascript/client.js"></script>
@@ -78,8 +88,5 @@
<a id="duplicate-search-url" href="https://bugs.launchpad.dev/foo/+filebug-show-similar"></a>
</p>
</div>
-
-<!-- The test output -->
-<div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/bugs/javascript/tests/test_me_too.html'
--- lib/lp/bugs/javascript/tests/test_me_too.html 2011-07-06 01:25:31 +0000
+++ lib/lp/bugs/javascript/tests/test_me_too.html 2011-07-08 06:23:55 +0000
@@ -3,11 +3,13 @@
<head>
<title>Status Editor</title>
- <!-- YUI 3.0 Setup -->
- <script type="text/javascript" src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
- <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
- <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
- <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
<!-- Dependency -->
<script type="text/javascript"
@@ -43,6 +45,5 @@
</style>
</head>
<body class="yui3-skin-sam">
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/bugs/javascript/tests/test_subscribers_list.html'
--- lib/lp/bugs/javascript/tests/test_subscribers_list.html 2011-07-06 05:13:30 +0000
+++ lib/lp/bugs/javascript/tests/test_subscribers_list.html 2011-07-08 06:23:55 +0000
@@ -1,5 +1,6 @@
<html>
<head>
+<<<<<<< TREE
<title>Bug subscriptions: subscribers list</title>
<!-- YUI 3.0 Setup -->
@@ -13,6 +14,18 @@
href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet"
href="../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <title>Bug subscriptions: subscribers list</title>
+
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
+
+>>>>>>> MERGE-SOURCE
<script type="text/javascript"
src="../../../app/javascript/client.js"></script>
@@ -55,8 +68,5 @@
<body class="yui3-skin-sam">
<!-- Example markup required by test suite -->
<div id="test-root"></div>
-
- <!-- The test output -->
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/bugs/javascript/tests/test_subscription.html'
--- lib/lp/bugs/javascript/tests/test_subscription.html 2011-07-06 01:25:31 +0000
+++ lib/lp/bugs/javascript/tests/test_subscription.html 2011-07-08 06:23:55 +0000
@@ -1,5 +1,6 @@
<html>
<head>
+<<<<<<< TREE
<title>Bug subscriptions: descriptions and unsubscribe actions</title>
<!-- YUI 3.0 Setup -->
@@ -13,6 +14,18 @@
href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet"
href="../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <title>Bug subscriptions: descriptions and unsubscribe actions</title>
+
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
+
+>>>>>>> MERGE-SOURCE
<script type="text/javascript"
src="../../../app/javascript/client.js"></script>
@@ -43,8 +56,5 @@
<body class="yui3-skin-sam">
<!-- Example markup required by test suite -->
<div id="test-root"></div>
-
- <!-- The test output -->
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/code/javascript/tests/test_branchdiff.html'
--- lib/lp/code/javascript/tests/test_branchdiff.html 2011-07-06 01:25:31 +0000
+++ lib/lp/code/javascript/tests/test_branchdiff.html 2011-07-08 06:23:55 +0000
@@ -4,9 +4,21 @@
<head>
<title>Test page for branch diff JavaScript unit tests</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
+
+>>>>>>> MERGE-SOURCE
<script type="text/javascript" src="../../../app/javascript/client.js"></script>
+<<<<<<< TREE
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
@@ -15,6 +27,10 @@
<script type="text/javascript"
src="../../../app/javascript/overlay/overlay.js"></script>
+=======
+ <script type="text/javascript"
+ src="../../../app/javascript/overlay/overlay.js"></script>
+>>>>>>> MERGE-SOURCE
<!-- The module under test -->
<script type="text/javascript" src="../branchmergeproposal.diff.js"></script>
=== modified file 'lib/lp/code/javascript/tests/test_productseries-setbranch.html'
--- lib/lp/code/javascript/tests/test_productseries-setbranch.html 2011-07-06 01:25:31 +0000
+++ lib/lp/code/javascript/tests/test_productseries-setbranch.html 2011-07-08 06:23:55 +0000
@@ -4,6 +4,7 @@
<head>
<title>stroppy trunk series : Series trunk : stroppy</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
@@ -11,6 +12,17 @@
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet" href="../../../../canonical/launchpad/javascript/test.css" />
<script type="text/javascript" src="../../../app/javascript/lp.js"></script>
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
+
+ <script type="text/javascript" src="../../../app/javascript/lp.js"></script>
+>>>>>>> MERGE-SOURCE
<!-- The module under test -->
<script type="text/javascript" src="../productseries-setbranch.js"></script>
=== modified file 'lib/lp/code/javascript/tests/test_productseries_setbranch.js'
--- lib/lp/code/javascript/tests/test_productseries_setbranch.js 2011-06-07 16:42:11 +0000
+++ lib/lp/code/javascript/tests/test_productseries_setbranch.js 2011-07-08 06:23:55 +0000
@@ -5,11 +5,9 @@
*
*/
-YUI({
- base: '../../../../canonical/launchpad/icing/yui/',
- filter: 'raw', combine: false, fetchCSS: false
- }).use('node-event-simulate', 'test', 'console', 'Event', 'CustomEvent',
- 'lp.code.productseries_setbranch', function(Y) {
+YUI().use('lp.testing.runner', 'node-event-simulate', 'test', 'console',
+ 'Event', 'CustomEvent',
+ 'lp.code.productseries_setbranch', function(Y) {
var module = Y.lp.code.productseries_setbranch;
var suite = new Y.Test.Suite("productseries_setbranch Tests");
@@ -229,19 +227,6 @@
}));
- // Lock, stock, and two smoking barrels.
- var handle_complete = function(data) {
- window.status = '::::' + JSON.stringify(data);
- };
- Y.Test.Runner.on('complete', handle_complete);
- Y.Test.Runner.add(suite);
-
- var console = new Y.Console({newestOnTop: false});
- console.render('#log');
-
- // Start the test runner on Y.after to ensure all setup has had a
- // chance to complete.
- Y.after('domready', function() {
- Y.Test.Runner.run();
- });
+ Y.lp.testing.Runner.run(suite);
+
});
=== modified file 'lib/lp/registry/javascript/tests/test_distroseries.html'
--- lib/lp/registry/javascript/tests/test_distroseries.html 2011-07-06 05:13:30 +0000
+++ lib/lp/registry/javascript/tests/test_distroseries.html 2011-07-08 06:23:55 +0000
@@ -3,6 +3,7 @@
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
+<<<<<<< TREE
<title>Launchpad DistroSeries</title>
<!-- YUI 3.0 Setup -->
<script type="text/javascript"
@@ -15,6 +16,18 @@
href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet"
href="../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <title>Launchpad DistroSeries</title>
+
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
+
+>>>>>>> MERGE-SOURCE
<!-- Required modules -->
<script type="text/javascript" src="../../../app/javascript/client.js"></script>
<script type="text/javascript" src="../../../app/javascript/activator/activator.js"></script>
@@ -30,6 +43,5 @@
<script type="text/javascript" src="test_distroseries.js"></script>
</head>
<body class="yui3-skin-sam">
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/registry/javascript/tests/test_distroseries.js'
--- lib/lp/registry/javascript/tests/test_distroseries.js 2011-06-27 17:04:27 +0000
+++ lib/lp/registry/javascript/tests/test_distroseries.js 2011-07-08 06:23:55 +0000
@@ -1,10 +1,7 @@
/* Copyright (c) 2011, Canonical Ltd. All rights reserved. */
-YUI({
- base: '../../../../canonical/launchpad/icing/yui/',
- filter: 'raw', combine: false, fetchCSS: false
- }).use(
- 'test', 'console', 'node-event-simulate',
+YUI().use(
+ 'lp.testing.runner', 'test', 'console', 'node-event-simulate',
'lp.registry.distroseries.initseries',
function(Y) {
@@ -1104,7 +1101,7 @@
this.wait(function() {
Assert.isFalse(
this.container.contains(this.form));
- }, 30);
+ }, 90);
},
testSubmit: function() {
@@ -1241,17 +1238,6 @@
suite.add(new Y.Test.Case(testDeriveDistroSeriesSetup));
- // Lock, stock, and two smoking barrels.
- var handle_complete = function(data) {
- window.status = '::::' + JSON.stringify(data);
- };
- Y.Test.Runner.on('complete', handle_complete);
- Y.Test.Runner.add(suite);
-
- var console = new Y.Console({newestOnTop: false});
- console.render('#log');
-
- Y.on('domready', function() {
- Y.Test.Runner.run();
- });
+ Y.lp.testing.Runner.run(suite);
+
});
=== modified file 'lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.html'
--- lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.html 2011-07-06 01:25:31 +0000
+++ lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.html 2011-07-08 06:23:55 +0000
@@ -3,18 +3,32 @@
<head>
<title>Launchpad distroseriesdifferences_details tests</title>
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
+
<!-- Required js modules -->
+<<<<<<< TREE
<script type="text/javascript" src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
+=======
+>>>>>>> MERGE-SOURCE
<script type="text/javascript" src="../../../app/javascript/client.js"></script>
<script type="text/javascript" src="../../../soyuz/javascript/base.js"></script>
<script type="text/javascript" src="../../../soyuz/javascript/lp_dynamic_dom_updater.js"></script>
+<<<<<<< TREE
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet" href="../../../../canonical/launchpad/javascript/test.css" />
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/style-3-0.css" />
+=======
+>>>>>>> MERGE-SOURCE
<!-- The module under test -->
<script type="text/javascript" src="../distroseriesdifferences_details.js"></script>
@@ -64,7 +78,5 @@
</td></tr></tbody>
</table>
</div>
-
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js'
--- lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js 2011-06-15 17:51:39 +0000
+++ lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js 2011-07-08 06:23:55 +0000
@@ -1,15 +1,10 @@
/* Copyright 2009 Canonical Ltd. This software is licensed under the
GNU Affero General Public License version 3 (see the file LICENSE). */
-YUI({
- base: '../../../../canonical/launchpad/icing/yui/',
- filter: 'raw',
- combine: false,
- fetchCSS: true
- }).use(
- 'test', 'console', 'node-event-simulate', 'event-simulate', "io-base",
+YUI().use(
+ 'lp.testing.runner', 'test', 'console', 'node-event-simulate',
'lp.soyuz.base', "lazr.anim", "lazr.effects",
- 'lp.soyuz.dynamic_dom_updater',
+ 'lp.soyuz.dynamic_dom_updater', 'event-simulate', "io-base",
'lp.registry.distroseriesdifferences_details', function(Y) {
var Assert = Y.Assert;
@@ -176,19 +171,7 @@
suite.add(new Y.Test.Case(testPackageDiffUpdate));
suite.add(new Y.Test.Case(testPackageDiffUpdateInteraction));
-// Lock, stock, and two smoking barrels.
-var handle_complete = function(data) {
- window.status = '::::' + JSON.stringify(data);
- };
-Y.Test.Runner.on('complete', handle_complete);
-Y.Test.Runner.add(suite);
-
-var console = new Y.Console({newestOnTop: false});
-console.render('#log');
-
-Y.on('domready', function() {
- Y.Test.Runner.run();
- });
+Y.lp.testing.Runner.run(suite);
});
=== modified file 'lib/lp/registry/javascript/tests/test_milestone_table.html'
--- lib/lp/registry/javascript/tests/test_milestone_table.html 2011-07-06 01:25:31 +0000
+++ lib/lp/registry/javascript/tests/test_milestone_table.html 2011-07-08 06:23:55 +0000
@@ -3,12 +3,25 @@
<head>
<title>Launchpad milestonetable</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet" href="../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
+
+ <script type="text/javascript"
+ src="../../../app/javascript/anim/anim.js"></script>
+>>>>>>> MERGE-SOURCE
<script type="text/javascript"
src="../../../app/javascript/anim/anim.js"></script>
@@ -33,6 +46,5 @@
</tr>
</tbody>
</table>
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/registry/javascript/tests/test_milestone_table.js'
--- lib/lp/registry/javascript/tests/test_milestone_table.js 2011-06-07 16:42:11 +0000
+++ lib/lp/registry/javascript/tests/test_milestone_table.js 2011-07-08 06:23:55 +0000
@@ -1,9 +1,7 @@
/* Copyright (c) 2009-2010, Canonical Ltd. All rights reserved. */
-YUI({
- base: '../../../../canonical/launchpad/icing/yui/',
- filter: 'raw', combine: false, fetchCSS: false
- }).use('test', 'console', 'lp.registry.milestonetable', function(Y) {
+YUI().use('lp.testing.runner', 'test', 'console',
+ 'lp.registry.milestonetable', function(Y) {
var milestonetable = Y.lp.registry.milestonetable;
var suite = new Y.Test.Suite("milestonetable Tests");
@@ -245,17 +243,6 @@
}
}));
- // Lock, stock, and two smoking barrels.
- var handle_complete = function(data) {
- window.status = '::::' + JSON.stringify(data);
- };
- Y.Test.Runner.on('complete', handle_complete);
- Y.Test.Runner.add(suite);
-
- var console = new Y.Console({newestOnTop: false});
- console.render('#log');
-
- Y.on('domready', function() {
- Y.Test.Runner.run();
- });
+ Y.lp.testing.Runner.run(suite);
+
});
=== modified file 'lib/lp/registry/javascript/tests/test_structural_subscription.html'
--- lib/lp/registry/javascript/tests/test_structural_subscription.html 2011-07-06 01:25:31 +0000
+++ lib/lp/registry/javascript/tests/test_structural_subscription.html 2011-07-08 06:23:55 +0000
@@ -3,12 +3,22 @@
<head>
<title>Structural Subscription Overlay</title>
+<<<<<<< TREE
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
<link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet" href="../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
+>>>>>>> MERGE-SOURCE
<!-- Dependency -->
<script type="text/javascript"
@@ -38,9 +48,6 @@
<!-- The test suite -->
<script type="text/javascript" src="test_structural_subscription.js"></script>
- <!-- Test layout -->
- <link rel="stylesheet"
- href="../../../../canonical/launchpad/javascript/test.css" />
<style type="text/css">
/* CSS classes specific to this test */
.unseen { display: none; }
@@ -48,6 +55,5 @@
</head>
<body class="yui3-skin-sam">
<div id="request-notifications"></div>
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/registry/javascript/tests/test_structural_subscription.js'
--- lib/lp/registry/javascript/tests/test_structural_subscription.js 2011-06-22 18:53:35 +0000
+++ lib/lp/registry/javascript/tests/test_structural_subscription.js 2011-07-08 06:23:55 +0000
@@ -1,12 +1,8 @@
/* Copyright (c) 2011, Canonical Ltd. All rights reserved. */
-YUI({
- base: '../../../../canonical/launchpad/icing/yui/',
- filter: 'raw',
- combine: false,
- fetchCSS: false
- }).use('test', 'console', 'node', 'node-event-simulate', 'lazr.effects',
- 'lp.client', 'lp.registry.structural_subscription', function(Y) {
+YUI().use('lp.testing.runner', 'test', 'console', 'node',
+ 'node-event-simulate', 'lazr.effects',
+ 'lp.client', 'lp.registry.structural_subscription', function(Y) {
var suite = new Y.Test.Suite("Structural subscription overlay tests");
@@ -1852,20 +1848,6 @@
}));
- // Lock, stock, and two smoking barrels.
- var handle_complete = function(data) {
- window.status = '::::' + JSON.stringify(data);
- };
- Y.Test.Runner.on('complete', handle_complete);
- Y.Test.Runner.add(suite);
-
- // The following two lines may be commented out for debugging but
- // must be restored before being checked in or the tests will fail
- // in the test runner.
- var console = new Y.Console({newestOnTop: false});
- console.render('#log');
-
- Y.on('domready', function() {
- Y.Test.Runner.run();
- });
+ Y.lp.testing.Runner.run(suite);
+
});
=== modified file 'lib/lp/registry/javascript/tests/timeline-iframe.html'
--- lib/lp/registry/javascript/tests/timeline-iframe.html 2011-06-07 20:39:41 +0000
+++ lib/lp/registry/javascript/tests/timeline-iframe.html 2011-07-08 06:23:55 +0000
@@ -3,12 +3,13 @@
<head>
<title>Launchpad TimelineGraph Widget</title>
- <!-- YUI 3.0 Setup -->
- <script type="text/javascript" src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
- <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
- <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
- <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
- <link rel="stylesheet" href="../../../../canonical/launchpad/javascript/test.css" />
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
<!-- The module under test -->
<script type="text/javascript" src="../timeline.js"></script>
@@ -19,6 +20,5 @@
<body class="yui3-skin-sam">
<div id="timeline_example">
</div>
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/soyuz/javascript/tests/test_archivesubscribers_index.html'
--- lib/lp/soyuz/javascript/tests/test_archivesubscribers_index.html 2010-11-04 20:05:41 +0000
+++ lib/lp/soyuz/javascript/tests/test_archivesubscribers_index.html 2011-07-08 06:23:55 +0000
@@ -3,12 +3,13 @@
<head>
<title>Launchpad ArchiveSubscriberIndex</title>
- <!-- YUI 3.0 Setup -->
- <script type="text/javascript" src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
- <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
- <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
- <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
- <link rel="stylesheet" href="../../../../canonical/launchpad/test.css" />
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
<!-- The module under test -->
<script type="text/javascript" src="../archivesubscribers_index.js"></script>
@@ -41,6 +42,5 @@
</tbody>
</table>
</div>
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/soyuz/javascript/tests/test_lp_dynamic_dom_updater.html'
--- lib/lp/soyuz/javascript/tests/test_lp_dynamic_dom_updater.html 2010-11-04 20:05:41 +0000
+++ lib/lp/soyuz/javascript/tests/test_lp_dynamic_dom_updater.html 2011-07-08 06:23:55 +0000
@@ -3,12 +3,13 @@
<head>
<title>Launchpad DynamicDomUpdater</title>
- <!-- YUI 3.0 Setup -->
- <script type="text/javascript" src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
- <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssreset/reset.css"/>
- <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssfonts/fonts.css"/>
- <link rel="stylesheet" href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
- <link rel="stylesheet" href="../../../../canonical/launchpad/javascript/test.css" />
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
<!-- The module under test -->
<script type="text/javascript" src="../lp_dynamic_dom_updater.js"></script>
@@ -19,6 +20,5 @@
<body class="yui3-skin-sam">
<div id="lp_dynamic_dom_updater_example">
</div>
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/translations/javascript/tests/test_sourcepackage_sharing_details.html'
--- lib/lp/translations/javascript/tests/test_sourcepackage_sharing_details.html 2011-07-06 01:25:31 +0000
+++ lib/lp/translations/javascript/tests/test_sourcepackage_sharing_details.html 2011-07-08 06:23:55 +0000
@@ -1,5 +1,6 @@
<html>
<head>
+<<<<<<< TREE
<title>Launchpad translationsharingconfig</title>
<!-- YUI 3.0 Setup -->
<script type="text/javascript" src="../../../../canonical/launchpad/icing/yui/yui/yui.js"></script>
@@ -11,6 +12,18 @@
href="../../../../canonical/launchpad/icing/yui/cssbase/base.css"/>
<link rel="stylesheet"
href="../../../../canonical/launchpad/javascript/test.css" />
+=======
+ <title>Launchpad translationsharingconfig</title>
+
+ <!-- YUI and test setup -->
+ <script type="text/javascript"
+ src="../../../../canonical/launchpad/icing/yui/yui/yui.js">
+ </script>
+ <link rel="stylesheet" href="../../../app/javascript/testing/test.css" />
+ <script type="text/javascript"
+ src="../../../app/javascript/testing/testrunner.js"></script>
+
+>>>>>>> MERGE-SOURCE
<script type="text/javascript" src="../../../app/javascript/client.js"></script>
<script type="text/javascript" src="../../../app/javascript/lp.js"></script>
@@ -73,7 +86,5 @@
id="upstream-sync-complete-spinner"/>
</div>
</div>
- <!-- The test output -->
- <div id="log"></div>
</body>
</html>
=== modified file 'lib/lp/translations/javascript/tests/test_sourcepackage_sharing_details.js'
--- lib/lp/translations/javascript/tests/test_sourcepackage_sharing_details.js 2011-06-08 03:17:53 +0000
+++ lib/lp/translations/javascript/tests/test_sourcepackage_sharing_details.js 2011-07-08 06:23:55 +0000
@@ -2,12 +2,9 @@
* GNU Affero General Public License version 3 (see the file LICENSE).
*/
-YUI({
- base: '../../../../canonical/launchpad/icing/yui/',
- filter: 'raw', combine: false,
- fetchCSS: false
- }).use('test', 'console', 'lp.translations.sourcepackage_sharing_details',
- function(Y) {
+YUI().use('lp.testing.runner', 'test', 'console',
+ 'lp.translations.sourcepackage_sharing_details', function(Y) {
+
var suite = new Y.Test.Suite("sourcepackage_sharing_details Tests");
var namespace = Y.lp.translations.sourcepackage_sharing_details;
var TranslationSharingConfig = namespace.TranslationSharingConfig;
@@ -343,17 +340,6 @@
}
}));
- // Lock, stock, and two smoking barrels.
- var handle_complete = function(data) {
- window.status = '::::' + JSON.stringify(data);
- };
- Y.Test.Runner.on('complete', handle_complete);
- Y.Test.Runner.add(suite);
-
- var console = new Y.Console({newestOnTop: false});
- console.render('#log');
-
- Y.on('domready', function() {
- Y.Test.Runner.run();
- });
+ Y.lp.testing.Runner.run(suite);
+
});
Follow ups