@finos/legend-application-studio 27.1.3 → 27.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/editor/editor-group/FunctionEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/FunctionEditor.js +4 -1
- package/lib/components/editor/editor-group/FunctionEditor.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingExplorer.js +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingExplorer.js.map +1 -1
- package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.js +1 -1
- package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
- package/lib/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.js +9 -5
- package/lib/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.js.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/ClassEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/uml-editor/ClassEditor.js +2 -2
- package/lib/components/editor/editor-group/uml-editor/ClassEditor.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +4 -4
- package/lib/stores/editor/editor-state/element-editor-state/ClassState.d.ts +8 -2
- package/lib/stores/editor/editor-state/element-editor-state/ClassState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/ClassState.js +10 -6
- package/lib/stores/editor/editor-state/element-editor-state/ClassState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.d.ts +5 -1
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js +6 -4
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.d.ts +4 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.js +6 -4
- package/lib/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.d.ts +10 -3
- package/lib/stores/editor/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.js +7 -5
- package/lib/stores/editor/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts +3 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.js +3 -3
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.d.ts +8 -2
- package/lib/stores/editor/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.js +10 -6
- package/lib/stores/editor/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.d.ts +11 -3
- package/lib/stores/editor/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.js +6 -4
- package/lib/stores/editor/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts +3 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js +3 -3
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.d.ts +3 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.js +3 -3
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.d.ts +8 -2
- package/lib/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.js +12 -8
- package/lib/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.d.ts +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js +13 -8
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js.map +1 -1
- package/package.json +14 -14
- package/src/components/editor/editor-group/FunctionEditor.tsx +4 -2
- package/src/components/editor/editor-group/mapping-editor/MappingExplorer.tsx +1 -1
- package/src/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.tsx +3 -3
- package/src/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.tsx +53 -18
- package/src/components/editor/editor-group/uml-editor/ClassEditor.tsx +4 -2
- package/src/stores/editor/editor-state/element-editor-state/ClassState.ts +16 -6
- package/src/stores/editor/editor-state/element-editor-state/FunctionEditorState.ts +10 -7
- package/src/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.ts +9 -4
- package/src/stores/editor/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.ts +14 -5
- package/src/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.ts +5 -3
- package/src/stores/editor/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.ts +16 -6
- package/src/stores/editor/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.ts +14 -4
- package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.ts +5 -3
- package/src/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.ts +5 -3
- package/src/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.ts +22 -10
- package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.ts +21 -8
package/src/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.ts
CHANGED
@@ -100,9 +100,10 @@ export class PostValidationAssertionState extends LambdaEditorState {
|
|
100
100
|
}
|
101
101
|
}
|
102
102
|
|
103
|
-
override *convertLambdaObjectToGrammarString(
|
104
|
-
pretty
|
105
|
-
|
103
|
+
override *convertLambdaObjectToGrammarString(options?: {
|
104
|
+
pretty?: boolean | undefined;
|
105
|
+
preserveCompilationError?: boolean | undefined;
|
106
|
+
}): GeneratorFn<void> {
|
106
107
|
if (!isStubbed_RawLambda(this.assertion.assertion)) {
|
107
108
|
try {
|
108
109
|
const lambdas = new Map<string, RawLambda>();
|
@@ -110,11 +111,13 @@ export class PostValidationAssertionState extends LambdaEditorState {
|
|
110
111
|
const isolatedLambdas =
|
111
112
|
(yield this.editorStore.graphManagerState.graphManager.lambdasToPureCode(
|
112
113
|
lambdas,
|
113
|
-
pretty,
|
114
|
+
options?.pretty,
|
114
115
|
)) as Map<string, string>;
|
115
116
|
const grammarText = isolatedLambdas.get(this.lambdaId);
|
116
117
|
this.setLambdaString(grammarText ?? '');
|
117
|
-
this.clearErrors(
|
118
|
+
this.clearErrors({
|
119
|
+
preserveCompilationError: options?.preserveCompilationError,
|
120
|
+
});
|
118
121
|
} catch (error) {
|
119
122
|
assertErrorThrown(error);
|
120
123
|
this.editorStore.applicationStore.logService.error(
|
@@ -200,7 +203,10 @@ export class PostValidationParameterState extends LambdaEditorState {
|
|
200
203
|
}
|
201
204
|
}
|
202
205
|
|
203
|
-
*convertLambdaObjectToGrammarString(
|
206
|
+
*convertLambdaObjectToGrammarString(options?: {
|
207
|
+
pretty?: boolean | undefined;
|
208
|
+
preserveCompilationError?: boolean | undefined;
|
209
|
+
}): GeneratorFn<void> {
|
204
210
|
if (this.lambda.body) {
|
205
211
|
try {
|
206
212
|
const lambdas = new Map<string, RawLambda>();
|
@@ -211,11 +217,13 @@ export class PostValidationParameterState extends LambdaEditorState {
|
|
211
217
|
const isolatedLambdas =
|
212
218
|
(yield this.editorStore.graphManagerState.graphManager.lambdasToPureCode(
|
213
219
|
lambdas,
|
214
|
-
pretty,
|
220
|
+
options?.pretty,
|
215
221
|
)) as Map<string, string>;
|
216
222
|
const grammarText = isolatedLambdas.get(this.lambdaId);
|
217
223
|
this.setLambdaString(grammarText ?? '');
|
218
|
-
this.clearErrors(
|
224
|
+
this.clearErrors({
|
225
|
+
preserveCompilationError: options?.preserveCompilationError,
|
226
|
+
});
|
219
227
|
} catch (error) {
|
220
228
|
assertErrorThrown(error);
|
221
229
|
this.editorStore.applicationStore.logService.error(
|
@@ -372,7 +380,9 @@ export class PostValidationState {
|
|
372
380
|
this.servicePostValidationState.editorStore,
|
373
381
|
);
|
374
382
|
this.parametersState.push(_paramState);
|
375
|
-
yield flowResult(
|
383
|
+
yield flowResult(
|
384
|
+
_paramState.convertLambdaObjectToGrammarString({ pretty: false }),
|
385
|
+
);
|
376
386
|
}
|
377
387
|
|
378
388
|
deleteParam(paramState: PostValidationParameterState): void {
|
@@ -402,7 +412,9 @@ export class PostValidationState {
|
|
402
412
|
this.servicePostValidationState.editorStore,
|
403
413
|
);
|
404
414
|
this.assertionStates.push(aState);
|
405
|
-
yield flowResult(
|
415
|
+
yield flowResult(
|
416
|
+
aState.convertLambdaObjectToGrammarString({ pretty: false }),
|
417
|
+
);
|
406
418
|
}
|
407
419
|
|
408
420
|
deleteAssertion(assertion: PostValidationAssertion): void {
|
package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.ts
CHANGED
@@ -127,7 +127,7 @@ export class ServiceTestSuiteState {
|
|
127
127
|
selectedTestState: ServiceTestState | undefined;
|
128
128
|
testStates: ServiceTestState[] = [];
|
129
129
|
testToRename: ServiceTest | undefined;
|
130
|
-
|
130
|
+
runningTestState = ActionState.create();
|
131
131
|
|
132
132
|
constructor(suite: ServiceTestSuite, testableState: ServiceTestableState) {
|
133
133
|
makeObservable(this, {
|
@@ -188,7 +188,7 @@ export class ServiceTestSuiteState {
|
|
188
188
|
|
189
189
|
*runSuite(): GeneratorFn<void> {
|
190
190
|
try {
|
191
|
-
this.
|
191
|
+
this.runningTestState.inProgress();
|
192
192
|
this.testStates.forEach((t) => t.resetResult());
|
193
193
|
this.testStates.forEach((t) => t.runningTestAction.inProgress());
|
194
194
|
const service = this.testableState.serviceEditorState.service;
|
@@ -205,11 +205,11 @@ export class ServiceTestSuiteState {
|
|
205
205
|
const state = this.testStates.find((t) => t.test === result.atomicTest);
|
206
206
|
state?.handleTestResult(result);
|
207
207
|
});
|
208
|
-
this.
|
208
|
+
this.runningTestState.complete();
|
209
209
|
} catch (error) {
|
210
210
|
assertErrorThrown(error);
|
211
211
|
this.editorStore.applicationStore.notificationService.notifyError(error);
|
212
|
-
this.
|
212
|
+
this.runningTestState.fail();
|
213
213
|
} finally {
|
214
214
|
this.testStates.forEach((t) => t.runningTestAction.complete());
|
215
215
|
}
|
@@ -217,7 +217,7 @@ export class ServiceTestSuiteState {
|
|
217
217
|
|
218
218
|
*runFailingTests(): GeneratorFn<void> {
|
219
219
|
try {
|
220
|
-
this.
|
220
|
+
this.runningTestState.inProgress();
|
221
221
|
const service = this.testableState.serviceEditorState.service;
|
222
222
|
const input = new RunTestsTestableInput(service);
|
223
223
|
input.unitTestIds = this.testStates
|
@@ -243,11 +243,11 @@ export class ServiceTestSuiteState {
|
|
243
243
|
const state = this.testStates.find((t) => t.test === result.atomicTest);
|
244
244
|
state?.handleTestResult(result);
|
245
245
|
});
|
246
|
-
this.
|
246
|
+
this.runningTestState.complete();
|
247
247
|
} catch (error) {
|
248
248
|
assertErrorThrown(error);
|
249
249
|
this.editorStore.applicationStore.notificationService.notifyError(error);
|
250
|
-
this.
|
250
|
+
this.runningTestState.fail();
|
251
251
|
} finally {
|
252
252
|
this.testStates.forEach((t) => t.runningTestAction.complete());
|
253
253
|
}
|
@@ -275,7 +275,20 @@ export class ServiceTestSuiteState {
|
|
275
275
|
}
|
276
276
|
|
277
277
|
get testFailed(): number {
|
278
|
-
return this.
|
278
|
+
return this.testStates.filter(
|
279
|
+
(e) =>
|
280
|
+
(e.testResultState.result instanceof TestExecuted &&
|
281
|
+
e.testResultState.result.testExecutionStatus !==
|
282
|
+
TestExecutionStatus.PASS) ||
|
283
|
+
(e.testResultState.result instanceof MultiExecutionServiceTestResult &&
|
284
|
+
Array.from(
|
285
|
+
e.testResultState.result.keyIndexedTestResults.values(),
|
286
|
+
).every(
|
287
|
+
(kv) =>
|
288
|
+
kv instanceof TestExecuted &&
|
289
|
+
kv.testExecutionStatus !== TestExecutionStatus.PASS,
|
290
|
+
)),
|
291
|
+
).length;
|
279
292
|
}
|
280
293
|
}
|
281
294
|
|