@finos/legend-application-studio 27.1.0 → 27.1.2
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__/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/components/editor/editor-group/FunctionEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/FunctionEditor.js +28 -24
- package/lib/components/editor/editor-group/FunctionEditor.js.map +1 -1
- package/lib/components/editor/editor-group/connection-editor/{DatabaseBuilder.d.ts → DatabaseBuilderWizard.d.ts} +4 -11
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.d.ts.map +1 -0
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.js +48 -0
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.js.map +1 -0
- package/lib/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.d.ts +32 -0
- package/lib/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.d.ts.map +1 -0
- package/lib/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.js +99 -0
- package/lib/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.js.map +1 -0
- package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.js +1 -1
- package/lib/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.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 +5 -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 +62 -12
- package/lib/components/editor/editor-group/data-editor/RelationalCSVDataEditor.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/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 +0 -7
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.d.ts.map +1 -1
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.js +20 -77
- package/lib/components/editor/panel-group/SQLPlaygroundPanel.js.map +1 -1
- package/lib/components/editor/side-bar/Explorer.js +3 -3
- package/lib/components/editor/side-bar/Explorer.js.map +1 -1
- package/lib/components/editor/side-bar/WorkflowManager.d.ts.map +1 -1
- package/lib/components/editor/side-bar/WorkflowManager.js +6 -1
- package/lib/components/editor/side-bar/WorkflowManager.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +3 -3
- package/lib/stores/editor/ExplorerTreeState.d.ts +4 -4
- package/lib/stores/editor/ExplorerTreeState.d.ts.map +1 -1
- package/lib/stores/editor/ExplorerTreeState.js +4 -4
- package/lib/stores/editor/ExplorerTreeState.js.map +1 -1
- package/lib/stores/editor/NewElementState.d.ts.map +1 -1
- package/lib/stores/editor/NewElementState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.d.ts +12 -12
- 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 +45 -46
- package/lib/stores/editor/editor-state/element-editor-state/FunctionEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.d.ts +20 -29
- 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 +60 -141
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderWizardState.d.ts +33 -0
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderWizardState.d.ts.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderWizardState.js +71 -0
- package/lib/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderWizardState.js.map +1 -0
- 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/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 +3 -48
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.d.ts.map +1 -1
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.js +12 -350
- package/lib/stores/editor/panel-group/SQLPlaygroundPanelState.js.map +1 -1
- package/lib/stores/editor/sidebar-state/WorkflowManagerState.d.ts +5 -0
- package/lib/stores/editor/sidebar-state/WorkflowManagerState.d.ts.map +1 -1
- package/lib/stores/editor/sidebar-state/WorkflowManagerState.js +26 -0
- package/lib/stores/editor/sidebar-state/WorkflowManagerState.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/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 +9 -9
- package/src/__lib__/LegendStudioEvent.ts +1 -1
- package/src/components/editor/editor-group/FunctionEditor.tsx +133 -118
- package/src/components/editor/editor-group/connection-editor/DatabaseBuilderWizard.tsx +191 -0
- package/src/components/editor/editor-group/connection-editor/DatabaseSchemaExplorer.tsx +227 -0
- package/src/components/editor/editor-group/connection-editor/RelationalDatabaseConnectionEditor.tsx +1 -1
- package/src/components/editor/editor-group/data-editor/EmbeddedDataEditor.tsx +34 -37
- package/src/components/editor/editor-group/data-editor/RelationalCSVDataEditor.tsx +134 -31
- package/src/components/editor/editor-group/mapping-editor/MappingTestableEditor.tsx +296 -414
- package/src/components/editor/editor-group/testable/TestableSharedComponents.tsx +88 -3
- package/src/components/editor/panel-group/SQLPlaygroundPanel.tsx +47 -211
- package/src/components/editor/side-bar/Explorer.tsx +3 -3
- package/src/components/editor/side-bar/WorkflowManager.tsx +10 -0
- package/src/stores/editor/ExplorerTreeState.ts +6 -9
- package/src/stores/editor/NewElementState.ts +0 -1
- package/src/stores/editor/editor-state/element-editor-state/FunctionEditorState.ts +44 -50
- package/src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderState.ts +88 -212
- package/src/stores/editor/editor-state/element-editor-state/connection/DatabaseBuilderWizardState.ts +102 -0
- 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/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 +13 -533
- package/src/stores/editor/sidebar-state/WorkflowManagerState.ts +47 -0
- 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/TestableUtils.ts +73 -0
- package/src/stores/graph-modifier/DSL_Mapping_GraphModifierHelper.ts +15 -12
- package/tsconfig.json +4 -1
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilder.d.ts.map +0 -1
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilder.js +0 -133
- package/lib/components/editor/editor-group/connection-editor/DatabaseBuilder.js.map +0 -1
- package/src/components/editor/editor-group/connection-editor/DatabaseBuilder.tsx +0 -397
@@ -14,13 +14,14 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
import { AssertFail, TestExecuted, TestError, EqualToJson, ExternalFormatData, EqualToJsonAssertFail, MultiExecutionServiceTestResult, AssertPass, TestExecutionStatus, } from '@finos/legend-graph';
|
17
|
-
import { ActionState, assertErrorThrown, ContentType, UnsupportedOperationError, } from '@finos/legend-shared';
|
18
|
-
import { action, flow, makeObservable, observable } from 'mobx';
|
17
|
+
import { ActionState, assertErrorThrown, ContentType, UnsupportedOperationError, assertTrue, isNonNullable, IllegalStateError, guaranteeNonNullable, guaranteeType, } from '@finos/legend-shared';
|
18
|
+
import { action, flow, flowResult, makeObservable, observable } from 'mobx';
|
19
19
|
import { externalFormatData_setData } from '../../../../graph-modifier/DSL_Data_GraphModifierHelper.js';
|
20
20
|
import { getTestableResultFromAssertionStatus, TESTABLE_RESULT, } from '../../../sidebar-state/testable/GlobalTestRunnerState.js';
|
21
|
+
import { isTestPassing } from '../../../utils/TestableUtils.js';
|
21
22
|
export var TEST_ASSERTION_TAB;
|
22
23
|
(function (TEST_ASSERTION_TAB) {
|
23
|
-
TEST_ASSERTION_TAB["
|
24
|
+
TEST_ASSERTION_TAB["EXPECTED"] = "EXPECTED";
|
24
25
|
TEST_ASSERTION_TAB["RESULT"] = "RESULT";
|
25
26
|
})(TEST_ASSERTION_TAB || (TEST_ASSERTION_TAB = {}));
|
26
27
|
export class TestAssertionStatusState {
|
@@ -157,11 +158,16 @@ export class EqualToJsonAssertionState extends TestAssertionState {
|
|
157
158
|
setExpectedValue(val) {
|
158
159
|
externalFormatData_setData(this.assertion.expected, val);
|
159
160
|
}
|
161
|
+
get supportsGeneratingAssertion() {
|
162
|
+
return true;
|
163
|
+
}
|
160
164
|
generateExpected(status) {
|
161
165
|
if (status instanceof EqualToJsonAssertFail) {
|
162
166
|
const expected = status.actual;
|
163
167
|
this.setExpectedValue(expected);
|
168
|
+
return true;
|
164
169
|
}
|
170
|
+
return false;
|
165
171
|
}
|
166
172
|
generateBare() {
|
167
173
|
const bareAssertion = new EqualToJson();
|
@@ -175,11 +181,14 @@ export class EqualToJsonAssertionState extends TestAssertionState {
|
|
175
181
|
}
|
176
182
|
}
|
177
183
|
export class UnsupportedAssertionState extends TestAssertionState {
|
184
|
+
get supportsGeneratingAssertion() {
|
185
|
+
return false;
|
186
|
+
}
|
178
187
|
generateBare() {
|
179
188
|
throw new UnsupportedOperationError();
|
180
189
|
}
|
181
190
|
generateExpected(status) {
|
182
|
-
return;
|
191
|
+
return false;
|
183
192
|
}
|
184
193
|
label() {
|
185
194
|
return 'Unsupported';
|
@@ -191,7 +200,7 @@ export class TestAssertionEditorState {
|
|
191
200
|
assertionState;
|
192
201
|
assertionResultState;
|
193
202
|
assertion;
|
194
|
-
selectedTab = TEST_ASSERTION_TAB.
|
203
|
+
selectedTab = TEST_ASSERTION_TAB.EXPECTED;
|
195
204
|
generatingExpectedAction = ActionState.create();
|
196
205
|
constructor(editorStore, assertion, testState) {
|
197
206
|
makeObservable(this, {
|
@@ -211,18 +220,52 @@ export class TestAssertionEditorState {
|
|
211
220
|
}
|
212
221
|
*generateExpected() {
|
213
222
|
try {
|
223
|
+
assertTrue(this.assertionState.supportsGeneratingAssertion, 'Assertion does not support generation');
|
214
224
|
this.generatingExpectedAction.inProgress();
|
215
|
-
const
|
216
|
-
|
217
|
-
|
218
|
-
|
225
|
+
const result = (yield flowResult(this.testState.fetchTestResult()));
|
226
|
+
let testExecuted;
|
227
|
+
if (result instanceof TestExecuted) {
|
228
|
+
testExecuted = result;
|
229
|
+
}
|
230
|
+
else if (result instanceof MultiExecutionServiceTestResult) {
|
231
|
+
testExecuted = guaranteeNonNullable(Array.from(result.keyIndexedTestResults.values())
|
232
|
+
.map((testResult) => {
|
233
|
+
if (testResult instanceof TestExecuted) {
|
234
|
+
return testResult;
|
235
|
+
}
|
236
|
+
else if (testResult instanceof TestError) {
|
237
|
+
throw new IllegalStateError(testResult.error);
|
238
|
+
}
|
239
|
+
return undefined;
|
240
|
+
})
|
241
|
+
.filter(isNonNullable)[0], 'Unable to derive expected result from test result');
|
242
|
+
}
|
243
|
+
else {
|
244
|
+
throw new UnsupportedOperationError('Unable to derive expected result from test result');
|
245
|
+
}
|
246
|
+
// if test is passing, update UI and return
|
247
|
+
// if test errors report error
|
248
|
+
if (isTestPassing(testExecuted)) {
|
249
|
+
this.testState.handleTestResult(testExecuted);
|
250
|
+
return;
|
251
|
+
}
|
252
|
+
else if (testExecuted instanceof TestError) {
|
253
|
+
throw new IllegalStateError(testExecuted.error);
|
254
|
+
}
|
255
|
+
const assertionStatus = testExecuted.assertStatuses.find((aStatus) => aStatus.assertion.id === this.assertion.id &&
|
256
|
+
aStatus instanceof AssertFail);
|
257
|
+
const assertFail = guaranteeType(assertionStatus, AssertFail, 'Unable to derive expected result from test result');
|
258
|
+
const generated = this.assertionState.generateExpected(assertFail);
|
259
|
+
if (generated) {
|
260
|
+
this.setSelectedTab(TEST_ASSERTION_TAB.EXPECTED);
|
261
|
+
}
|
219
262
|
this.generatingExpectedAction.complete();
|
220
263
|
this.editorStore.applicationStore.notificationService.notifySuccess(`Expected results generated!`);
|
221
264
|
}
|
222
265
|
catch (error) {
|
223
266
|
assertErrorThrown(error);
|
224
267
|
this.editorStore.applicationStore.notificationService.notifyError(`Error generating expected result, please check data input: ${error.message}.`);
|
225
|
-
this.setSelectedTab(TEST_ASSERTION_TAB.
|
268
|
+
this.setSelectedTab(TEST_ASSERTION_TAB.EXPECTED);
|
226
269
|
this.generatingExpectedAction.fail();
|
227
270
|
}
|
228
271
|
}
|
package/lib/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TestAssertionState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,UAAU,EAEV,YAAY,EACZ,SAAS,EACT,WAAW,EACX,kBAAkB,EAClB,qBAAqB,EACrB,+BAA+B,EAC/B,UAAU,EACV,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,yBAAyB,
|
1
|
+
{"version":3,"file":"TestAssertionState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,UAAU,EAEV,YAAY,EACZ,SAAS,EACT,WAAW,EACX,kBAAkB,EAClB,qBAAqB,EACrB,+BAA+B,EAC/B,UAAU,EACV,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,yBAAyB,EACzB,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,4DAA4D,CAAC;AACxG,OAAO,EACL,oCAAoC,EACpC,eAAe,GAChB,MAAM,0DAA0D,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,2CAA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S,YAAY,WAAW,EAAE;YACpC,OAAO,IAAI,yBAAyB,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;SAC9D;QACD,OAAO,IAAI,yBAAyB,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;IAC/D,CAAC;CACF"}
|
package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.d.ts
CHANGED
@@ -46,6 +46,7 @@ export declare class TestableTestEditorState {
|
|
46
46
|
deleteAssertion(assertionState: TestAssertionEditorState): void;
|
47
47
|
openAssertion(val: TestAssertion): void;
|
48
48
|
runTest(): GeneratorFn<void>;
|
49
|
+
fetchTestResult(): Promise<TestResult>;
|
49
50
|
resetResult(): void;
|
50
51
|
handleTestResult(testResult: TestResult): void;
|
51
52
|
get assertionCount(): number;
|
@@ -58,7 +59,7 @@ export declare class TestableTestSuiteEditorState {
|
|
58
59
|
suite: TestSuite;
|
59
60
|
isReadOnly: boolean;
|
60
61
|
testStates: TestableTestEditorState[];
|
61
|
-
|
62
|
+
runningSuiteState: ActionState;
|
62
63
|
selectTestState: TestableTestEditorState | undefined;
|
63
64
|
constructor(testable: Testable, suite: TestSuite, isReadOnly: boolean, editorStore: EditorStore);
|
64
65
|
runSuite(): GeneratorFn<void>;
|
package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TestableEditorState.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,UAAU,EAIf,SAAS,EAGV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,WAAW,EAIhB,WAAW,EAIZ,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,WAAW,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iB,GAAG,IAAI;IAI5C,oBAAoB,CAAC,SAAS,EAAE,aAAa,GAAG,SAAS,GAAG,IAAI;IAIhE,YAAY,IAAI,IAAI;IAapB,eAAe,CAAC,cAAc,EAAE,wBAAwB,GAAG,IAAI;IAQ/D,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI;IAOtC,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC;IAiBvB,eAAe,IAAI,OAAO,CAAC,UAAU,CAAC;IAmB5C,WAAW,IAAI,IAAI;IAOnB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;IAQ9C,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED,IAAI,eAAe,IAAI,MAAM,CAW5B;IAED,IAAI,eAAe,IAAI,MAAM,CAW5B;CACF;AAED,qBAAa,4BAA4B;IACvC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,uBAAuB,EAAE,CAAM;IAC3C,iBAAiB,cAAwB;IACzC,eAAe,EAAE,uBAAuB,GAAG,SAAS,CAAC;gBAGnD,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,SAAS,EAChB,UAAU,EAAE,OAAO,EACnB,WAAW,EAAE,WAAW;IAQzB,QAAQ,IAAI,WAAW,CAAC,IAAI,CAAC;IA4B7B,eAAe,IAAI,WAAW,CAAC,IAAI,CAAC;CAoCtC"}
|
@@ -15,7 +15,7 @@
|
|
15
15
|
*/
|
16
16
|
import { TestExecuted, UniqueTestId, RunTestsTestableInput, TestSuite, TestExecutionStatus, TestError, } from '@finos/legend-graph';
|
17
17
|
import { assertErrorThrown, assertTrue, guaranteeNonNullable, ActionState, addUniqueEntry, deleteEntry, isNonNullable, } from '@finos/legend-shared';
|
18
|
-
import { action, makeObservable, observable } from 'mobx';
|
18
|
+
import { action, flowResult, makeObservable, observable } from 'mobx';
|
19
19
|
import { atomicTest_addAssertion } from '../../../../graph-modifier/Testable_GraphModifierHelper.js';
|
20
20
|
import { createEmptyEqualToJsonAssertion } from '../../../utils/TestableUtils.js';
|
21
21
|
import { TESTABLE_RESULT } from '../../../sidebar-state/testable/GlobalTestRunnerState.js';
|
@@ -92,14 +92,7 @@ export class TestableTestEditorState {
|
|
92
92
|
try {
|
93
93
|
this.resetResult();
|
94
94
|
this.runningTestAction.inProgress();
|
95
|
-
const
|
96
|
-
const suite = this.test.__parent instanceof TestSuite
|
97
|
-
? this.test.__parent
|
98
|
-
: undefined;
|
99
|
-
input.unitTestIds.push(new UniqueTestId(suite, this.test));
|
100
|
-
const testResults = (yield this.editorStore.graphManagerState.graphManager.runTests([input], this.editorStore.graphManagerState.graph));
|
101
|
-
const result = guaranteeNonNullable(testResults[0]);
|
102
|
-
assertTrue(result.testable === this.testable && result.atomicTest === this.test, 'Unexpected test result');
|
95
|
+
const result = (yield flowResult(this.fetchTestResult()));
|
103
96
|
this.handleTestResult(result);
|
104
97
|
this.runningTestAction.complete();
|
105
98
|
}
|
@@ -109,6 +102,17 @@ export class TestableTestEditorState {
|
|
109
102
|
this.runningTestAction.fail();
|
110
103
|
}
|
111
104
|
}
|
105
|
+
// Fetches test results. Caller of test should catch the error
|
106
|
+
async fetchTestResult() {
|
107
|
+
const input = new RunTestsTestableInput(this.testable);
|
108
|
+
const suite = this.test.__parent instanceof TestSuite ? this.test.__parent : undefined;
|
109
|
+
input.unitTestIds.push(new UniqueTestId(suite, this.test));
|
110
|
+
const testResults = await this.editorStore.graphManagerState.graphManager.runTests([input], this.editorStore.graphManagerState.graph);
|
111
|
+
const result = guaranteeNonNullable(testResults[0]);
|
112
|
+
assertTrue(result.testable === this.testable &&
|
113
|
+
result.atomicTest.id === this.test.id, 'Unexpected test result');
|
114
|
+
return result;
|
115
|
+
}
|
112
116
|
resetResult() {
|
113
117
|
this.testResultState.setResult(undefined);
|
114
118
|
this.assertionEditorStates.forEach((assertionState) => assertionState.assertionResultState.setTestResult(undefined));
|
@@ -146,7 +150,7 @@ export class TestableTestSuiteEditorState {
|
|
146
150
|
suite;
|
147
151
|
isReadOnly;
|
148
152
|
testStates = [];
|
149
|
-
|
153
|
+
runningSuiteState = ActionState.create();
|
150
154
|
selectTestState;
|
151
155
|
constructor(testable, suite, isReadOnly, editorStore) {
|
152
156
|
this.testable = testable;
|
@@ -156,7 +160,7 @@ export class TestableTestSuiteEditorState {
|
|
156
160
|
}
|
157
161
|
*runSuite() {
|
158
162
|
try {
|
159
|
-
this.
|
163
|
+
this.runningSuiteState.inProgress();
|
160
164
|
this.testStates.forEach((t) => t.resetResult());
|
161
165
|
this.testStates.forEach((t) => t.runningTestAction.inProgress());
|
162
166
|
const input = new RunTestsTestableInput(this.testable);
|
@@ -166,12 +170,12 @@ export class TestableTestSuiteEditorState {
|
|
166
170
|
const state = this.testStates.find((t) => t.test === result.atomicTest);
|
167
171
|
state?.handleTestResult(result);
|
168
172
|
});
|
169
|
-
this.
|
173
|
+
this.runningSuiteState.complete();
|
170
174
|
}
|
171
175
|
catch (error) {
|
172
176
|
assertErrorThrown(error);
|
173
177
|
this.editorStore.applicationStore.notificationService.notifyError(error);
|
174
|
-
this.
|
178
|
+
this.runningSuiteState.fail();
|
175
179
|
}
|
176
180
|
finally {
|
177
181
|
this.testStates.forEach((t) => t.runningTestAction.complete());
|
@@ -179,7 +183,7 @@ export class TestableTestSuiteEditorState {
|
|
179
183
|
}
|
180
184
|
*runFailingTests() {
|
181
185
|
try {
|
182
|
-
this.
|
186
|
+
this.runningSuiteState.inProgress();
|
183
187
|
const input = new RunTestsTestableInput(this.testable);
|
184
188
|
input.unitTestIds = this.testStates
|
185
189
|
.map((testState) => {
|
@@ -198,12 +202,12 @@ export class TestableTestSuiteEditorState {
|
|
198
202
|
const state = this.testStates.find((t) => t.test === result.atomicTest);
|
199
203
|
state?.handleTestResult(result);
|
200
204
|
});
|
201
|
-
this.
|
205
|
+
this.runningSuiteState.complete();
|
202
206
|
}
|
203
207
|
catch (error) {
|
204
208
|
assertErrorThrown(error);
|
205
209
|
this.editorStore.applicationStore.notificationService.notifyError(error);
|
206
|
-
this.
|
210
|
+
this.runningSuiteState.fail();
|
207
211
|
}
|
208
212
|
finally {
|
209
213
|
this.testStates.forEach((t) => t.runningTestAction.complete());
|
package/lib/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TestableEditorState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAKL,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,SAAS,EACT,mBAAmB,EACnB,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,iBAAiB,EACjB,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,cAAc,EACd,WAAW,EACX,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"TestableEditorState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/testable/TestableEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAKL,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,SAAS,EACT,mBAAmB,EACnB,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,iBAAiB,EACjB,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,cAAc,EACd,WAAW,EACX,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4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AC,WAAW,CAAC,KAAK,CAAC,CAAC;YACzE,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;SAC/B;gBAAS;YACR,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC,CAAC;SAChE;IACH,CAAC;CACF"}
|
@@ -13,49 +13,19 @@
|
|
13
13
|
* See the License for the specific language governing permissions and
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
|
-
import type { TreeData, TreeNodeData } from '@finos/legend-art';
|
17
16
|
import { type GeneratorFn } from '@finos/legend-shared';
|
18
17
|
import { editor as monacoEditorAPI } from 'monaco-editor';
|
19
|
-
import { type
|
18
|
+
import { type Database, type PackageableConnection } from '@finos/legend-graph';
|
20
19
|
import type { EditorStore } from '../EditorStore.js';
|
21
20
|
import type { CommandRegistrar } from '@finos/legend-application';
|
22
|
-
import
|
23
|
-
export declare abstract class DatabaseSchemaExplorerTreeNodeData implements TreeNodeData {
|
24
|
-
isOpen?: boolean | undefined;
|
25
|
-
id: string;
|
26
|
-
label: string;
|
27
|
-
parentId?: string | undefined;
|
28
|
-
childrenIds?: string[] | undefined;
|
29
|
-
isChecked: boolean;
|
30
|
-
constructor(id: string, label: string, parentId: string | undefined);
|
31
|
-
setChecked(val: boolean): void;
|
32
|
-
}
|
33
|
-
export declare class DatabaseSchemaExplorerTreeSchemaNodeData extends DatabaseSchemaExplorerTreeNodeData {
|
34
|
-
schema: Schema;
|
35
|
-
constructor(id: string, schema: Schema);
|
36
|
-
}
|
37
|
-
export declare class DatabaseSchemaExplorerTreeTableNodeData extends DatabaseSchemaExplorerTreeNodeData {
|
38
|
-
parentId: string;
|
39
|
-
owner: Schema;
|
40
|
-
table: Table;
|
41
|
-
constructor(id: string, parentId: string, owner: Schema, table: Table);
|
42
|
-
}
|
43
|
-
export declare class DatabaseSchemaExplorerTreeColumnNodeData extends DatabaseSchemaExplorerTreeNodeData {
|
44
|
-
parentId: string;
|
45
|
-
owner: Table;
|
46
|
-
column: Column;
|
47
|
-
constructor(id: string, parentId: string, owner: Table, column: Column);
|
48
|
-
}
|
49
|
-
export interface DatabaseSchemaExplorerTreeData extends TreeData<DatabaseSchemaExplorerTreeNodeData> {
|
50
|
-
database: Database;
|
51
|
-
}
|
21
|
+
import { DatabaseSchemaExplorerState } from '../editor-state/element-editor-state/connection/DatabaseBuilderState.js';
|
52
22
|
export declare class SQLPlaygroundPanelState implements CommandRegistrar {
|
53
23
|
readonly editorStore: EditorStore;
|
54
24
|
isFetchingSchema: boolean;
|
55
25
|
isExecutingRawSQL: boolean;
|
56
26
|
connection?: PackageableConnection | undefined;
|
57
27
|
database?: Database | undefined;
|
58
|
-
|
28
|
+
schemaExplorerState?: DatabaseSchemaExplorerState | undefined;
|
59
29
|
readonly sqlEditorTextModel: monacoEditorAPI.ITextModel;
|
60
30
|
sqlEditor?: monacoEditorAPI.IStandaloneCodeEditor | undefined;
|
61
31
|
sqlEditorViewState?: monacoEditorAPI.ICodeEditorViewState | undefined;
|
@@ -64,7 +34,6 @@ export declare class SQLPlaygroundPanelState implements CommandRegistrar {
|
|
64
34
|
isBuildingDatabase: boolean;
|
65
35
|
isUpdatingDatabase: boolean;
|
66
36
|
constructor(editorStore: EditorStore);
|
67
|
-
setTreeData(val?: DatabaseSchemaExplorerTreeData): void;
|
68
37
|
setConnection(val: PackageableConnection | undefined): void;
|
69
38
|
setSQLText(val: string): void;
|
70
39
|
setSQLEditor(val: monacoEditorAPI.IStandaloneCodeEditor | undefined): void;
|
@@ -72,20 +41,6 @@ export declare class SQLPlaygroundPanelState implements CommandRegistrar {
|
|
72
41
|
setSQLEditorViewState(val: monacoEditorAPI.ICodeEditorViewState | undefined): void;
|
73
42
|
registerCommands(): void;
|
74
43
|
deregisterCommands(): void;
|
75
|
-
onNodeSelect(node: DatabaseSchemaExplorerTreeNodeData, treeData: DatabaseSchemaExplorerTreeData): GeneratorFn<void>;
|
76
|
-
getChildNodes(node: DatabaseSchemaExplorerTreeNodeData, treeData: DatabaseSchemaExplorerTreeData): DatabaseSchemaExplorerTreeNodeData[] | undefined;
|
77
|
-
toggleCheckedNode(node: DatabaseSchemaExplorerTreeNodeData, treeData: DatabaseSchemaExplorerTreeData): void;
|
78
|
-
fetchDatabaseMetadata(): GeneratorFn<void>;
|
79
|
-
fetchSchemaMetadata(schemaNode: DatabaseSchemaExplorerTreeSchemaNodeData, treeData: DatabaseSchemaExplorerTreeData): GeneratorFn<void>;
|
80
|
-
fetchTableMetadata(tableNode: DatabaseSchemaExplorerTreeTableNodeData, treeData: DatabaseSchemaExplorerTreeData): GeneratorFn<void>;
|
81
|
-
/**
|
82
|
-
* This will build the intermediate database from the specified
|
83
|
-
* schema exploration input; this information can be further used
|
84
|
-
* to enrich the explorer tree
|
85
|
-
*/
|
86
|
-
private buildIntermediateDatabase;
|
87
44
|
executeRawSQL(): GeneratorFn<void>;
|
88
|
-
generateDatabase(): GeneratorFn<Entity>;
|
89
|
-
updateDatabase(): GeneratorFn<void>;
|
90
45
|
}
|
91
46
|
//# sourceMappingURL=SQLPlaygroundPanelState.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SQLPlaygroundPanelState.d.ts","sourceRoot":"","sources":["../../../../src/stores/editor/panel-group/SQLPlaygroundPanelState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,
|
1
|
+
{"version":3,"file":"SQLPlaygroundPanelState.d.ts","sourceRoot":"","sources":["../../../../src/stores/editor/panel-group/SQLPlaygroundPanelState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,WAAW,EAIjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,qBAAqB,EAG3B,MAAM,qBAAq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