File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -826,7 +826,6 @@ class OptFrontendWithTestcases extends OptFrontend {
826826 var frontendOptionsObj = this . getBaseFrontendOptionsObj ( ) ;
827827
828828 ( backendOptionsObj as any ) . run_test_case = true ; // just so we can see this in server logs
829- ( frontendOptionsObj as any ) . jumpToEnd = true ;
830829
831830 var runTestCaseCallback = ( dat ) => {
832831 var trace = dat . trace ;
@@ -885,7 +884,21 @@ class OptFrontendWithTestcases extends OptFrontend {
885884 runTestCaseCallback . bind ( this ) ) ;
886885 }
887886
888- // TODO: add vizTestCase
887+ vizTestCase ( id , codeToExec ) {
888+ // adapted from executeCode in opt-frontend.js
889+ var backendOptionsObj = this . getBaseBackendOptionsObj ( ) ;
890+ var frontendOptionsObj = this . getBaseFrontendOptionsObj ( ) ;
891+
892+ ( backendOptionsObj as any ) . viz_test_case = true ; // just so we can see this in server logs
893+ //activateSyntaxErrorSurvey = false; // NASTY global! disable this survey when running test cases since it gets confusing
894+ ( frontendOptionsObj as any ) . jumpToEnd = true ;
895+
896+ this . executeCodeAndCreateViz ( codeToExec ,
897+ $ ( '#pythonVersionSelector' ) . val ( ) ,
898+ backendOptionsObj , frontendOptionsObj ,
899+ 'pyOutputPane' ) ;
900+ this . optTests . doneRunningTest ( ) ; // this will run before the callback in executeCodeAndCreateViz, but oh wells
901+ }
889902
890903} // END Class OptFrontendWithTestcases
891904
You can’t perform that action at this time.
0 commit comments