@@ -154,6 +154,7 @@ function checkSmartGuide(browser, config, strokes, labels, component = '#editor'
154154 } )
155155 . click ( '#ellipsis' )
156156 . click ( '#convert' )
157+ . pause ( 1000 * globalconfig . timeoutAmplificator )
157158 . waitUntilElementPropertyEqual ( '#editorSupervisor' , 'state' , 'EXPORTED' , 3000 * globalconfig . timeoutAmplificator )
158159 . getProperty ( '#prompter-text' , 'textContent' , ( res ) => {
159160 console . log ( 'res.value= ' + res . value . toString ( ) ) ;
@@ -171,12 +172,12 @@ function checkSmartGuide(browser, config, strokes, labels, component = '#editor'
171172 . getNumberOfSpans ( '#candidates' , ( nbCand ) => {
172173 console . log ( 'number of candidates= ' + nbCand . value ) ;
173174 // a random candidate in the smartGuide
174- const candIdx = Math . floor ( Math . random ( ) * nbCand . value ) ;
175+ const candIdx = Math . floor ( 1 + ( Math . random ( ) * ( nbCand . value - 1 ) ) ) ;
175176 browser . getProperty ( '#cdt-' + candIdx , 'textContent' , ( cand ) => {
176177 console . log ( candIdx + 'th candidate selected: ' + cand . value . toString ( ) ) ;
177178 browser
178179 . click ( '#cdt-' + candIdx )
179- . pause ( 1000 )
180+ . pause ( 1000 * globalconfig . timeoutAmplificator )
180181 . getProperty ( '#prompter-text' , 'textContent' , ( textModified ) => {
181182 console . log ( 'textModified= ' + textModified . value . toString ( ) ) ;
182183 browser . verify . equal ( textModified . value . indexOf ( cand . value . toString ( ) ) !== - 1 , true ) ;
0 commit comments