(context: T.MachineContext)
| 44 | }) |
| 45 | }, |
| 46 | loadStep(context: T.MachineContext): void { |
| 47 | const step: TT.Step | null = selectors.currentStep(context) |
| 48 | if (step && step.setup) { |
| 49 | // load step actions |
| 50 | editorSend({ |
| 51 | type: 'EDITOR_STEP_ENTER', |
| 52 | payload: { |
| 53 | // set position here |
| 54 | position: { |
| 55 | stepId: step.id, |
| 56 | levelId: context.position.levelId, |
| 57 | complete: false, |
| 58 | }, |
| 59 | actions: step.setup, |
| 60 | }, |
| 61 | }) |
| 62 | |
| 63 | if (step.subtasks) { |
| 64 | // load subtask summary by running tests and parsing result |
| 65 | editorSend({ |
| 66 | type: 'EDITOR_RUN_TEST', |
| 67 | payload: { |
| 68 | position: context.position, |
| 69 | }, |
| 70 | }) |
| 71 | } |
| 72 | } |
| 73 | }, |
| 74 | editorLoadSolution(context: T.MachineContext): void { |
| 75 | const step: TT.Step | null = selectors.currentStep(context) |
| 76 | // tell editor to load solution commit |
nothing calls this directly
no test coverage detected