11import * as CR from 'typings'
22import { assign , Machine , MachineOptions } from 'xstate'
3- import editorActions from './actions/editor'
4- import commandActions from './actions/command'
5- import contextActions from './actions/context'
3+ import createActions from './actions'
64import * as services from './services'
75
86const createOptions = ( { editorSend} :any ) :MachineOptions < CR . MachineContext , CR . MachineEvent > => ( {
97activities :{ } ,
10- actions :{
11- ...editorActions ( editorSend ) ,
12- ...contextActions ,
13- ...commandActions ,
14- } ,
8+ actions :createActions ( editorSend ) ,
159guards :{ } ,
1610services :{ } ,
1711delays :{ } ,
@@ -195,16 +189,16 @@ export const createMachine = (options: any) => {
195189on :{
196190TEST_PASS :{
197191target :'TestPass' ,
198- actions :[ 'updateStepProgress' ] ,
192+ actions :[ 'updateStepProgress' , 'testPass' ] ,
193+ } ,
194+ TEST_FAIL :{
195+ target :'TestFail' ,
196+ actions :[ 'testFail' ] ,
197+ } ,
198+ TEST_ERROR :{
199+ target :'TestFail' ,
200+ actions :[ 'testFail' ] ,
199201} ,
200- TEST_FAIL :'TestFail' ,
201- TEST_ERROR :'TestError' ,
202- } ,
203- } ,
204- TestError :{
205- onEntry :[ 'testFail' ] ,
206- after :{
207- 0 :'Normal' ,
208202} ,
209203} ,
210204TestPass :{
@@ -214,7 +208,6 @@ export const createMachine = (options: any) => {
214208} ,
215209} ,
216210TestFail :{
217- onEntry :[ 'testFail' ] ,
218211after :{
2192120 :'Normal' ,
220213} ,