File tree 3 files changed +22
-14
lines changed
3 files changed +22
-14
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ export default {
89
89
vscode . commands . executeCommand ( 'coderoad.run_test' )
90
90
} ,
91
91
testPass ( ) {
92
- vscode . window . showWarningMessage ( 'FAIL ')
92
+ vscode . window . showInformationMessage ( 'PASS ')
93
93
} ,
94
94
testFail ( ) {
95
95
vscode . window . showWarningMessage ( 'FAIL' )
@@ -148,4 +148,7 @@ export default {
148
148
return nextProgress
149
149
}
150
150
} ) ,
151
+ stepLoadNext ( ) {
152
+ console . log ( "LOAD NEXT STEP" )
153
+ }
151
154
}
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ export const machine = Machine<
50
50
ContinueTutorial : {
51
51
onEntry : [ 'tutorialContinue' ] ,
52
52
on : {
53
- TUTORIAL_START : '#tutorial-load-next'
53
+ TUTORIAL_START : '#tutorial-load-next-stage '
54
54
}
55
55
} ,
56
56
}
@@ -60,8 +60,8 @@ export const machine = Machine<
60
60
initial : 'Summary' ,
61
61
onEntry : [ 'tutorialSetup' ] ,
62
62
states : {
63
- LoadNext : {
64
- id : 'tutorial-load-next' ,
63
+ LoadNextStage : {
64
+ id : 'tutorial-load-next-stage ' ,
65
65
onEntry : [ 'tutorialLoadNext' ] ,
66
66
on : {
67
67
LOAD_NEXT : [
@@ -117,16 +117,14 @@ export const machine = Machine<
117
117
} ,
118
118
TestPass : {
119
119
onEntry : [ 'testPass' , 'stepComplete' ] ,
120
+ after : {
121
+ 0 : {
122
+ target : 'StepNext' ,
123
+ cond : 'hasNextStep' ,
124
+ }
125
+ } ,
120
126
on : {
121
- NEXT : [
122
- {
123
- target : 'StageNormal' ,
124
- cond : 'hasNextStep' ,
125
- } ,
126
- {
127
- target : 'StageComplete' ,
128
- } ,
129
- ] ,
127
+ NEXT : 'StageComplete' ,
130
128
} ,
131
129
} ,
132
130
TestFail : {
@@ -135,6 +133,12 @@ export const machine = Machine<
135
133
0 : 'StageNormal'
136
134
} ,
137
135
} ,
136
+ StepNext : {
137
+ onEntry : [ 'stepLoadNext' ] ,
138
+ after : {
139
+ 0 : 'StageNormal'
140
+ }
141
+ } ,
138
142
StageComplete : {
139
143
onEntry : 'stageComplete' ,
140
144
on : {
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ export interface MachineStateSchema {
146
146
}
147
147
Tutorial : {
148
148
states : {
149
- LoadNext : { }
149
+ LoadNextStage : { }
150
150
Summary : { }
151
151
Level : { }
152
152
Stage : {
@@ -155,6 +155,7 @@ export interface MachineStateSchema {
155
155
TestRunning : { }
156
156
TestPass : { }
157
157
TestFail : { }
158
+ StepNext : { }
158
159
StageComplete : { }
159
160
}
160
161
}
You can’t perform that action at this time.
0 commit comments