@@ -26,7 +26,7 @@ export const createCommands = ({ extensionPath, workspaceState, workspaceRoot }:
2626 return {
2727 // initialize
2828 [ COMMANDS . START ] : async ( ) => {
29- // TODO: replace with a prompt to open a workspace
29+ // TODO replace with a prompt to open a workspace
3030 // await isEmptyWorkspace()
3131
3232 let webviewState : 'INITIALIZING' | 'RESTARTING'
@@ -58,6 +58,7 @@ export const createCommands = ({ extensionPath, workspaceState, workspaceRoot }:
5858 // send test pass message back to client
5959 vscode . window . showInformationMessage ( 'PASS' )
6060 webview . send ( { type : 'TEST_PASS' , payload } )
61+ // update local storage
6162 } ,
6263 onFail : ( payload : Payload , message : string ) => {
6364 // send test fail message back to client
@@ -75,13 +76,12 @@ export const createCommands = ({ extensionPath, workspaceState, workspaceRoot }:
7576 } )
7677 } ,
7778 [ COMMANDS . SET_CURRENT_STEP ] : ( { stepId } : Payload ) => {
78- // NOTE: as async, may sometimes be inaccurate
7979 // set from last setup stepAction
8080 currentStepId = stepId
8181 } ,
8282 [ COMMANDS . RUN_TEST ] : ( current : Payload | undefined , onSuccess : ( ) => void ) => {
8383 // use stepId from client, or last set stepId
84- const payload : Payload = { stepId : current ? current . stepId : currentStepId }
84+ const payload : Payload = { stepId : current && current . stepId . length ? current . stepId : currentStepId }
8585 testRunner ( payload , onSuccess )
8686 } ,
8787 }
0 commit comments