@finos/legend-application-studio 27.1.3 → 27.1.5
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/components/editor/panel-group/SQLPlaygroundPanel.js.map +1 -1
- package/lib/components/extensions/Core_LegendStudioApplicationPlugin.js +1 -1
- package/lib/components/extensions/Core_LegendStudioApplicationPlugin.js.map +1 -1
- package/lib/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.js +1 -1
- package/lib/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +6 -6
- package/lib/stores/editor/EditorStore.js +2 -2
- 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 +16 -16
- 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/components/editor/panel-group/SQLPlaygroundPanel.tsx +2 -2
- package/src/components/extensions/Core_LegendStudioApplicationPlugin.tsx +1 -1
- package/src/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.tsx +1 -1
- package/src/stores/editor/EditorStore.ts +2 -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
@@ -109,7 +109,10 @@ export class FlatDataPropertyMappingState extends PropertyMappingState {
|
|
109
109
|
}
|
110
110
|
}
|
111
111
|
|
112
|
-
*convertLambdaObjectToGrammarString(
|
112
|
+
*convertLambdaObjectToGrammarString(options?: {
|
113
|
+
pretty?: boolean | undefined;
|
114
|
+
preserveCompilationError?: boolean | undefined;
|
115
|
+
}): GeneratorFn<void> {
|
113
116
|
if (this.propertyMapping instanceof FlatDataPropertyMapping) {
|
114
117
|
if (!isStubbed_RawLambda(this.propertyMapping.transform)) {
|
115
118
|
try {
|
@@ -118,7 +121,7 @@ export class FlatDataPropertyMappingState extends PropertyMappingState {
|
|
118
121
|
const isolatedLambdas =
|
119
122
|
(yield this.editorStore.graphManagerState.graphManager.lambdasToPureCode(
|
120
123
|
lambdas,
|
121
|
-
pretty,
|
124
|
+
options?.pretty,
|
122
125
|
)) as Map<string, string>;
|
123
126
|
const grammarText = isolatedLambdas.get(this.lambdaId);
|
124
127
|
this.setLambdaString(
|
@@ -126,7 +129,9 @@ export class FlatDataPropertyMappingState extends PropertyMappingState {
|
|
126
129
|
? this.extractLambdaString(grammarText)
|
127
130
|
: '',
|
128
131
|
);
|
129
|
-
this.clearErrors(
|
132
|
+
this.clearErrors({
|
133
|
+
preserveCompilationError: options?.preserveCompilationError,
|
134
|
+
});
|
130
135
|
} catch (error) {
|
131
136
|
assertErrorThrown(error);
|
132
137
|
this.editorStore.applicationStore.logService.error(
|
@@ -347,14 +352,18 @@ export class EmbeddedFlatDataInstanceSetImplementationState
|
|
347
352
|
extractLambdaString(fullLambdaString: string): string {
|
348
353
|
throw new UnsupportedOperationError();
|
349
354
|
}
|
350
|
-
clearErrors(
|
355
|
+
clearErrors(options?: {
|
356
|
+
preserveCompilationError?: boolean | undefined;
|
357
|
+
}): void {
|
351
358
|
// TODO
|
352
359
|
return;
|
353
360
|
}
|
354
361
|
*convertLambdaGrammarStringToObject(): GeneratorFn<void> {
|
355
362
|
throw new UnsupportedOperationError();
|
356
363
|
}
|
357
|
-
*convertLambdaObjectToGrammarString(
|
364
|
+
*convertLambdaObjectToGrammarString(options?: {
|
365
|
+
pretty?: boolean | undefined;
|
366
|
+
}): GeneratorFn<void> {
|
358
367
|
throw new UnsupportedOperationError();
|
359
368
|
}
|
360
369
|
}
|
package/src/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.ts
CHANGED
@@ -164,10 +164,12 @@ export class MappingExecutionQueryState extends LambdaEditorState {
|
|
164
164
|
|
165
165
|
*updateLamba(val: RawLambda): GeneratorFn<void> {
|
166
166
|
this.query = val;
|
167
|
-
yield flowResult(this.convertLambdaObjectToGrammarString(true));
|
167
|
+
yield flowResult(this.convertLambdaObjectToGrammarString({ pretty: true }));
|
168
168
|
}
|
169
169
|
|
170
|
-
*convertLambdaObjectToGrammarString(
|
170
|
+
*convertLambdaObjectToGrammarString(options?: {
|
171
|
+
pretty?: boolean | undefined;
|
172
|
+
}): GeneratorFn<void> {
|
171
173
|
if (!isStubbed_RawLambda(this.query)) {
|
172
174
|
try {
|
173
175
|
const lambdas = new Map<string, RawLambda>();
|
@@ -175,7 +177,7 @@ export class MappingExecutionQueryState extends LambdaEditorState {
|
|
175
177
|
const isolatedLambdas =
|
176
178
|
(yield this.editorStore.graphManagerState.graphManager.lambdasToPureCode(
|
177
179
|
lambdas,
|
178
|
-
pretty,
|
180
|
+
options?.pretty,
|
179
181
|
)) as Map<string, string>;
|
180
182
|
const grammarText = isolatedLambdas.get(this.lambdaId);
|
181
183
|
this.setLambdaString(
|
@@ -97,7 +97,10 @@ export class PurePropertyMappingState extends PropertyMappingState {
|
|
97
97
|
}
|
98
98
|
}
|
99
99
|
|
100
|
-
*convertLambdaObjectToGrammarString(
|
100
|
+
*convertLambdaObjectToGrammarString(options?: {
|
101
|
+
pretty?: boolean | undefined;
|
102
|
+
preserveCompilationError?: boolean | undefined;
|
103
|
+
}): GeneratorFn<void> {
|
101
104
|
if (!isStubbed_RawLambda(this.propertyMapping.transform)) {
|
102
105
|
try {
|
103
106
|
const lambdas = new Map<string, RawLambda>();
|
@@ -105,7 +108,7 @@ export class PurePropertyMappingState extends PropertyMappingState {
|
|
105
108
|
const isolatedLambdas =
|
106
109
|
(yield this.editorStore.graphManagerState.graphManager.lambdasToPureCode(
|
107
110
|
lambdas,
|
108
|
-
pretty,
|
111
|
+
options?.pretty,
|
109
112
|
)) as Map<string, string>;
|
110
113
|
const grammarText = isolatedLambdas.get(this.lambdaId);
|
111
114
|
this.setLambdaString(
|
@@ -113,7 +116,9 @@ export class PurePropertyMappingState extends PropertyMappingState {
|
|
113
116
|
? this.extractLambdaString(grammarText)
|
114
117
|
: '',
|
115
118
|
);
|
116
|
-
this.clearErrors(
|
119
|
+
this.clearErrors({
|
120
|
+
preserveCompilationError: options?.preserveCompilationError,
|
121
|
+
});
|
117
122
|
} catch (error) {
|
118
123
|
assertErrorThrown(error);
|
119
124
|
this.editorStore.applicationStore.logService.error(
|
@@ -190,16 +195,21 @@ export class PureInstanceSetImplementationFilterState extends LambdaEditorState
|
|
190
195
|
}
|
191
196
|
}
|
192
197
|
|
193
|
-
*convertLambdaObjectToGrammarString(
|
198
|
+
*convertLambdaObjectToGrammarString(options?: {
|
199
|
+
pretty?: boolean | undefined;
|
200
|
+
preserveCompilationError?: boolean | undefined;
|
201
|
+
}): GeneratorFn<void> {
|
194
202
|
if (this.instanceSetImplementation.filter) {
|
195
203
|
try {
|
196
204
|
const grammarText =
|
197
205
|
(yield this.editorStore.graphManagerState.graphManager.lambdaToPureCode(
|
198
206
|
this.instanceSetImplementation.filter,
|
199
|
-
pretty,
|
207
|
+
options?.pretty,
|
200
208
|
)) as string;
|
201
209
|
this.setLambdaString(this.extractLambdaString(grammarText));
|
202
|
-
this.clearErrors(
|
210
|
+
this.clearErrors({
|
211
|
+
preserveCompilationError: options?.preserveCompilationError,
|
212
|
+
});
|
203
213
|
} catch (error) {
|
204
214
|
assertErrorThrown(error);
|
205
215
|
this.editorStore.applicationStore.logService.error(
|
@@ -109,7 +109,10 @@ export class RelationalPropertyMappingState extends PropertyMappingState {
|
|
109
109
|
}
|
110
110
|
}
|
111
111
|
|
112
|
-
*convertLambdaObjectToGrammarString(
|
112
|
+
*convertLambdaObjectToGrammarString(options?: {
|
113
|
+
pretty?: boolean | undefined;
|
114
|
+
preserveCompilationError?: boolean | undefined;
|
115
|
+
}): GeneratorFn<void> {
|
113
116
|
if (this.propertyMapping instanceof RelationalPropertyMapping) {
|
114
117
|
if (!isStubbed_RawRelationalOperationElement(this.propertyMapping)) {
|
115
118
|
try {
|
@@ -128,7 +131,9 @@ export class RelationalPropertyMappingState extends PropertyMappingState {
|
|
128
131
|
? this.extractLambdaString(grammarText)
|
129
132
|
: '',
|
130
133
|
);
|
131
|
-
this.clearErrors(
|
134
|
+
this.clearErrors({
|
135
|
+
preserveCompilationError: options?.preserveCompilationError,
|
136
|
+
});
|
132
137
|
} catch (error) {
|
133
138
|
assertErrorThrown(error);
|
134
139
|
this.editorStore.applicationStore.logService.error(
|
@@ -214,14 +219,19 @@ export class EmbeddedRelationalInstanceSetImplementationState
|
|
214
219
|
extractLambdaString(fullLambdaString: string): string {
|
215
220
|
throw new UnsupportedOperationError();
|
216
221
|
}
|
217
|
-
clearErrors(
|
222
|
+
clearErrors(options?: {
|
223
|
+
preserveCompilationError?: boolean | undefined;
|
224
|
+
}): void {
|
218
225
|
// TODO
|
219
226
|
return;
|
220
227
|
}
|
221
228
|
*convertLambdaGrammarStringToObject(): GeneratorFn<void> {
|
222
229
|
throw new UnsupportedOperationError();
|
223
230
|
}
|
224
|
-
*convertLambdaObjectToGrammarString(
|
231
|
+
*convertLambdaObjectToGrammarString(options?: {
|
232
|
+
pretty?: boolean | undefined;
|
233
|
+
preserveCompilationError?: boolean | undefined;
|
234
|
+
}): GeneratorFn<void> {
|
225
235
|
throw new UnsupportedOperationError();
|
226
236
|
}
|
227
237
|
}
|
package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.ts
CHANGED
@@ -291,10 +291,12 @@ export class MappingTestSuiteQueryState extends LambdaEditorState {
|
|
291
291
|
*updateLamba(val: RawLambda): GeneratorFn<void> {
|
292
292
|
this.query = val;
|
293
293
|
mappingTestable_setQuery(this.parent, val);
|
294
|
-
yield flowResult(this.convertLambdaObjectToGrammarString(true));
|
294
|
+
yield flowResult(this.convertLambdaObjectToGrammarString({ pretty: true }));
|
295
295
|
}
|
296
296
|
|
297
|
-
*convertLambdaObjectToGrammarString(
|
297
|
+
*convertLambdaObjectToGrammarString(options?: {
|
298
|
+
pretty?: boolean | undefined;
|
299
|
+
}): GeneratorFn<void> {
|
298
300
|
if (!isStubbed_RawLambda(this.query)) {
|
299
301
|
try {
|
300
302
|
const lambdas = new Map<string, RawLambda>();
|
@@ -302,7 +304,7 @@ export class MappingTestSuiteQueryState extends LambdaEditorState {
|
|
302
304
|
const isolatedLambdas =
|
303
305
|
(yield this.editorStore.graphManagerState.graphManager.lambdasToPureCode(
|
304
306
|
lambdas,
|
305
|
-
pretty,
|
307
|
+
options?.pretty,
|
306
308
|
)) as Map<string, string>;
|
307
309
|
const grammarText = isolatedLambdas.get(this.lambdaId);
|
308
310
|
this.setLambdaString(
|
package/src/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.ts
CHANGED
@@ -292,10 +292,12 @@ export class ServicePureExecutionQueryState extends LambdaEditorState {
|
|
292
292
|
|
293
293
|
*updateLamba(val: RawLambda): GeneratorFn<void> {
|
294
294
|
this.setLambda(val);
|
295
|
-
yield flowResult(this.convertLambdaObjectToGrammarString(true));
|
295
|
+
yield flowResult(this.convertLambdaObjectToGrammarString({ pretty: true }));
|
296
296
|
}
|
297
297
|
|
298
|
-
*convertLambdaObjectToGrammarString(
|
298
|
+
*convertLambdaObjectToGrammarString(options?: {
|
299
|
+
pretty?: boolean | undefined;
|
300
|
+
}): GeneratorFn<void> {
|
299
301
|
if (this.execution.func.body) {
|
300
302
|
try {
|
301
303
|
const lambdas = new Map<string, RawLambda>();
|
@@ -309,7 +311,7 @@ export class ServicePureExecutionQueryState extends LambdaEditorState {
|
|
309
311
|
const isolatedLambdas =
|
310
312
|
(yield this.editorStore.graphManagerState.graphManager.lambdasToPureCode(
|
311
313
|
lambdas,
|
312
|
-
pretty,
|
314
|
+
options?.pretty,
|
313
315
|
)) as Map<string, string>;
|
314
316
|
const grammarText = isolatedLambdas.get(this.lambdaId);
|
315
317
|
this.setLambdaString(
|
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
|
|