@@ -27,7 +27,7 @@ async function runTutorial() {
2727 await tutorial . closeQuickStart ( ) ;
2828
2929 // create New Plan
30- const studyData = await tutorial . startNewPlan ( ) ;
30+ const studyData = await tutorial . startClassicTIPlan ( ) ;
3131 studyId = studyData [ "data" ] [ "uuid" ] ;
3232
3333 // check the app mode steps
@@ -40,8 +40,8 @@ async function runTutorial() {
4040 const workbenchData = utils . extractWorkbenchData ( studyData [ "data" ] ) ;
4141 console . log ( workbenchData ) ;
4242 const esId = workbenchData [ "nodeIds" ] [ 0 ] ;
43- const tiId = workbenchData [ "nodeIds" ] [ 2 ] ;
44- const ppId = workbenchData [ "nodeIds" ] [ 3 ] ;
43+ const tiId = workbenchData [ "nodeIds" ] [ 1 ] ;
44+ const ppId = workbenchData [ "nodeIds" ] [ 2 ] ;
4545
4646 // wait for the three services, except the optimizer
4747 await tutorial . waitForServices (
@@ -71,17 +71,8 @@ async function runTutorial() {
7171 await tutorial . waitFor ( 5000 , "Finish Electrode Selector SetUp" ) ;
7272 await tutorial . takeScreenshot ( "electrodeSelector_after" ) ;
7373
74- // Run optimizer
74+ // ti-postpro
7575 await tutorial . waitAndClick ( "AppMode_NextBtn" ) ;
76- await tutorial . waitFor ( 5000 , "Running Optimizer" ) ;
77- await tutorial . takeScreenshot ( "optimizer_before" ) ;
78- // one permutation should take less than 180"
79- await tutorial . waitForStudyDone ( studyId , 480000 ) ;
80- await tutorial . takeScreenshot ( "optimizer_after" ) ;
81- await tutorial . waitAndClick ( "preparingInputsCloseBtn" ) ;
82- await tutorial . waitFor ( 2000 , "Optimizer Finished" ) ;
83-
84- // Load Post Pro Analysis
8576 await tutorial . takeScreenshot ( "postpro_start" ) ;
8677 // wait for iframe to be ready, it might take a while in Voila
8778 const postProIframe = await tutorial . waitForVoilaIframe ( tiId ) ;
@@ -90,15 +81,20 @@ async function runTutorial() {
9081
9182 await tutorial . waitFor ( 5000 , "Extra waiting to make sure, again, it renders" ) ;
9283
84+ // Click "Run optimization" button
85+ const buttonsRunOptimization = await utils . getButtonsWithText ( postProIframe , "Run Optimization" ) ;
86+ await buttonsRunOptimization [ 0 ] . click ( ) ;
87+ await tutorial . waitFor ( 20000 , "Run Optimization" ) ;
88+ await tutorial . takeScreenshot ( "postpro_run_optimization" ) ;
9389 // Click "Load Analysis" button
9490 const buttonsLoadAnalysis = await utils . getButtonsWithText ( postProIframe , "Load Analysis" ) ;
9591 await buttonsLoadAnalysis [ 0 ] . click ( ) ;
96- await tutorial . waitFor ( 10000 , "Loading anaylsis" ) ;
92+ await tutorial . waitFor ( 20000 , "Loading anaylsis" ) ;
9793 await tutorial . takeScreenshot ( "postpro_load_analysis" ) ;
9894 // Click on the first "Load" button
9995 const buttonsLoad = await utils . getButtonsWithText ( postProIframe , "Load" ) ;
10096 await buttonsLoad [ 1 ] . click ( ) ;
101- await tutorial . waitFor ( 30000 , "Loading Fields" ) ;
97+ await tutorial . waitFor ( 20000 , "Loading Fields" ) ;
10298 await tutorial . takeScreenshot ( "postpro_load_field" ) ;
10399 // Click on the "Add to Report" buttons
104100 const buttonsAddToReport = await utils . getButtonsWithText ( postProIframe , "Add to Report" ) ;
0 commit comments