Skip to content

Commit f9a9d8f

Browse files
chore(refactor): use string type enum values
1 parent 92677ba commit f9a9d8f

3 files changed

Lines changed: 104 additions & 104 deletions

File tree

src/types/ModelElement.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
export const enum ElementType {
2-
StartNode = 1,
3-
StepNode,
4-
DivergingGatewayNode,
5-
ConvergingGatewayNode,
6-
DivergingGatewayBranch,
7-
ConvergingGatewayBranch,
8-
EndNode
2+
StartNode = "start",
3+
StepNode = "step",
4+
DivergingGatewayNode = "div-gw",
5+
ConvergingGatewayNode = "conv-gw",
6+
DivergingGatewayBranch = "div-branch",
7+
ConvergingGatewayBranch = "conv-branch",
8+
EndNode = "end"
99
}
1010

1111
interface BaseModelNode {

test/component/__snapshots__/FlowModeler.test.tsx.snap

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ exports[`renders correctly with all render props 1`] = `
4242
"rowCount": 3,
4343
"rowEndIndex": 4,
4444
"rowStartIndex": 1,
45-
"type": 2,
45+
"type": "step",
4646
}
4747
}
4848
>
@@ -72,7 +72,7 @@ exports[`renders correctly with all render props 1`] = `
7272
"rowCount": 3,
7373
"rowEndIndex": 4,
7474
"rowStartIndex": 1,
75-
"type": 3,
75+
"type": "div-gw",
7676
}
7777
}
7878
onSelect={[Function]}
@@ -104,7 +104,7 @@ exports[`renders correctly with all render props 1`] = `
104104
"rowCount": 1,
105105
"rowEndIndex": 2,
106106
"rowStartIndex": 1,
107-
"type": 5,
107+
"type": "div-branch",
108108
}
109109
}
110110
>
@@ -145,7 +145,7 @@ exports[`renders correctly with all render props 1`] = `
145145
"rowCount": 3,
146146
"rowEndIndex": 4,
147147
"rowStartIndex": 1,
148-
"type": 4,
148+
"type": "conv-gw",
149149
}
150150
}
151151
onSelect={[Function]}
@@ -166,7 +166,7 @@ exports[`renders correctly with all render props 1`] = `
166166
"rowCount": 3,
167167
"rowEndIndex": 4,
168168
"rowStartIndex": 1,
169-
"type": 7,
169+
"type": "end",
170170
}
171171
}
172172
/>
@@ -193,7 +193,7 @@ exports[`renders correctly with all render props 1`] = `
193193
"rowCount": 1,
194194
"rowEndIndex": 3,
195195
"rowStartIndex": 2,
196-
"type": 5,
196+
"type": "div-branch",
197197
}
198198
}
199199
>
@@ -222,7 +222,7 @@ exports[`renders correctly with all render props 1`] = `
222222
"rowCount": 1,
223223
"rowEndIndex": 3,
224224
"rowStartIndex": 2,
225-
"type": 2,
225+
"type": "step",
226226
}
227227
}
228228
>
@@ -264,7 +264,7 @@ exports[`renders correctly with all render props 1`] = `
264264
"rowCount": 1,
265265
"rowEndIndex": 4,
266266
"rowStartIndex": 3,
267-
"type": 5,
267+
"type": "div-branch",
268268
}
269269
}
270270
>
@@ -334,7 +334,7 @@ exports[`renders correctly with minimal/default props 1`] = `
334334
"rowCount": 3,
335335
"rowEndIndex": 4,
336336
"rowStartIndex": 1,
337-
"type": 2,
337+
"type": "step",
338338
}
339339
}
340340
>
@@ -365,7 +365,7 @@ exports[`renders correctly with minimal/default props 1`] = `
365365
"rowCount": 3,
366366
"rowEndIndex": 4,
367367
"rowStartIndex": 1,
368-
"type": 3,
368+
"type": "div-gw",
369369
}
370370
}
371371
onSelect={[Function]}
@@ -394,7 +394,7 @@ exports[`renders correctly with minimal/default props 1`] = `
394394
"rowCount": 1,
395395
"rowEndIndex": 2,
396396
"rowStartIndex": 1,
397-
"type": 5,
397+
"type": "div-branch",
398398
}
399399
}
400400
/>
@@ -433,7 +433,7 @@ exports[`renders correctly with minimal/default props 1`] = `
433433
"rowCount": 3,
434434
"rowEndIndex": 4,
435435
"rowStartIndex": 1,
436-
"type": 4,
436+
"type": "conv-gw",
437437
}
438438
}
439439
onSelect={[Function]}
@@ -455,7 +455,7 @@ exports[`renders correctly with minimal/default props 1`] = `
455455
"rowCount": 3,
456456
"rowEndIndex": 4,
457457
"rowStartIndex": 1,
458-
"type": 7,
458+
"type": "end",
459459
}
460460
}
461461
/>
@@ -483,7 +483,7 @@ exports[`renders correctly with minimal/default props 1`] = `
483483
"rowCount": 1,
484484
"rowEndIndex": 3,
485485
"rowStartIndex": 2,
486-
"type": 5,
486+
"type": "div-branch",
487487
}
488488
}
489489
/>
@@ -509,7 +509,7 @@ exports[`renders correctly with minimal/default props 1`] = `
509509
"rowCount": 1,
510510
"rowEndIndex": 3,
511511
"rowStartIndex": 2,
512-
"type": 2,
512+
"type": "step",
513513
}
514514
}
515515
>
@@ -553,7 +553,7 @@ exports[`renders correctly with minimal/default props 1`] = `
553553
"rowCount": 1,
554554
"rowEndIndex": 4,
555555
"rowStartIndex": 3,
556-
"type": 5,
556+
"type": "div-branch",
557557
}
558558
}
559559
/>

0 commit comments

Comments
 (0)