From 7a4697b7fbef9bc208425f9ef028d40e51e4654d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Thu, 28 Sep 2023 11:31:39 +0200 Subject: [PATCH] fix renaming --- .../json/BpmnJsonParser.callActivity.test.ts | 4 ++-- .../parser/json/BpmnJsonParser.event-utils.ts | 8 ++++---- .../parser/json/BpmnJsonParser.event.none.test.ts | 14 +++++++------- ...nJsonParser.event.with.event.definition.test.ts | 6 +++--- .../parser/json/BpmnJsonParser.messageFlow.test.ts | 6 +++--- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/test/unit/component/parser/json/BpmnJsonParser.callActivity.test.ts b/test/unit/component/parser/json/BpmnJsonParser.callActivity.test.ts index 8a31b1b00f..13bcb3c84d 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.callActivity.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.callActivity.test.ts @@ -15,7 +15,7 @@ limitations under the License. */ import type { ExpectedShape } from '../../../helpers/bpmn-model-expect'; -import type { BuildCallActivityParameter, BuildGatewayKind, BuildTaskKind, OtherBuildEventKind, BpmnGlobalTaskKind } from '../../../helpers/JsonBuilder'; +import type { BuildCallActivityParameter, BuildGatewayKind, BuildTaskKind, BuildNotBoundaryEventKind, BpmnGlobalTaskKind } from '../../../helpers/JsonBuilder'; import type { GlobalTaskKind } from '@lib/model/bpmn/internal'; import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; @@ -215,7 +215,7 @@ describe('parse bpmn as json for callActivity', () => { id: 'process_1', event: { id: `${expectedBpmnElementKind}_id`, - bpmnKind: expectedBpmnElementKind as OtherBuildEventKind | 'startEvent', + bpmnKind: expectedBpmnElementKind as BuildNotBoundaryEventKind, eventDefinitionParameter: { eventDefinitionKind: 'message', eventDefinitionOn: EventDefinitionOn.EVENT }, }, }, diff --git a/test/unit/component/parser/json/BpmnJsonParser.event-utils.ts b/test/unit/component/parser/json/BpmnJsonParser.event-utils.ts index 8a32f546c0..607cf8aa5c 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.event-utils.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.event-utils.ts @@ -15,7 +15,7 @@ limitations under the License. */ import type { ExpectedBoundaryEventShape, ExpectedEventShape, ExpectedShape } from '../../../helpers/bpmn-model-expect'; -import type { BuildEventDefinition, BuildEventsParameter } from '../../../helpers/JsonBuilder'; +import type { BuildEventDefinition, BuildEventParameter } from '../../../helpers/JsonBuilder'; import { verifyShape } from '../../../helpers/bpmn-model-expect'; import { buildDefinitions, EventDefinitionOn } from '../../../helpers/JsonBuilder'; @@ -39,7 +39,7 @@ export type OmitExpectedEventShape = Omit { executeEventCommonTests( { - bpmnKind: expectedShapeBpmnElementKind as OtherBuildEventKind | 'startEvent', + bpmnKind: expectedShapeBpmnElementKind as BuildNotBoundaryEventKind, eventDefinitionParameter: { eventDefinitionOn: EventDefinitionOn.NONE }, }, { @@ -50,11 +50,11 @@ describe.each([ { id: `none_${expectedShapeBpmnElementKind}_id`, name: `none ${expectedShapeBpmnElementKind}`, - bpmnKind: expectedShapeBpmnElementKind as OtherBuildEventKind | 'startEvent', + bpmnKind: expectedShapeBpmnElementKind as BuildNotBoundaryEventKind, eventDefinitionParameter: { eventDefinitionOn: EventDefinitionOn.NONE }, }, { - bpmnKind: expectedShapeBpmnElementKind as OtherBuildEventKind | 'startEvent', + bpmnKind: expectedShapeBpmnElementKind as BuildNotBoundaryEventKind, eventDefinitionParameter: { eventDefinitionKind: 'message', eventDefinitionOn: EventDefinitionOn.EVENT, @@ -62,7 +62,7 @@ describe.each([ }, }, { - bpmnKind: expectedShapeBpmnElementKind as OtherBuildEventKind | 'startEvent', + bpmnKind: expectedShapeBpmnElementKind as BuildNotBoundaryEventKind, eventDefinitionParameter: { eventDefinitionKind: 'message', eventDefinitionOn: EventDefinitionOn.DEFINITIONS, @@ -70,7 +70,7 @@ describe.each([ }, }, { - bpmnKind: expectedShapeBpmnElementKind as OtherBuildEventKind | 'startEvent', + bpmnKind: expectedShapeBpmnElementKind as BuildNotBoundaryEventKind, eventDefinitionParameter: { eventDefinitionKind: 'message', eventDefinitionOn: EventDefinitionOn.BOTH, @@ -80,7 +80,7 @@ describe.each([ ...allDefinitionKinds.map((definitionKind, index) => ({ id: `${definitionKind}_${expectedShapeBpmnElementKind}_id_${index}`, - bpmnKind: expectedShapeBpmnElementKind as OtherBuildEventKind | 'startEvent', + bpmnKind: expectedShapeBpmnElementKind as BuildNotBoundaryEventKind, eventDefinitionParameter: { eventDefinitionKind: definitionKind, eventDefinitionOn: EventDefinitionOn.EVENT, diff --git a/test/unit/component/parser/json/BpmnJsonParser.event.with.event.definition.test.ts b/test/unit/component/parser/json/BpmnJsonParser.event.with.event.definition.test.ts index fa3c948db0..38cb0e0c75 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.event.with.event.definition.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.event.with.event.definition.test.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { BuildEventDefinition, OtherBuildEventKind } from '../../../helpers/JsonBuilder'; +import type { BuildEventDefinition, BuildNotBoundaryEventKind } from '../../../helpers/JsonBuilder'; import type { TEventDefinition } from '@lib/model/bpmn/json/baseElement/rootElement/eventDefinition'; import { EventDefinitionOn } from '../../../helpers/JsonBuilder'; @@ -68,7 +68,7 @@ describe.each([ShapeBpmnElementKind.EVENT_START, ShapeBpmnElementKind.EVENT_END, ]; describe.each(titlesForEventDefinitionIsAttributeOf)(`when %s`, (titleForEventDefinitionIsAttributeOf: string, eventDefinitionOn: EventDefinitionOn) => { executeEventCommonTests( - { bpmnKind: expectedShapeBpmnElementKind as OtherBuildEventKind | 'startEvent', eventDefinitionParameter: { eventDefinitionKind, eventDefinitionOn } }, + { bpmnKind: expectedShapeBpmnElementKind as BuildNotBoundaryEventKind, eventDefinitionParameter: { eventDefinitionKind, eventDefinitionOn } }, { bpmnElementKind: expectedShapeBpmnElementKind, bpmnElementName: undefined, @@ -85,7 +85,7 @@ describe.each([ShapeBpmnElementKind.EVENT_START, ShapeBpmnElementKind.EVENT_END, (title: string, eventDefinition: string | TEventDefinition) => { testMustConvertShapes( { - bpmnKind: expectedShapeBpmnElementKind as OtherBuildEventKind | 'startEvent', + bpmnKind: expectedShapeBpmnElementKind as BuildNotBoundaryEventKind, eventDefinitionParameter: { eventDefinitionKind, eventDefinitionOn, eventDefinition }, }, { diff --git a/test/unit/component/parser/json/BpmnJsonParser.messageFlow.test.ts b/test/unit/component/parser/json/BpmnJsonParser.messageFlow.test.ts index 68c63f8474..e0b8791cbb 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.messageFlow.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.messageFlow.test.ts @@ -15,7 +15,7 @@ limitations under the License. */ /** Internal model */ -import type { BuildProcessParameter, BuildEventsParameter, OtherBuildEventKind } from '../../../helpers/JsonBuilder'; +import type { BuildProcessParameter, BuildEventParameter, BuildNotBoundaryEventKind } from '../../../helpers/JsonBuilder'; import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; import { verifyEdge } from '../../../helpers/bpmn-model-expect'; @@ -35,7 +35,7 @@ function buildProcessParameter(kind: ShapeBpmnElementKind, id: string): BuildPro return { id, withParticipant: true }; } else if (ShapeUtil.isEvent(kind)) { const isBoundaryEvent = kind === ShapeBpmnElementKind.EVENT_BOUNDARY; - const eventParameter: BuildEventsParameter = isBoundaryEvent + const eventParameter: BuildEventParameter = isBoundaryEvent ? { id, bpmnKind: kind as 'boundaryEvent', @@ -45,7 +45,7 @@ function buildProcessParameter(kind: ShapeBpmnElementKind, id: string): BuildPro } : { id, - bpmnKind: kind as OtherBuildEventKind | 'startEvent', + bpmnKind: kind as BuildNotBoundaryEventKind, eventDefinitionParameter: { eventDefinitionKind: 'message', eventDefinitionOn: EventDefinitionOn.EVENT }, };