@finos/legend-application-studio 27.0.0 → 27.1.1
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/__lib__/LegendStudioApplicationNavigationContext.d.ts +9 -1
- package/lib/__lib__/LegendStudioApplicationNavigationContext.d.ts.map +1 -1
- package/lib/__lib__/LegendStudioApplicationNavigationContext.js +11 -1
- package/lib/__lib__/LegendStudioApplicationNavigationContext.js.map +1 -1
- package/lib/__lib__/LegendStudioEvent.d.ts +1 -0
- package/lib/__lib__/LegendStudioEvent.d.ts.map +1 -1
- package/lib/__lib__/LegendStudioEvent.js +1 -0
- package/lib/__lib__/LegendStudioEvent.js.map +1 -1
- package/lib/application/LegendStudioApplicationConfig.d.ts +6 -0
- package/lib/application/LegendStudioApplicationConfig.d.ts.map +1 -1
- package/lib/application/LegendStudioApplicationConfig.js +7 -0
- package/lib/application/LegendStudioApplicationConfig.js.map +1 -1
- package/lib/components/ElementIconUtils.d.ts.map +1 -1
- package/lib/components/ElementIconUtils.js +3 -1
- package/lib/components/ElementIconUtils.js.map +1 -1
- package/lib/components/editor/editor-group/ModelImporter.d.ts.map +1 -1
- package/lib/components/editor/editor-group/ModelImporter.js +1 -0
- package/lib/components/editor/editor-group/ModelImporter.js.map +1 -1
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilder.d.ts.map +1 -1
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilder.js +8 -10
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilder.js.map +1 -1
- package/lib/components/editor/editor-group/data-editor/EmbeddedDataEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/data-editor/EmbeddedDataEditor.js +10 -4
- package/lib/components/editor/editor-group/data-editor/EmbeddedDataEditor.js.map +1 -1
- package/lib/components/editor/editor-group/data-editor/RelationalCSVDataEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/data-editor/RelationalCSVDataEditor.js +65 -12
- package/lib/components/editor/editor-group/data-editor/RelationalCSVDataEditor.js.map +1 -1
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_BindingElementEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_BindingElementEditor.js +3 -0
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_BindingElementEditor.js.map +1 -1
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.js +3 -0
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.js.map +1 -1
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.js +3 -0
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.d.ts +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js +101 -137
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/NewMappingElementModal.js +1 -2
- package/lib/components/editor/editor-group/mapping-editor/NewMappingElementModal.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 -4
- package/lib/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.js.map +1 -1
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.d.ts +11 -0
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.d.ts.map +1 -1
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.js +27 -2
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.js.map +1 -1
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.d.ts.map +1 -1
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.js +38 -6
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.js.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.d.ts +3 -0
- package/lib/components/editor/side-bar/CreateNewElementModal.d.ts.map +1 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.js +43 -1
- package/lib/components/editor/side-bar/CreateNewElementModal.js.map +1 -1
- package/lib/components/extensions/Core_LegendStudioApplicationPlugin.d.ts.map +1 -1
- package/lib/components/extensions/Core_LegendStudioApplicationPlugin.js +10 -0
- package/lib/components/extensions/Core_LegendStudioApplicationPlugin.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/EditorGraphState.js +1 -1
- package/lib/stores/editor/EditorGraphState.js.map +1 -1
- package/lib/stores/editor/EditorStore.d.ts.map +1 -1
- package/lib/stores/editor/EditorStore.js +10 -2
- package/lib/stores/editor/EditorStore.js.map +1 -1
- package/lib/stores/editor/NewElementState.d.ts +0 -1
- package/lib/stores/editor/NewElementState.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.js +43 -10
- package/lib/stores/editor/NewElementState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts +0 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js +26 -30
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/data/DataEditorState.d.ts +2 -2
- package/lib/stores/editor/editor-state/element-editor-state/data/DataEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/data/DataEditorState.js +2 -2
- package/lib/stores/editor/editor-state/element-editor-state/data/DataEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.d.ts +14 -19
- package/lib/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.js +30 -65
- package/lib/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.d.ts +4 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.js +5 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.d.ts +56 -78
- 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 +285 -384
- 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/mapping/testable/MappingTestingHelper.d.ts +23 -0
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.d.ts.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.js +129 -0
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.js.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceEditorState.js +2 -2
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.js +12 -2
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.js.map +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 +15 -8
- package/lib/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.d.ts +7 -4
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.js +53 -10
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.d.ts +2 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.js +20 -16
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.js.map +1 -1
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.d.ts +9 -0
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.d.ts.map +1 -1
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.js +149 -3
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.js.map +1 -1
- package/lib/stores/editor/sidebar-state/testable/GlobalTestRunnerState.d.ts +1 -1
- package/lib/stores/editor/sidebar-state/testable/GlobalTestRunnerState.d.ts.map +1 -1
- package/lib/stores/editor/sidebar-state/testable/GlobalTestRunnerState.js +3 -0
- package/lib/stores/editor/sidebar-state/testable/GlobalTestRunnerState.js.map +1 -1
- package/lib/stores/editor/utils/MockDataUtils.d.ts.map +1 -1
- package/lib/stores/editor/utils/MockDataUtils.js +3 -0
- package/lib/stores/editor/utils/MockDataUtils.js.map +1 -1
- package/lib/stores/editor/utils/ModelClassifierUtils.d.ts +2 -5
- package/lib/stores/editor/utils/ModelClassifierUtils.d.ts.map +1 -1
- package/lib/stores/editor/utils/ModelClassifierUtils.js +2 -6
- package/lib/stores/editor/utils/ModelClassifierUtils.js.map +1 -1
- package/lib/stores/editor/utils/TestableUtils.d.ts +11 -1
- package/lib/stores/editor/utils/TestableUtils.d.ts.map +1 -1
- package/lib/stores/editor/utils/TestableUtils.js +50 -1
- package/lib/stores/editor/utils/TestableUtils.js.map +1 -1
- package/lib/stores/graph-modifier/DSL_Mapping_GraphModifierHelper.d.ts +5 -4
- package/lib/stores/graph-modifier/DSL_Mapping_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graph-modifier/DSL_Mapping_GraphModifierHelper.js +4 -1
- package/lib/stores/graph-modifier/DSL_Mapping_GraphModifierHelper.js.map +1 -1
- package/package.json +6 -6
- package/src/__lib__/LegendStudioApplicationNavigationContext.ts +12 -1
- package/src/__lib__/LegendStudioEvent.ts +1 -1
- package/src/application/LegendStudioApplicationConfig.ts +8 -0
- package/src/components/ElementIconUtils.tsx +3 -0
- package/src/components/editor/editor-group/ModelImporter.tsx +4 -0
- package/src/components/editor/editor-group/connection-editor/DatabaseBuilder.tsx +12 -13
- package/src/components/editor/editor-group/data-editor/EmbeddedDataEditor.tsx +45 -38
- package/src/components/editor/editor-group/data-editor/RelationalCSVDataEditor.tsx +140 -31
- package/src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_BindingElementEditor.tsx +7 -0
- package/src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.tsx +6 -0
- package/src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.tsx +6 -0
- package/src/components/editor/editor-group/mapping-editor/MappingTestableEditor.tsx +296 -414
- package/src/components/editor/editor-group/mapping-editor/NewMappingElementModal.tsx +1 -1
- package/src/components/editor/editor-group/service-editor/testable/ServiceTestsEditor.tsx +12 -7
- package/src/components/editor/editor-group/testable/TestableSharedComponents.tsx +88 -3
- package/src/components/editor/panel-group/SQLPlaygroundPanel.tsx +104 -18
- package/src/components/editor/side-bar/CreateNewElementModal.tsx +111 -1
- package/src/components/extensions/Core_LegendStudioApplicationPlugin.tsx +10 -0
- package/src/stores/editor/EditorGraphState.ts +1 -1
- package/src/stores/editor/EditorStore.ts +29 -17
- package/src/stores/editor/NewElementState.ts +109 -21
- package/src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.ts +33 -40
- package/src/stores/editor/editor-state/element-editor-state/data/DataEditorState.ts +7 -1
- package/src/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.ts +48 -77
- package/src/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.ts +5 -1
- package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.ts +407 -617
- package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.ts +243 -0
- package/src/stores/editor/editor-state/element-editor-state/service/ServiceEditorState.ts +6 -2
- package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts +18 -1
- package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.ts +20 -12
- package/src/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.ts +76 -18
- package/src/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.ts +29 -24
- package/src/stores/editor/panel-group/SQLPlaygroundPanelState.ts +224 -1
- package/src/stores/editor/sidebar-state/testable/GlobalTestRunnerState.ts +4 -1
- package/src/stores/editor/utils/MockDataUtils.ts +2 -0
- package/src/stores/editor/utils/ModelClassifierUtils.ts +2 -6
- package/src/stores/editor/utils/TestableUtils.ts +73 -0
- package/src/stores/graph-modifier/DSL_Mapping_GraphModifierHelper.ts +15 -12
- package/tsconfig.json +1 -0
package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.ts
ADDED
@@ -0,0 +1,243 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
import {
|
18
|
+
LambdaFunction,
|
19
|
+
type Class,
|
20
|
+
type GraphManagerState,
|
21
|
+
type RawLambda,
|
22
|
+
type SetImplementation,
|
23
|
+
type MappingTestSuite,
|
24
|
+
type GraphFetchTree,
|
25
|
+
type MappingModelCoverageAnalysisResult,
|
26
|
+
RootGraphFetchTree,
|
27
|
+
PackageableElementExplicitReference,
|
28
|
+
FunctionType,
|
29
|
+
CORE_PURE_PATH,
|
30
|
+
Multiplicity,
|
31
|
+
buildRawLambdaFromLambdaFunction,
|
32
|
+
StoreTestData,
|
33
|
+
RelationalInstanceSetImplementation,
|
34
|
+
EmbeddedRelationalInstanceSetImplementation,
|
35
|
+
TableAlias,
|
36
|
+
RelationalCSVData,
|
37
|
+
Table,
|
38
|
+
RelationalCSVDataTable,
|
39
|
+
PureInstanceSetImplementation,
|
40
|
+
MappingTest,
|
41
|
+
ModelStore,
|
42
|
+
EntityMappedProperty,
|
43
|
+
getAllClassProperties,
|
44
|
+
getAllClassDerivedProperties,
|
45
|
+
PropertyGraphFetchTree,
|
46
|
+
PropertyExplicitReference,
|
47
|
+
} from '@finos/legend-graph';
|
48
|
+
import {
|
49
|
+
buildGetAllFunction,
|
50
|
+
buildSerialzieFunctionWithGraphFetch,
|
51
|
+
} from '@finos/legend-query-builder';
|
52
|
+
import type { EditorStore } from '../../../../EditorStore.js';
|
53
|
+
import { getMappingElementSource } from '../MappingEditorState.js';
|
54
|
+
import { createMockDataForTable } from '../../../../utils/MockDataUtils.js';
|
55
|
+
import {
|
56
|
+
DEFAULT_TEST_ASSERTION_ID,
|
57
|
+
createBareModelStoreData,
|
58
|
+
createDefaultEqualToJSONTestAssertion,
|
59
|
+
} from '../../../../utils/TestableUtils.js';
|
60
|
+
import {
|
61
|
+
assertErrorThrown,
|
62
|
+
assertTrue,
|
63
|
+
guaranteeNonNullable,
|
64
|
+
} from '@finos/legend-shared';
|
65
|
+
|
66
|
+
export const createGraphFetchRawLambda = (
|
67
|
+
mainClass: Class,
|
68
|
+
graphManagerState: GraphManagerState,
|
69
|
+
root: RootGraphFetchTree,
|
70
|
+
): RawLambda => {
|
71
|
+
const lambdaFunction = new LambdaFunction(
|
72
|
+
new FunctionType(
|
73
|
+
PackageableElementExplicitReference.create(
|
74
|
+
graphManagerState.graph.getType(CORE_PURE_PATH.ANY),
|
75
|
+
),
|
76
|
+
Multiplicity.ONE,
|
77
|
+
),
|
78
|
+
);
|
79
|
+
const getAllFunction = buildGetAllFunction(mainClass, Multiplicity.ONE);
|
80
|
+
const serialize = buildSerialzieFunctionWithGraphFetch(
|
81
|
+
root,
|
82
|
+
false,
|
83
|
+
getAllFunction,
|
84
|
+
undefined,
|
85
|
+
);
|
86
|
+
lambdaFunction.expressionSequence = [serialize];
|
87
|
+
return buildRawLambdaFromLambdaFunction(lambdaFunction, graphManagerState);
|
88
|
+
};
|
89
|
+
|
90
|
+
export const createStoreBareModelStoreData = (
|
91
|
+
_class: Class,
|
92
|
+
editorStore: EditorStore,
|
93
|
+
): StoreTestData => {
|
94
|
+
const modelStoreData = createBareModelStoreData(_class, editorStore);
|
95
|
+
const testData = new StoreTestData();
|
96
|
+
testData.data = modelStoreData;
|
97
|
+
testData.store = PackageableElementExplicitReference.create(
|
98
|
+
ModelStore.INSTANCE,
|
99
|
+
);
|
100
|
+
return testData;
|
101
|
+
};
|
102
|
+
|
103
|
+
export const generateStoreTestDataFromSetImpl = (
|
104
|
+
setImpl: SetImplementation,
|
105
|
+
editorStore: EditorStore,
|
106
|
+
tryAndMockTable?: boolean,
|
107
|
+
): StoreTestData | undefined => {
|
108
|
+
if (
|
109
|
+
setImpl instanceof RelationalInstanceSetImplementation ||
|
110
|
+
setImpl instanceof EmbeddedRelationalInstanceSetImplementation ||
|
111
|
+
setImpl instanceof EmbeddedRelationalInstanceSetImplementation
|
112
|
+
) {
|
113
|
+
const _table = getMappingElementSource(
|
114
|
+
setImpl,
|
115
|
+
editorStore.pluginManager.getApplicationPlugins(),
|
116
|
+
);
|
117
|
+
if (_table instanceof TableAlias) {
|
118
|
+
const relation = _table.relation.value;
|
119
|
+
const owner = relation.schema._OWNER;
|
120
|
+
const val = new RelationalCSVData();
|
121
|
+
if (tryAndMockTable && relation instanceof Table) {
|
122
|
+
const mockTable = new RelationalCSVDataTable();
|
123
|
+
const values = createMockDataForTable(relation);
|
124
|
+
mockTable.table = relation.name;
|
125
|
+
mockTable.schema = relation.schema.name;
|
126
|
+
mockTable.values = values;
|
127
|
+
val.tables.push(mockTable);
|
128
|
+
}
|
129
|
+
const testData = new StoreTestData();
|
130
|
+
testData.data = val;
|
131
|
+
testData.store = PackageableElementExplicitReference.create(owner);
|
132
|
+
return testData;
|
133
|
+
}
|
134
|
+
} else if (setImpl instanceof PureInstanceSetImplementation) {
|
135
|
+
const srcClass = setImpl.srcClass;
|
136
|
+
if (srcClass) {
|
137
|
+
return createStoreBareModelStoreData(srcClass.value, editorStore);
|
138
|
+
}
|
139
|
+
}
|
140
|
+
return undefined;
|
141
|
+
};
|
142
|
+
|
143
|
+
export const createBareMappingTest = (
|
144
|
+
id: string,
|
145
|
+
storeTestData: StoreTestData | undefined,
|
146
|
+
suite?: MappingTestSuite | undefined,
|
147
|
+
): MappingTest => {
|
148
|
+
const mappingTest = new MappingTest();
|
149
|
+
mappingTest.id = id;
|
150
|
+
mappingTest.storeTestData = storeTestData ? [storeTestData] : [];
|
151
|
+
mappingTest.assertions = [
|
152
|
+
createDefaultEqualToJSONTestAssertion(DEFAULT_TEST_ASSERTION_ID),
|
153
|
+
];
|
154
|
+
if (suite) {
|
155
|
+
mappingTest.__parent = suite;
|
156
|
+
suite.tests.push(mappingTest);
|
157
|
+
}
|
158
|
+
const assertion = createDefaultEqualToJSONTestAssertion(`expectedAssertion`);
|
159
|
+
mappingTest.assertions = [assertion];
|
160
|
+
assertion.parentTest = mappingTest;
|
161
|
+
return mappingTest;
|
162
|
+
};
|
163
|
+
|
164
|
+
const addPropertySubTreeIfPossible = (
|
165
|
+
rootTree: GraphFetchTree,
|
166
|
+
_class: Class,
|
167
|
+
propertyName: string,
|
168
|
+
): PropertyGraphFetchTree | undefined => {
|
169
|
+
const property = getAllClassProperties(_class)
|
170
|
+
.concat(
|
171
|
+
// we fetch mapped derived properties without parameters
|
172
|
+
getAllClassDerivedProperties(_class).filter(
|
173
|
+
(p) => !p.parameters || !(p.parameters as object[]).length,
|
174
|
+
),
|
175
|
+
)
|
176
|
+
.find((prop) => prop.name === propertyName);
|
177
|
+
if (property) {
|
178
|
+
const subTree = new PropertyGraphFetchTree(
|
179
|
+
PropertyExplicitReference.create(property),
|
180
|
+
undefined,
|
181
|
+
);
|
182
|
+
rootTree.subTrees.push(subTree);
|
183
|
+
return subTree;
|
184
|
+
}
|
185
|
+
return undefined;
|
186
|
+
};
|
187
|
+
|
188
|
+
export const createGraphFetchQueryFromMappingAnalysis = (
|
189
|
+
_class: Class,
|
190
|
+
graphManagerState: GraphManagerState,
|
191
|
+
mappingModelCoverageAnalysisResult:
|
192
|
+
| MappingModelCoverageAnalysisResult
|
193
|
+
| undefined,
|
194
|
+
): RawLambda => {
|
195
|
+
try {
|
196
|
+
const anaylsis = guaranteeNonNullable(mappingModelCoverageAnalysisResult);
|
197
|
+
const mappedEntity = guaranteeNonNullable(
|
198
|
+
anaylsis.mappedEntities.find((e) => e.path === _class.path),
|
199
|
+
);
|
200
|
+
const rootTree = new RootGraphFetchTree(
|
201
|
+
PackageableElementExplicitReference.create(_class),
|
202
|
+
);
|
203
|
+
// TODO: allow complex properties
|
204
|
+
mappedEntity.properties.forEach((mapped) => {
|
205
|
+
const subTree = addPropertySubTreeIfPossible(
|
206
|
+
rootTree,
|
207
|
+
_class,
|
208
|
+
mapped.name,
|
209
|
+
);
|
210
|
+
if (mapped instanceof EntityMappedProperty && subTree) {
|
211
|
+
const entityPath = mapped.entityPath;
|
212
|
+
const entityClass =
|
213
|
+
graphManagerState.graph.getNullableClass(entityPath);
|
214
|
+
const firstLevelEntity = anaylsis.mappedEntities.find(
|
215
|
+
(e) => e.path === entityPath,
|
216
|
+
);
|
217
|
+
if (entityClass && firstLevelEntity) {
|
218
|
+
firstLevelEntity.properties.forEach((e) => {
|
219
|
+
if (!(e instanceof EntityMappedProperty)) {
|
220
|
+
addPropertySubTreeIfPossible(subTree, entityClass, e.name);
|
221
|
+
}
|
222
|
+
});
|
223
|
+
}
|
224
|
+
}
|
225
|
+
});
|
226
|
+
assertTrue(!rootTree.isEmpty);
|
227
|
+
return createGraphFetchRawLambda(_class, graphManagerState, rootTree);
|
228
|
+
} catch (error) {
|
229
|
+
assertErrorThrown(error);
|
230
|
+
const lambdaFunction = new LambdaFunction(
|
231
|
+
new FunctionType(
|
232
|
+
PackageableElementExplicitReference.create(
|
233
|
+
graphManagerState.graph.getType(CORE_PURE_PATH.ANY),
|
234
|
+
),
|
235
|
+
Multiplicity.ONE,
|
236
|
+
),
|
237
|
+
);
|
238
|
+
lambdaFunction.expressionSequence = [
|
239
|
+
buildGetAllFunction(_class, Multiplicity.ONE),
|
240
|
+
];
|
241
|
+
return buildRawLambdaFromLambdaFunction(lambdaFunction, graphManagerState);
|
242
|
+
}
|
243
|
+
};
|
@@ -76,7 +76,9 @@ export const resolveServiceQueryReturnType = (
|
|
76
76
|
service: Service,
|
77
77
|
editorStore: EditorStore,
|
78
78
|
): Type | undefined => {
|
79
|
-
const valueSpec =
|
79
|
+
const valueSpec = returnUndefOnError(() =>
|
80
|
+
resolveServiceQueryValueSpec(service, editorStore),
|
81
|
+
);
|
80
82
|
if (valueSpec) {
|
81
83
|
return returnUndefOnError(() => getValueSpecificationReturnType(valueSpec));
|
82
84
|
}
|
@@ -87,7 +89,9 @@ export const isServiceQueryTDS = (
|
|
87
89
|
service: Service,
|
88
90
|
editorStore: EditorStore,
|
89
91
|
): boolean => {
|
90
|
-
const valueSpec =
|
92
|
+
const valueSpec = returnUndefOnError(() =>
|
93
|
+
resolveServiceQueryValueSpec(service, editorStore),
|
94
|
+
);
|
91
95
|
return Boolean(
|
92
96
|
valueSpec
|
93
97
|
? valueSpecReturnTDS(valueSpec, editorStore.graphManagerState.graph)
|
package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestDataState.ts
CHANGED
@@ -36,6 +36,7 @@ import {
|
|
36
36
|
observe_ValueSpecification,
|
37
37
|
getAllIdentifiedConnectionsFromRuntime,
|
38
38
|
getAllIdentifiedServiceConnections,
|
39
|
+
Database,
|
39
40
|
} from '@finos/legend-graph';
|
40
41
|
import {
|
41
42
|
type GeneratorFn,
|
@@ -63,7 +64,10 @@ import {
|
|
63
64
|
type EmbeddedDataTypeOption,
|
64
65
|
EmbeddedDataEditorState,
|
65
66
|
} from '../../data/DataEditorState.js';
|
66
|
-
import {
|
67
|
+
import {
|
68
|
+
RelationalCSVDataState,
|
69
|
+
createEmbeddedData,
|
70
|
+
} from '../../data/EmbeddedDataState.js';
|
67
71
|
import type { ServiceTestSuiteState } from './ServiceTestableState.js';
|
68
72
|
import { LegendStudioTelemetryHelper } from '../../../../../../__lib__/LegendStudioTelemetryHelper.js';
|
69
73
|
import {
|
@@ -168,6 +172,7 @@ export class ConnectionTestDataState {
|
|
168
172
|
anonymizeGeneratedData: observable,
|
169
173
|
setAnonymizeGeneratedData: action,
|
170
174
|
changeEmbeddedData: action,
|
175
|
+
buildEmbeddedEditorState: action,
|
171
176
|
generateTestData: flow,
|
172
177
|
generateTestDataForDatabaseConnection: flow,
|
173
178
|
});
|
@@ -179,6 +184,7 @@ export class ConnectionTestDataState {
|
|
179
184
|
connectionData.testData,
|
180
185
|
);
|
181
186
|
this.parametersState = new ServiceTestDataParametersState(this);
|
187
|
+
this.buildEmbeddedEditorState();
|
182
188
|
}
|
183
189
|
get identifiedConnection(): IdentifiedConnection | undefined {
|
184
190
|
return this.getAllIdentifiedConnections().find(
|
@@ -186,6 +192,17 @@ export class ConnectionTestDataState {
|
|
186
192
|
);
|
187
193
|
}
|
188
194
|
|
195
|
+
buildEmbeddedEditorState(): void {
|
196
|
+
const val = this.identifiedConnection?.connection.store.value;
|
197
|
+
if (
|
198
|
+
this.embeddedEditorState.embeddedDataState instanceof
|
199
|
+
RelationalCSVDataState &&
|
200
|
+
val instanceof Database
|
201
|
+
) {
|
202
|
+
this.embeddedEditorState.embeddedDataState.setDatabase(val);
|
203
|
+
}
|
204
|
+
}
|
205
|
+
|
189
206
|
setUseSharedModal(val: boolean): void {
|
190
207
|
this.useSharedModal = val;
|
191
208
|
}
|
package/src/stores/editor/editor-state/element-editor-state/service/testable/ServiceTestableState.ts
CHANGED
@@ -81,10 +81,10 @@ const createEmptyServiceTestSuite = (
|
|
81
81
|
);
|
82
82
|
// data
|
83
83
|
suite.testData = new TestData();
|
84
|
-
const
|
85
|
-
if (
|
86
|
-
const
|
87
|
-
const connectionValue =
|
84
|
+
const identifiedConnections = getAllIdentifiedServiceConnections(service);
|
85
|
+
if (identifiedConnections.length === 1) {
|
86
|
+
const connectionVal = guaranteeNonNullable(identifiedConnections[0]);
|
87
|
+
const connectionValue = connectionVal.connection;
|
88
88
|
const type = returnUndefOnError(() =>
|
89
89
|
connectionValue.accept_ConnectionVisitor(
|
90
90
|
new EmbeddedDataConnectionTypeVisitor(serviceEditorState.editorStore),
|
@@ -92,7 +92,7 @@ const createEmptyServiceTestSuite = (
|
|
92
92
|
);
|
93
93
|
if (type) {
|
94
94
|
const testData = createConnectionTestData(
|
95
|
-
|
95
|
+
connectionVal,
|
96
96
|
type,
|
97
97
|
serviceEditorState.editorStore,
|
98
98
|
);
|
@@ -341,12 +341,20 @@ export class ServiceTestableState {
|
|
341
341
|
}
|
342
342
|
|
343
343
|
addTestSuite(): void {
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
344
|
+
try {
|
345
|
+
const suite = createEmptyServiceTestSuite(this);
|
346
|
+
service_addTestSuite(
|
347
|
+
this.serviceEditorState.service,
|
348
|
+
suite,
|
349
|
+
this.serviceEditorState.editorStore.changeDetectionState
|
350
|
+
.observerContext,
|
351
|
+
);
|
352
|
+
this.selectedSuiteState = new ServiceTestSuiteState(suite, this);
|
353
|
+
} catch (error) {
|
354
|
+
assertErrorThrown(error);
|
355
|
+
this.editorStore.applicationStore.notificationService.notifyError(
|
356
|
+
`Unable to create service test suite: ${error.message}`,
|
357
|
+
);
|
358
|
+
}
|
351
359
|
}
|
352
360
|
}
|
@@ -34,8 +34,13 @@ import {
|
|
34
34
|
assertErrorThrown,
|
35
35
|
ContentType,
|
36
36
|
UnsupportedOperationError,
|
37
|
+
assertTrue,
|
38
|
+
isNonNullable,
|
39
|
+
IllegalStateError,
|
40
|
+
guaranteeNonNullable,
|
41
|
+
guaranteeType,
|
37
42
|
} from '@finos/legend-shared';
|
38
|
-
import { action, flow, makeObservable, observable } from 'mobx';
|
43
|
+
import { action, flow, flowResult, makeObservable, observable } from 'mobx';
|
39
44
|
import type { EditorStore } from '../../../EditorStore.js';
|
40
45
|
import { externalFormatData_setData } from '../../../../graph-modifier/DSL_Data_GraphModifierHelper.js';
|
41
46
|
import {
|
@@ -43,9 +48,10 @@ import {
|
|
43
48
|
TESTABLE_RESULT,
|
44
49
|
} from '../../../sidebar-state/testable/GlobalTestRunnerState.js';
|
45
50
|
import type { TestableTestEditorState } from './TestableEditorState.js';
|
51
|
+
import { isTestPassing } from '../../../utils/TestableUtils.js';
|
46
52
|
|
47
53
|
export enum TEST_ASSERTION_TAB {
|
48
|
-
|
54
|
+
EXPECTED = 'EXPECTED',
|
49
55
|
RESULT = 'RESULT',
|
50
56
|
}
|
51
57
|
|
@@ -221,11 +227,13 @@ export abstract class TestAssertionState {
|
|
221
227
|
this.result = new TestAssertionResultState(editorStore, assertionState);
|
222
228
|
}
|
223
229
|
|
224
|
-
abstract generateExpected(status: AssertFail):
|
230
|
+
abstract generateExpected(status: AssertFail): boolean;
|
225
231
|
|
226
232
|
abstract generateBare(): TestAssertion;
|
227
233
|
|
228
234
|
abstract label(): string;
|
235
|
+
|
236
|
+
abstract get supportsGeneratingAssertion(): boolean;
|
229
237
|
}
|
230
238
|
|
231
239
|
export class EqualToJsonAssertionState extends TestAssertionState {
|
@@ -235,11 +243,17 @@ export class EqualToJsonAssertionState extends TestAssertionState {
|
|
235
243
|
externalFormatData_setData(this.assertion.expected, val);
|
236
244
|
}
|
237
245
|
|
238
|
-
|
246
|
+
override get supportsGeneratingAssertion(): boolean {
|
247
|
+
return true;
|
248
|
+
}
|
249
|
+
|
250
|
+
generateExpected(status: AssertFail): boolean {
|
239
251
|
if (status instanceof EqualToJsonAssertFail) {
|
240
252
|
const expected = status.actual;
|
241
253
|
this.setExpectedValue(expected);
|
254
|
+
return true;
|
242
255
|
}
|
256
|
+
return false;
|
243
257
|
}
|
244
258
|
generateBare(): TestAssertion {
|
245
259
|
const bareAssertion = new EqualToJson();
|
@@ -255,11 +269,14 @@ export class EqualToJsonAssertionState extends TestAssertionState {
|
|
255
269
|
}
|
256
270
|
|
257
271
|
export class UnsupportedAssertionState extends TestAssertionState {
|
272
|
+
override get supportsGeneratingAssertion(): boolean {
|
273
|
+
return false;
|
274
|
+
}
|
258
275
|
generateBare(): TestAssertion {
|
259
276
|
throw new UnsupportedOperationError();
|
260
277
|
}
|
261
|
-
generateExpected(status: AssertFail):
|
262
|
-
return;
|
278
|
+
generateExpected(status: AssertFail): boolean {
|
279
|
+
return false;
|
263
280
|
}
|
264
281
|
|
265
282
|
label(): string {
|
@@ -273,7 +290,7 @@ export class TestAssertionEditorState {
|
|
273
290
|
assertionState: TestAssertionState;
|
274
291
|
assertionResultState: TestAssertionResultState;
|
275
292
|
assertion: TestAssertion;
|
276
|
-
selectedTab = TEST_ASSERTION_TAB.
|
293
|
+
selectedTab = TEST_ASSERTION_TAB.EXPECTED;
|
277
294
|
generatingExpectedAction = ActionState.create();
|
278
295
|
constructor(
|
279
296
|
editorStore: EditorStore,
|
@@ -299,18 +316,59 @@ export class TestAssertionEditorState {
|
|
299
316
|
|
300
317
|
*generateExpected(): GeneratorFn<void> {
|
301
318
|
try {
|
319
|
+
assertTrue(
|
320
|
+
this.assertionState.supportsGeneratingAssertion,
|
321
|
+
'Assertion does not support generation',
|
322
|
+
);
|
302
323
|
this.generatingExpectedAction.inProgress();
|
303
|
-
const
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
324
|
+
const result = (yield flowResult(
|
325
|
+
this.testState.fetchTestResult(),
|
326
|
+
)) as TestResult;
|
327
|
+
let testExecuted: TestExecuted;
|
328
|
+
if (result instanceof TestExecuted) {
|
329
|
+
testExecuted = result;
|
330
|
+
} else if (result instanceof MultiExecutionServiceTestResult) {
|
331
|
+
testExecuted = guaranteeNonNullable(
|
332
|
+
Array.from(result.keyIndexedTestResults.values())
|
333
|
+
.map((testResult) => {
|
334
|
+
if (testResult instanceof TestExecuted) {
|
335
|
+
return testResult;
|
336
|
+
} else if (testResult instanceof TestError) {
|
337
|
+
throw new IllegalStateError(testResult.error);
|
338
|
+
}
|
339
|
+
return undefined;
|
340
|
+
})
|
341
|
+
.filter(isNonNullable)[0],
|
342
|
+
'Unable to derive expected result from test result',
|
343
|
+
);
|
344
|
+
} else {
|
345
|
+
throw new UnsupportedOperationError(
|
346
|
+
'Unable to derive expected result from test result',
|
347
|
+
);
|
348
|
+
}
|
349
|
+
// if test is passing, update UI and return
|
350
|
+
// if test errors report error
|
351
|
+
if (isTestPassing(testExecuted)) {
|
352
|
+
this.testState.handleTestResult(testExecuted);
|
353
|
+
return;
|
354
|
+
} else if (testExecuted instanceof TestError) {
|
355
|
+
throw new IllegalStateError(testExecuted.error);
|
356
|
+
}
|
357
|
+
const assertionStatus = testExecuted.assertStatuses.find(
|
358
|
+
(aStatus) =>
|
359
|
+
aStatus.assertion.id === this.assertion.id &&
|
360
|
+
aStatus instanceof AssertFail,
|
361
|
+
);
|
362
|
+
const assertFail = guaranteeType(
|
363
|
+
assertionStatus,
|
364
|
+
AssertFail,
|
365
|
+
'Unable to derive expected result from test result',
|
366
|
+
);
|
367
|
+
const generated = this.assertionState.generateExpected(assertFail);
|
309
368
|
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
this.assertionState.generateExpected(assertFail);
|
369
|
+
if (generated) {
|
370
|
+
this.setSelectedTab(TEST_ASSERTION_TAB.EXPECTED);
|
371
|
+
}
|
314
372
|
this.generatingExpectedAction.complete();
|
315
373
|
this.editorStore.applicationStore.notificationService.notifySuccess(
|
316
374
|
`Expected results generated!`,
|
@@ -320,7 +378,7 @@ export class TestAssertionEditorState {
|
|
320
378
|
this.editorStore.applicationStore.notificationService.notifyError(
|
321
379
|
`Error generating expected result, please check data input: ${error.message}.`,
|
322
380
|
);
|
323
|
-
this.setSelectedTab(TEST_ASSERTION_TAB.
|
381
|
+
this.setSelectedTab(TEST_ASSERTION_TAB.EXPECTED);
|
324
382
|
this.generatingExpectedAction.fail();
|
325
383
|
}
|
326
384
|
}
|
@@ -36,7 +36,7 @@ import {
|
|
36
36
|
deleteEntry,
|
37
37
|
isNonNullable,
|
38
38
|
} from '@finos/legend-shared';
|
39
|
-
import { action, makeObservable, observable } from 'mobx';
|
39
|
+
import { action, flowResult, makeObservable, observable } from 'mobx';
|
40
40
|
import type { EditorStore } from '../../../EditorStore.js';
|
41
41
|
import { atomicTest_addAssertion } from '../../../../graph-modifier/Testable_GraphModifierHelper.js';
|
42
42
|
import { createEmptyEqualToJsonAssertion } from '../../../utils/TestableUtils.js';
|
@@ -141,22 +141,7 @@ export class TestableTestEditorState {
|
|
141
141
|
try {
|
142
142
|
this.resetResult();
|
143
143
|
this.runningTestAction.inProgress();
|
144
|
-
const
|
145
|
-
const suite =
|
146
|
-
this.test.__parent instanceof TestSuite
|
147
|
-
? this.test.__parent
|
148
|
-
: undefined;
|
149
|
-
input.unitTestIds.push(new UniqueTestId(suite, this.test));
|
150
|
-
const testResults =
|
151
|
-
(yield this.editorStore.graphManagerState.graphManager.runTests(
|
152
|
-
[input],
|
153
|
-
this.editorStore.graphManagerState.graph,
|
154
|
-
)) as TestResult[];
|
155
|
-
const result = guaranteeNonNullable(testResults[0]);
|
156
|
-
assertTrue(
|
157
|
-
result.testable === this.testable && result.atomicTest === this.test,
|
158
|
-
'Unexpected test result',
|
159
|
-
);
|
144
|
+
const result = (yield flowResult(this.fetchTestResult())) as TestResult;
|
160
145
|
this.handleTestResult(result);
|
161
146
|
this.runningTestAction.complete();
|
162
147
|
} catch (error) {
|
@@ -168,6 +153,26 @@ export class TestableTestEditorState {
|
|
168
153
|
}
|
169
154
|
}
|
170
155
|
|
156
|
+
// Fetches test results. Caller of test should catch the error
|
157
|
+
async fetchTestResult(): Promise<TestResult> {
|
158
|
+
const input = new RunTestsTestableInput(this.testable);
|
159
|
+
const suite =
|
160
|
+
this.test.__parent instanceof TestSuite ? this.test.__parent : undefined;
|
161
|
+
input.unitTestIds.push(new UniqueTestId(suite, this.test));
|
162
|
+
const testResults =
|
163
|
+
await this.editorStore.graphManagerState.graphManager.runTests(
|
164
|
+
[input],
|
165
|
+
this.editorStore.graphManagerState.graph,
|
166
|
+
);
|
167
|
+
const result = guaranteeNonNullable(testResults[0]);
|
168
|
+
assertTrue(
|
169
|
+
result.testable === this.testable &&
|
170
|
+
result.atomicTest.id === this.test.id,
|
171
|
+
'Unexpected test result',
|
172
|
+
);
|
173
|
+
return result;
|
174
|
+
}
|
175
|
+
|
171
176
|
resetResult(): void {
|
172
177
|
this.testResultState.setResult(undefined);
|
173
178
|
this.assertionEditorStates.forEach((assertionState) =>
|
@@ -220,7 +225,7 @@ export class TestableTestSuiteEditorState {
|
|
220
225
|
suite: TestSuite;
|
221
226
|
isReadOnly: boolean;
|
222
227
|
testStates: TestableTestEditorState[] = [];
|
223
|
-
|
228
|
+
runningSuiteState = ActionState.create();
|
224
229
|
selectTestState: TestableTestEditorState | undefined;
|
225
230
|
|
226
231
|
constructor(
|
@@ -237,7 +242,7 @@ export class TestableTestSuiteEditorState {
|
|
237
242
|
|
238
243
|
*runSuite(): GeneratorFn<void> {
|
239
244
|
try {
|
240
|
-
this.
|
245
|
+
this.runningSuiteState.inProgress();
|
241
246
|
this.testStates.forEach((t) => t.resetResult());
|
242
247
|
this.testStates.forEach((t) => t.runningTestAction.inProgress());
|
243
248
|
const input = new RunTestsTestableInput(this.testable);
|
@@ -253,11 +258,11 @@ export class TestableTestSuiteEditorState {
|
|
253
258
|
const state = this.testStates.find((t) => t.test === result.atomicTest);
|
254
259
|
state?.handleTestResult(result);
|
255
260
|
});
|
256
|
-
this.
|
261
|
+
this.runningSuiteState.complete();
|
257
262
|
} catch (error) {
|
258
263
|
assertErrorThrown(error);
|
259
264
|
this.editorStore.applicationStore.notificationService.notifyError(error);
|
260
|
-
this.
|
265
|
+
this.runningSuiteState.fail();
|
261
266
|
} finally {
|
262
267
|
this.testStates.forEach((t) => t.runningTestAction.complete());
|
263
268
|
}
|
@@ -265,7 +270,7 @@ export class TestableTestSuiteEditorState {
|
|
265
270
|
|
266
271
|
*runFailingTests(): GeneratorFn<void> {
|
267
272
|
try {
|
268
|
-
this.
|
273
|
+
this.runningSuiteState.inProgress();
|
269
274
|
const input = new RunTestsTestableInput(this.testable);
|
270
275
|
input.unitTestIds = this.testStates
|
271
276
|
.map((testState) => {
|
@@ -290,11 +295,11 @@ export class TestableTestSuiteEditorState {
|
|
290
295
|
const state = this.testStates.find((t) => t.test === result.atomicTest);
|
291
296
|
state?.handleTestResult(result);
|
292
297
|
});
|
293
|
-
this.
|
298
|
+
this.runningSuiteState.complete();
|
294
299
|
} catch (error) {
|
295
300
|
assertErrorThrown(error);
|
296
301
|
this.editorStore.applicationStore.notificationService.notifyError(error);
|
297
|
-
this.
|
302
|
+
this.runningSuiteState.fail();
|
298
303
|
} finally {
|
299
304
|
this.testStates.forEach((t) => t.runningTestAction.complete());
|
300
305
|
}
|