@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.
Files changed (86) hide show
  1. package/lib/components/editor/editor-group/FunctionEditor.d.ts.map +1 -1
  2. package/lib/components/editor/editor-group/FunctionEditor.js +4 -1
  3. package/lib/components/editor/editor-group/FunctionEditor.js.map +1 -1
  4. package/lib/components/editor/editor-group/mapping-editor/MappingExplorer.js +1 -1
  5. package/lib/components/editor/editor-group/mapping-editor/MappingExplorer.js.map +1 -1
  6. package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.js +1 -1
  7. package/lib/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
  8. package/lib/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.d.ts.map +1 -1
  9. package/lib/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.js +9 -5
  10. package/lib/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.js.map +1 -1
  11. package/lib/components/editor/editor-group/uml-editor/ClassEditor.d.ts.map +1 -1
  12. package/lib/components/editor/editor-group/uml-editor/ClassEditor.js +2 -2
  13. package/lib/components/editor/editor-group/uml-editor/ClassEditor.js.map +1 -1
  14. package/lib/components/editor/panel-group/SQLPlaygroundPanel.js.map +1 -1
  15. package/lib/components/extensions/Core_LegendStudioApplicationPlugin.js +1 -1
  16. package/lib/components/extensions/Core_LegendStudioApplicationPlugin.js.map +1 -1
  17. package/lib/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.js +1 -1
  18. package/lib/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.js.map +1 -1
  19. package/lib/index.css +1 -1
  20. package/lib/package.json +6 -6
  21. package/lib/stores/editor/EditorStore.js +2 -2
  22. package/lib/stores/editor/editor-state/element-editor-state/ClassState.d.ts +8 -2
  23. package/lib/stores/editor/editor-state/element-editor-state/ClassState.d.ts.map +1 -1
  24. package/lib/stores/editor/editor-state/element-editor-state/ClassState.js +10 -6
  25. package/lib/stores/editor/editor-state/element-editor-state/ClassState.js.map +1 -1
  26. package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.d.ts +5 -1
  27. package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.d.ts.map +1 -1
  28. package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js +6 -4
  29. package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js.map +1 -1
  30. package/lib/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.d.ts +4 -1
  31. package/lib/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.d.ts.map +1 -1
  32. package/lib/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.js +6 -4
  33. package/lib/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.js.map +1 -1
  34. package/lib/stores/editor/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.d.ts +10 -3
  35. package/lib/stores/editor/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.d.ts.map +1 -1
  36. package/lib/stores/editor/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.js +7 -5
  37. package/lib/stores/editor/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.js.map +1 -1
  38. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts +3 -1
  39. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts.map +1 -1
  40. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.js +3 -3
  41. package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
  42. package/lib/stores/editor/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.d.ts +8 -2
  43. package/lib/stores/editor/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.d.ts.map +1 -1
  44. package/lib/stores/editor/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.js +10 -6
  45. package/lib/stores/editor/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.js.map +1 -1
  46. package/lib/stores/editor/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.d.ts +11 -3
  47. package/lib/stores/editor/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.d.ts.map +1 -1
  48. package/lib/stores/editor/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.js +6 -4
  49. package/lib/stores/editor/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.js.map +1 -1
  50. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts +3 -1
  51. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts.map +1 -1
  52. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js +3 -3
  53. package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js.map +1 -1
  54. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.d.ts +3 -1
  55. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
  56. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.js +3 -3
  57. package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
  58. package/lib/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.d.ts +8 -2
  59. package/lib/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.d.ts.map +1 -1
  60. package/lib/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.js +12 -8
  61. package/lib/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.js.map +1 -1
  62. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.d.ts +1 -1
  63. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.d.ts.map +1 -1
  64. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js +13 -8
  65. package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js.map +1 -1
  66. package/package.json +16 -16
  67. package/src/components/editor/editor-group/FunctionEditor.tsx +4 -2
  68. package/src/components/editor/editor-group/mapping-editor/MappingExplorer.tsx +1 -1
  69. package/src/components/editor/editor-group/service-editor/ServiceExecutionQueryEditor.tsx +3 -3
  70. package/src/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.tsx +53 -18
  71. package/src/components/editor/editor-group/uml-editor/ClassEditor.tsx +4 -2
  72. package/src/components/editor/panel-group/SQLPlaygroundPanel.tsx +2 -2
  73. package/src/components/extensions/Core_LegendStudioApplicationPlugin.tsx +1 -1
  74. package/src/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.tsx +1 -1
  75. package/src/stores/editor/EditorStore.ts +2 -2
  76. package/src/stores/editor/editor-state/element-editor-state/ClassState.ts +16 -6
  77. package/src/stores/editor/editor-state/element-editor-state/FunctionEditorState.ts +10 -7
  78. package/src/stores/editor/editor-state/element-editor-state/mapping/DEPRECATED__MappingTestState.ts +9 -4
  79. package/src/stores/editor/editor-state/element-editor-state/mapping/FlatDataInstanceSetImplementationState.ts +14 -5
  80. package/src/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.ts +5 -3
  81. package/src/stores/editor/editor-state/element-editor-state/mapping/PureInstanceSetImplementationState.ts +16 -6
  82. package/src/stores/editor/editor-state/element-editor-state/mapping/relational/RelationalInstanceSetImplementationState.ts +14 -4
  83. package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.ts +5 -3
  84. package/src/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.ts +5 -3
  85. package/src/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.ts +22 -10
  86. 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(pretty: boolean): GeneratorFn<void> {
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(): void {
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(pretty: boolean): GeneratorFn<void> {
364
+ *convertLambdaObjectToGrammarString(options?: {
365
+ pretty?: boolean | undefined;
366
+ }): GeneratorFn<void> {
358
367
  throw new UnsupportedOperationError();
359
368
  }
360
369
  }
@@ -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(pretty?: boolean): GeneratorFn<void> {
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(pretty: boolean): GeneratorFn<void> {
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(pretty: boolean): GeneratorFn<void> {
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(pretty: boolean): GeneratorFn<void> {
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(): void {
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(pretty: boolean): GeneratorFn<void> {
231
+ *convertLambdaObjectToGrammarString(options?: {
232
+ pretty?: boolean | undefined;
233
+ preserveCompilationError?: boolean | undefined;
234
+ }): GeneratorFn<void> {
225
235
  throw new UnsupportedOperationError();
226
236
  }
227
237
  }
@@ -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(pretty?: boolean): GeneratorFn<void> {
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(
@@ -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(pretty?: boolean): GeneratorFn<void> {
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(
@@ -100,9 +100,10 @@ export class PostValidationAssertionState extends LambdaEditorState {
100
100
  }
101
101
  }
102
102
 
103
- override *convertLambdaObjectToGrammarString(
104
- pretty: boolean,
105
- ): GeneratorFn<void> {
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(pretty: boolean): GeneratorFn<void> {
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(_paramState.convertLambdaObjectToGrammarString(false));
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(aState.convertLambdaObjectToGrammarString(false));
415
+ yield flowResult(
416
+ aState.convertLambdaObjectToGrammarString({ pretty: false }),
417
+ );
406
418
  }
407
419
 
408
420
  deleteAssertion(assertion: PostValidationAssertion): void {
@@ -127,7 +127,7 @@ export class ServiceTestSuiteState {
127
127
  selectedTestState: ServiceTestState | undefined;
128
128
  testStates: ServiceTestState[] = [];
129
129
  testToRename: ServiceTest | undefined;
130
- isRunningTest = ActionState.create();
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.isRunningTest.inProgress();
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.isRunningTest.complete();
208
+ this.runningTestState.complete();
209
209
  } catch (error) {
210
210
  assertErrorThrown(error);
211
211
  this.editorStore.applicationStore.notificationService.notifyError(error);
212
- this.isRunningTest.fail();
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.isRunningTest.inProgress();
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.isRunningTest.complete();
246
+ this.runningTestState.complete();
247
247
  } catch (error) {
248
248
  assertErrorThrown(error);
249
249
  this.editorStore.applicationStore.notificationService.notifyError(error);
250
- this.isRunningTest.fail();
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.testCount - this.testPassed;
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