This repository has been archived by the owner on Oct 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add flow loading api, flow batching element creation api, flow reset api
- Loading branch information
Showing
38 changed files
with
1,815 additions
and
1,494 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
npm-debug.log | ||
jsconfig.json | ||
node_modules/ | ||
coverage/ | ||
lib/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { | ||
FLOWDESIGNER_FLOW_ADD_ELEMENTS, | ||
FLOWDESIGNER_FLOW_RESET, | ||
FLOWDESIGNER_FLOW_LOAD, | ||
} from '../constants/flowdesigner.constants'; | ||
|
||
/** | ||
* Ask to sequentially add elements to the flow, each creation should be checked against store, | ||
* then applied via current reducers | ||
* | ||
* @params {array} listOfActionCreation | ||
*/ | ||
export const addFlowElements = listOfActionCreation => ({ | ||
type: FLOWDESIGNER_FLOW_ADD_ELEMENTS, | ||
listOfActionCreation, | ||
}); | ||
|
||
/** | ||
* ask for flow reset, emptying, nodes, links, ports collections | ||
*/ | ||
export const resetFlow = () => ({ | ||
type: FLOWDESIGNER_FLOW_RESET, | ||
}); | ||
|
||
/** | ||
* reset old flow, load elements for the new flow | ||
*/ | ||
export const loadFlow = listOfActionCreation => ({ | ||
type: FLOWDESIGNER_FLOW_LOAD, | ||
listOfActionCreation, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import * as flowActions from './flow.actions'; | ||
|
||
describe('Check that flowActions generate proper action objects', () => { | ||
it('addFlowElements generate proper action object', () => { | ||
expect(flowActions.addFlowElements([])).toEqual({ | ||
type: 'FLOWDESIGNER.FLOW_ADD_ELEMENTS', | ||
listOfActionCreation: [], | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.