Skip to content

Commit

Permalink
revert bad changes
Browse files Browse the repository at this point in the history
  • Loading branch information
csouchet committed Aug 28, 2023
1 parent 3b05790 commit c734481
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/component/parser/json/converter/ProcessConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,13 +365,9 @@ export default class ProcessConverter {

const buildMarkers = (bpmnElement: TActivity): ShapeBpmnMarkerKind[] => {
const markers: ShapeBpmnMarkerKind[] = [];
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- We know that the standardLoopCharacteristics field is not on all types, but it's already tested
// @ts-ignore
const standardLoopCharacteristics = bpmnElement.standardLoopCharacteristics;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- We know that the multiInstanceLoopCharacteristics field is not on all types, but it's already tested
// @ts-ignore
const multiInstanceLoopCharacteristics = ensureIsArray(bpmnElement.multiInstanceLoopCharacteristics, true)[0];
if (standardLoopCharacteristics ?? standardLoopCharacteristics === '') {
if (standardLoopCharacteristics !== undefined || standardLoopCharacteristics === '') {
markers.push(ShapeBpmnMarkerKind.LOOP);
} else if (multiInstanceLoopCharacteristics) {
markers.push(multiInstanceLoopCharacteristics.isSequential ? ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL : ShapeBpmnMarkerKind.MULTI_INSTANCE_PARALLEL);
Expand Down
4 changes: 2 additions & 2 deletions test/unit/helpers/bpmn-model-expect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export type ExpectedActivityShape = {

export type ExpectedCallActivityShape = {
bpmnElementGlobalTaskKind?: GlobalTaskKind;
bpmnElementCallActivityKind?: ShapeBpmnCallActivityKind;
bpmnElementCallActivityKind: ShapeBpmnCallActivityKind;
} & ExpectedActivityShape;

export type ExpectedEventShape = {
Expand Down Expand Up @@ -114,7 +114,7 @@ export const verifyShape = (
expect(bpmnElement.markers).toHaveLength(0);
}

if (('bpmnElementCallActivityKind' in expectedShape && expectedShape.bpmnElementCallActivityKind) ?? 'bpmnElementGlobalTaskKind' in expectedShape) {
if ('bpmnElementCallActivityKind' in expectedShape || 'bpmnElementGlobalTaskKind' in expectedShape) {
expect(bpmnElement instanceof ShapeBpmnCallActivity).toBeTruthy();
expect((bpmnElement as ShapeBpmnCallActivity).callActivityKind).toEqual(expectedShape.bpmnElementCallActivityKind);
expect((bpmnElement as ShapeBpmnCallActivity).globalTaskKind).toEqual(expectedShape.bpmnElementGlobalTaskKind);
Expand Down

0 comments on commit c734481

Please sign in to comment.