@@ -26,7 +26,7 @@ export const createCommands = ({ extensionPath, workspaceState, workspaceRoot }:
26
26
return {
27
27
// initialize
28
28
[ COMMANDS . START ] : async ( ) => {
29
- // TODO: replace with a prompt to open a workspace
29
+ // TODO replace with a prompt to open a workspace
30
30
// await isEmptyWorkspace()
31
31
32
32
let webviewState : 'INITIALIZING' | 'RESTARTING'
@@ -58,6 +58,7 @@ export const createCommands = ({ extensionPath, workspaceState, workspaceRoot }:
58
58
// send test pass message back to client
59
59
vscode . window . showInformationMessage ( 'PASS' )
60
60
webview . send ( { type : 'TEST_PASS' , payload } )
61
+ // update local storage
61
62
} ,
62
63
onFail : ( payload : Payload , message : string ) => {
63
64
// send test fail message back to client
@@ -75,13 +76,12 @@ export const createCommands = ({ extensionPath, workspaceState, workspaceRoot }:
75
76
} )
76
77
} ,
77
78
[ COMMANDS . SET_CURRENT_STEP ] : ( { stepId } : Payload ) => {
78
- // NOTE: as async, may sometimes be inaccurate
79
79
// set from last setup stepAction
80
80
currentStepId = stepId
81
81
} ,
82
82
[ COMMANDS . RUN_TEST ] : ( current : Payload | undefined , onSuccess : ( ) => void ) => {
83
83
// 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 }
85
85
testRunner ( payload , onSuccess )
86
86
} ,
87
87
}
0 commit comments