Permalink
Browse files

Adding proper YUITest test to the prep file so Selenium doesn't time …

…out running it
  • Loading branch information...
1 parent 6f26d09 commit 1b62ad21131d5e1c8121e71d876317cd8927a72e @davglass committed Mar 30, 2012
Showing with 26 additions and 7 deletions.
  1. +26 −7 src/common/tests/prep.html
View
33 src/common/tests/prep.html
@@ -4,14 +4,33 @@
<title>Test Prep</title>
</head>
<body>
+<script type="text/javascript" src="../../../build/yui/yui.js"></script>
<script>
-/*
-This hack is for Selenium to resize the window to a
-larger size and focus it. Then it will start executing tests.
-*/
-window.moveTo(10, 10);
-window.resizeTo(1000, 1000);
-window.focus();
+
+YUI({
+ filter: (window.location.search.match(/[?&]filter=([^&]+)/) || [])[1] || 'min'
+}).use('test', function(Y) {
+
+ var suite = new Y.Test.Suite('Test Prep Suite');
+
+ suite.add(new Y.Test.Case({
+ name: 'Test Prep',
+ 'test: prep': function() {
+ /*
+ This hack is for Selenium to resize the window to a
+ larger size and focus it. Then it will start executing tests.
+ */
+ window.moveTo(10, 10);
+ window.resizeTo(1000, 1000);
+ window.focus();
+ Y.Assert.isTrue(true, 'Test passed');
+ }
+ }));
+ Y.Test.Runner.add(suite);
+
+ Y.Test.Runner.setName('Test Prep Suite');
+ Y.Test.Runner.run();
+});
</script>
</body>
</html>

0 comments on commit 1b62ad2

Please sign in to comment.