@@ -107,6 +107,10 @@ Boilerplate.prototype.setup = function(testName, startingURL, outputCount){
107107    var  kernelStartTimeout  =  200000 ; 
108108    var  defaultTimeout  =  10000 ; 
109109    var  runAllCompletionTimeout  =  50000 ; 
110+     var  sleepBetweenCells  =  2000 ; 
111+     if  ( testName . indexOf ( "Scala" )  >  - 1 )  { 
112+         sleepBetweenCells  =  5000 ; 
113+     } 
110114
111115    function  clickTheElement ( element )  { 
112116        return  new  Promise ( function ( resolve )  { 
@@ -116,7 +120,7 @@ Boilerplate.prototype.setup = function(testName, startingURL, outputCount){
116120                      . waitForElementByLinkText ( "Run Cells" ,  wd . asserters . isDisplayed ,  10000 ) 
117121                      . elementByLinkText ( "Run Cells" ) 
118122                      . click ( ) 
119-                       . sleep ( 5000 ) ; 
123+                       . sleep ( sleepBetweenCells ) ; 
120124            resolve ( newElement ) ; 
121125        } ) ; 
122126    } 
@@ -135,21 +139,40 @@ Boilerplate.prototype.setup = function(testName, startingURL, outputCount){
135139
136140    this . browser . init ( desired ) 
137141        . get ( startingURL  ||  '/' ) 
138-         . waitForElementByCssSelector ( "#kernel_indicator_icon.kernel_idle_icon" ,  wd . asserters . isDisplayed ,  kernelStartTimeout ) 
142+         . waitForElementByCssSelector ( '#kernel_indicator_icon.kernel_idle_icon' ,  wd . asserters . isDisplayed ,  80000 ) 
143+         . waitForElementByLinkText ( 'Cell' ,  wd . asserters . isDisplayed ,  10000 ) 
139144        . safeExecute ( 'localStorage.clear()' ) 
140-         . waitForElementByCssSelector ( 'div.output_area' ,  wd . asserters . isDisplayed ,  defaultTimeout ) 
141-         . setAsyncScriptTimeout ( 15000 ) 
142-         . waitForConditionInBrowser ( 'window.Urth && Urth.kernel && Urth.kernel.is_connected()' ,  defaultTimeout ) 
143-         . waitForElementByCssSelector ( '#kernel_indicator_icon.kernel_idle_icon' ,  wd . asserters . isDisplayed ,  kernelStartTimeout ) 
144-         . waitForConditionInBrowser ( 'typeof Urth.whenReady === "function"' ,  kernelStartTimeout ) 
145-         . elementsByCssSelector ( 'div.input' ) . then ( function  ( elements )  { 
146-             runAllCells ( elements ,  0 ) ; 
147-         } ) 
148-         . waitFor ( outputAsserter ,  runAllCompletionTimeout * 5 ,  defaultTimeout ) 
149-         . eval ( "!!document.body.createShadowRoot" ,  function ( err ,  value )  { 
145+         . elementByLinkText ( 'Cell' ) 
146+         . click ( ) 
147+         . waitForElementByLinkText ( 'Run All' ,  wd . asserters . isDisplayed ,  10000 ) 
148+         . elementByLinkText ( 'Run All' ) 
149+         . click ( ) 
150+         . eval ( '!!document.body.createShadowRoot' ,  function ( err ,  value )  { 
150151            this . browserSupportsShadowDOM  =  value ; 
151152        } . bind ( this ) ) 
153+         . waitForElementByCssSelector ( 'div.output_area' ,  wd . asserters . isDisplayed ,  10000 ) 
154+         . setAsyncScriptTimeout ( 15000 ) 
155+         . waitForConditionInBrowser ( 'window.Urth && Urth.kernel && Urth.kernel.is_connected()' ,  10000 ) 
156+         . waitForElementByCssSelector ( '#kernel_indicator_icon.kernel_idle_icon' ,  wd . asserters . isDisplayed ,  20000 ) 
157+         . waitForConditionInBrowser ( 'typeof Urth.whenReady === "function"' ,  10000 ) 
158+         . waitFor ( outputAsserter ,  runAllCompletionTimeout * 5 ,  1000 ) 
152159        . nodeify ( done ) ; 
160+ 
161+ //    this.browser.init(desired) 
162+ //        .get(startingURL || '/') 
163+ //        .waitForElementByCssSelector("#kernel_indicator_icon.kernel_idle_icon", wd.asserters.isDisplayed, kernelStartTimeout) 
164+ //        .setAsyncScriptTimeout(15000) 
165+ //        .waitForConditionInBrowser('window.Urth && Urth.kernel && Urth.kernel.is_connected()', defaultTimeout) 
166+ //        .waitForElementByCssSelector('#kernel_indicator_icon.kernel_idle_icon', wd.asserters.isDisplayed, kernelStartTimeout) 
167+ //        .waitForConditionInBrowser('typeof Urth.whenReady === "function"', kernelStartTimeout) 
168+ //        .elementsByCssSelector('div.input').then(function (elements) { 
169+ //            runAllCells(elements, 0); 
170+ //        }) 
171+ //        .waitFor(outputAsserter, runAllCompletionTimeout*5, 1000) 
172+ //        .eval("!!document.body.createShadowRoot", function(err, value) { 
173+ //            this.browserSupportsShadowDOM = value; 
174+ //        }.bind(this)) 
175+ //        .nodeify(done); 
153176  } . bind ( this ) ) ; 
154177
155178  after ( function ( done ) { 
0 commit comments