@@ -19,8 +19,8 @@ function checkTextNonText(browser, resultSelector) {
1919 if ( resultSelector && resultSelector . length > 0 ) {
2020 browser . waitForElementPresent ( resultSelector , 6000 * globalconfig . timeoutAmplificator ) ;
2121 }
22- browser . getJiixExports ( function ( res ) {
23- console . log ( 'export res: ' + JSON . stringify ( res . value ) ) ;
22+ browser . getJiixExports ( '#editor' , function ( res ) {
23+ // console.log('export res: ' + JSON.stringify(res.value));
2424 const parsedjiix = JSON . parse ( JSON . stringify ( res . value ) ) ;
2525
2626 browser . verify . equal ( parsedjiix . type , "Raw Content" ) ;
@@ -55,7 +55,7 @@ function getStrokesFromJIIX(jiix) {
5555function checkNbStrokes ( browser , config , resultSelector , property , nbStrokesExpected ) {
5656 const isWebSocketV4 = ( config . apiVersion === 'V4' && config . protocol !== 'REST' ) ;
5757 if ( isWebSocketV4 ) {
58- browser . getJiixExports ( function ( res ) {
58+ browser . getJiixExports ( '#editor' , function ( res ) {
5959 //console.log('export= ' + JSON.stringify(res.value));
6060 browser . verify . equal ( getStrokesFromJIIX ( res . value ) . length , String ( nbStrokesExpected ) ) ;
6161 } )
@@ -285,13 +285,13 @@ function checkDecoration(browser, config, inkName, strokes, labels, component =
285285
286286 browser . pause ( 1000 ) ;
287287
288- browser . getJiixExports ( function ( res ) {
289- console . log ( 'export= ' + JSON . stringify ( res . value ) ) ;
288+ browser . getJiixExports ( component , function ( res ) {
289+ // console.log('export= ' + JSON.stringify(res.value));
290290 var spansList = common . findValuesByKey ( res . value , 'spans' ) ;
291291 browser . verify . equal ( spansList . length , 2 ) ;
292- console . log ( "span0 string= " + JSON . stringify ( spansList [ 0 ] ) ) ;
292+ // console.log("span0 string= " + JSON.stringify(spansList[0]));
293293 var span0 = JSON . parse ( JSON . stringify ( spansList [ 0 ] ) ) ;
294- console . log ( "span0= " + JSON . stringify ( span0 ) ) ;
294+ // console.log("span0= "+ JSON.stringify(span0));
295295 browser . verify . equal ( span0 [ "first-char" ] , "0" ) ;
296296 browser . verify . equal ( span0 [ "last-char" ] , "4" ) ;
297297 browser . verify . equal ( span0 . class , "text" ) ;
@@ -477,7 +477,6 @@ function checkRecognitionAssetBuilder(browser, config, strokes, labels, componen
477477
478478function checkImport ( browser , config , strokes , labels , component = '#editor' , resultSelector = '#editorSupervisor' , emptyResultSelector = '#editorSupervisor' ) {
479479 console . log ( 'url ' + browser . launchUrl + config . componentPath ) ;
480- console . log ( 'nb strokes ' + strokes . length ) ;
481480 let jiixExport = '' ;
482481 browser
483482 . init ( browser . launchUrl + config . componentPath ) . maximizeWindow ( )
@@ -493,24 +492,15 @@ function checkImport(browser, config, strokes, labels, component = '#editor', re
493492
494493 checkLabel ( browser , labels , strokes . length - 1 , resultSelector , emptyResultSelector ) ;
495494
496- browser . getJiixExports ( function ( res ) {
495+ browser . getJiixExports ( component , function ( res ) {
497496 browser
498- . click ( '#clear' )
499- . waitForIdle ( '#editorSupervisor' , 3000 * globalconfig . timeoutAmplificator ) ;
500-
501- checkLabel ( browser , labels , - 1 , resultSelector , emptyResultSelector ) ;
502-
503- browser
504- . waitForElementPresent ( '#importContentField' , 1000 * globalconfig . timeoutAmplificator )
505- . waitForElementPresent ( '#importContent' , 1000 * globalconfig . timeoutAmplificator )
506- . setProperty ( '#importContentField' , 'value' , JSON . stringify ( res . value ) )
507- . click ( "#importContent" )
497+ . click ( '#import' )
508498 . waitForIdle ( '#editorSupervisor' , 3000 * globalconfig . timeoutAmplificator )
509- . waitUntilElementPropertyEqual ( '#editorSupervisor' , 'state' , 'EXPORTED' , 2000 * globalconfig . timeoutAmplificator ) ;
510-
511- checkLabel ( browser , labels , strokes . length - 1 , resultSelector , emptyResultSelector ) ;
499+ . getJiixExports ( '#editor2' , function ( res2 ) {
500+ jiixExport = JSON . parse ( res2 . value ) ;
501+ browser . verify . equal ( labels [ strokes . length - 1 ] , jiixExport [ "expressions" ] [ 0 ] [ "label" ] ) ;
502+ } ) ;
512503 } ) ;
513-
514504 browser . end ( ) ;
515505}
516506
0 commit comments