### Eclipse Workspace Patch 1.0
#P fluid-engage-core
Index: tests/component-tests/codeEntry/js/CodeEntryTests.js
===================================================================
--- tests/component-tests/codeEntry/js/CodeEntryTests.js	(revision 9568)
+++ tests/component-tests/codeEntry/js/CodeEntryTests.js	(working copy)
@@ -9,16 +9,13 @@
 https://source.fluidproject.org/svn/LICENSE.txt
 */
 
-/*global jQuery*/
-/*global fluid*/
-/*global jqUnit*/
-/*global expect*/
+/*global jQuery, fluid, jqUnit, expect, start, stop*/
+
 
 (function ($) {
     var tests = {};
     var component;
 
-
     /**
      * For test purposes - only even numbers are valid codes.
      */
@@ -34,7 +31,10 @@
                 ".flc-codeEntry");
         
         component = fluid.engage.codeEntry(".flc-codeEntry",
-            {getArtifactUrlFn: simulateCheck});
+            {
+                getArtifactUrlFn: simulateCheck,
+                redirectDelay: 0
+            });
     };
     
     tests = jqUnit.testCase("Code Entry Tests", setup);
@@ -94,25 +94,32 @@
             // be blanked and an error message shown
             component.enterDigit(3);
             component.enterDigit(7);
-            jqUnit.assertEquals("First digit blank.", "", firstDigitField.text());
-            jqUnit.assertEquals("Second digit blank.", "", secondDigitField.text());
-            jqUnit.assertEquals("Invalid code message shown.",
-                    component.options.strings.invalidCode, headBlock.text());
-            
 
-            // Enter one digit - the error message persists
-            component.enterDigit(2);
-            jqUnit.assertEquals("First digit is 2.", "2", firstDigitField.text());
-            jqUnit.assertEquals("Second digit blank.", "", secondDigitField.text());
             jqUnit.assertEquals("Invalid code message shown.",
                     component.options.strings.invalidCode, headBlock.text());
             
-            // Enter second digit - the code fields are shown until redirection
-            // happens
-            component.enterDigit(0);
-            jqUnit.assertEquals("First digit is 2.", "2", firstDigitField.text());
-            jqUnit.assertEquals("Second digit is 0.", "0", secondDigitField.text());            
-            jqUnit.assertEquals("Redirecting message shown.", component.options.strings.redirecting, headBlock.text());
+            stop();
+            
+            setTimeout(function () {
+                jqUnit.assertEquals("First digit blank.", "", firstDigitField.text());
+                jqUnit.assertEquals("Second digit blank.", "", secondDigitField.text());
+
+                // Enter one digit - the error message persists
+                component.enterDigit(2);
+                jqUnit.assertEquals("First digit is 2.", "2", firstDigitField.text());
+                jqUnit.assertEquals("Second digit blank.", "", secondDigitField.text());
+                jqUnit.assertEquals("Invalid code message shown.",
+                        component.options.strings.invalidCode, headBlock.text());
+                
+                // Enter second digit - the code fields are shown until redirection
+                // happens
+                component.enterDigit(0);
+                jqUnit.assertEquals("First digit is 2.", "2", firstDigitField.text());
+                jqUnit.assertEquals("Second digit is 0.", "0", secondDigitField.text());            
+                jqUnit.assertEquals("Redirecting message shown.", component.options.strings.redirecting, headBlock.text());
+                
+                start();
+            }, component.options.redirectDelay);
         });
     };
     
Index: tests/component-tests/codeEntry/html/CodeEntryView-test.html
===================================================================
--- tests/component-tests/codeEntry/html/CodeEntryView-test.html	(revision 9568)
+++ tests/component-tests/codeEntry/html/CodeEntryView-test.html	(working copy)
@@ -14,6 +14,8 @@
         <script type="text/javascript" src="../../../../../fluid-infusion/src/webapp/tests/lib/qunit/js/testrunner.js"></script>
         <script type="text/javascript" src="../../../../../fluid-infusion/src/webapp/tests/test-core/jqUnit/js/jqUnit.js"></script>
 
+        <script type="text/javascript" src="../../../../../fluid-engage-core/framework/js/URLUtilities.js"></script>
+
         <script type="text/javascript" src="../../../../../fluid-engage-core/components/navigationBar/js/NavigationBar.js"></script>
 		<script type="text/javascript" src="../../../../../fluid-engage-core/components/codeEntry/js/CodeEntryView.js"></script>
 
