cleaned up some frontend code and put back logic for script unit tests w/ burnettk danfunk
This commit is contained in:
parent
6bfaf9c5c2
commit
0f683ed24a
|
@ -185,8 +185,8 @@ export default function ReactDiagramEditor({
|
||||||
) {
|
) {
|
||||||
if (onLaunchScriptEditor) {
|
if (onLaunchScriptEditor) {
|
||||||
setPerformingXmlUpdates(true);
|
setPerformingXmlUpdates(true);
|
||||||
// const modeling = diagramModeler.get('modeling');
|
const modeling = diagramModeler.get('modeling');
|
||||||
onLaunchScriptEditor(element, script, scriptType, eventBus);
|
onLaunchScriptEditor(element, script, scriptType, eventBus, modeling);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -280,15 +280,20 @@ export default function ProcessModelEditDiagram() {
|
||||||
const onLaunchScriptEditor = (
|
const onLaunchScriptEditor = (
|
||||||
element: any,
|
element: any,
|
||||||
script: string,
|
script: string,
|
||||||
scriptType: string,
|
scriptTypeString: string,
|
||||||
eventBus: any
|
eventBus: any,
|
||||||
|
modeling: any
|
||||||
) => {
|
) => {
|
||||||
|
// TODO: modeling is only needed for script unit tests.
|
||||||
|
// we should update this to act like updating scripts
|
||||||
|
// where we pass an event to bpmn-js
|
||||||
|
setScriptModeling(modeling);
|
||||||
|
|
||||||
setScriptText(script || '');
|
setScriptText(script || '');
|
||||||
setScriptType(scriptType);
|
setScriptType(scriptTypeString);
|
||||||
setScriptEventBus(eventBus);
|
setScriptEventBus(eventBus);
|
||||||
// setScriptModeling(modeling);
|
|
||||||
setScriptElement(element);
|
setScriptElement(element);
|
||||||
// setScriptUnitTestElementWithIndex(0, element);
|
setScriptUnitTestElementWithIndex(0, element);
|
||||||
handleShowScriptEditor();
|
handleShowScriptEditor();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -305,10 +310,6 @@ export default function ProcessModelEditDiagram() {
|
||||||
|
|
||||||
const handleEditorScriptChange = (value: any) => {
|
const handleEditorScriptChange = (value: any) => {
|
||||||
setScriptText(value);
|
setScriptText(value);
|
||||||
// (scriptModeling as any).updateProperties(scriptElement, {
|
|
||||||
// scriptFormat: 'python',
|
|
||||||
// script: value,
|
|
||||||
// });
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleEditorScriptTestUnitInputChange = (value: any) => {
|
const handleEditorScriptTestUnitInputChange = (value: any) => {
|
||||||
|
|
Loading…
Reference in New Issue