@finos/legend-application-studio 23.1.6 → 23.1.8
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/application/LegendStudio.d.ts.map +1 -1
- package/lib/application/LegendStudio.js +3 -14
- package/lib/application/LegendStudio.js.map +1 -1
- package/lib/application/LegendStudioDocumentation.d.ts +5 -0
- package/lib/application/LegendStudioDocumentation.d.ts.map +1 -1
- package/lib/application/LegendStudioDocumentation.js +5 -0
- package/lib/application/LegendStudioDocumentation.js.map +1 -1
- package/lib/components/editor/edit-panel/EditPanel.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/EditPanel.js +1 -1
- package/lib/components/editor/edit-panel/EditPanel.js.map +1 -1
- package/lib/components/editor/edit-panel/FileGenerationViewer.js +2 -2
- package/lib/components/editor/edit-panel/FileGenerationViewer.js.map +1 -1
- package/lib/components/editor/edit-panel/GrammarTextEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/GrammarTextEditor.js +12 -11
- package/lib/components/editor/edit-panel/GrammarTextEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/ModelImporter.js +5 -4
- package/lib/components/editor/edit-panel/ModelImporter.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.js +3 -2
- package/lib/components/editor/edit-panel/connection-editor/DatabaseBuilder.js.map +1 -1
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js +3 -2
- package/lib/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js +5 -3
- package/lib/components/editor/edit-panel/data-editor/DataElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.js +3 -2
- package/lib/components/editor/edit-panel/data-editor/EmbeddedDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js +3 -2
- package/lib/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js +12 -11
- package/lib/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.js +2 -2
- package/lib/components/editor/edit-panel/diff-editor/EntityDiffView.js.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.js +5 -4
- package/lib/components/editor/edit-panel/element-generation-editor/ElementNativeView.js.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.js +3 -2
- package/lib/components/editor/edit-panel/element-generation-editor/FileSystemViewer.js.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.js +4 -3
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.js +3 -2
- package/lib/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingEditor.js +3 -3
- package/lib/components/editor/edit-panel/mapping-editor/MappingEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts +2 -2
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js +10 -8
- package/lib/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts +6 -6
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js +8 -7
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.d.ts +4 -4
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.js.map +1 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js +3 -2
- package/lib/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.js +3 -2
- package/lib/components/editor/edit-panel/service-editor/ServiceEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js +6 -5
- package/lib/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js +3 -2
- package/lib/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/testable/TestAssertionEditor.d.ts.map +1 -1
- package/lib/components/editor/edit-panel/testable/TestAssertionEditor.js +3 -2
- package/lib/components/editor/edit-panel/testable/TestAssertionEditor.js.map +1 -1
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js +3 -2
- package/lib/components/editor/edit-panel/uml-editor/AssociationEditor.js.map +1 -1
- package/lib/components/editor/side-bar/Explorer.js +7 -6
- 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 +3 -2
- package/lib/components/editor/side-bar/WorkflowManager.js.map +1 -1
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.d.ts.map +1 -1
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.js +4 -3
- package/lib/components/editor/side-bar/testable/GlobalTestRunner.js.map +1 -1
- package/lib/components/extensions/Core_LegendStudioApplicationPlugin.d.ts +2 -1
- package/lib/components/extensions/Core_LegendStudioApplicationPlugin.d.ts.map +1 -1
- package/lib/components/extensions/Core_LegendStudioApplicationPlugin.js +14 -1
- package/lib/components/extensions/Core_LegendStudioApplicationPlugin.js.map +1 -1
- package/lib/components/shared/DiffView.d.ts +2 -2
- package/lib/components/shared/DiffView.d.ts.map +1 -1
- package/lib/components/shared/DiffView.js +8 -7
- package/lib/components/shared/DiffView.js.map +1 -1
- package/lib/components/workspace-setup/CreateProjectModal.d.ts.map +1 -1
- package/lib/components/workspace-setup/CreateProjectModal.js +2 -1
- package/lib/components/workspace-setup/CreateProjectModal.js.map +1 -1
- package/lib/components/workspace-setup/CreateWorkspaceModal.d.ts.map +1 -1
- package/lib/components/workspace-setup/CreateWorkspaceModal.js +2 -1
- package/lib/components/workspace-setup/CreateWorkspaceModal.js.map +1 -1
- package/lib/components/workspace-setup/WorkspaceSetup.d.ts.map +1 -1
- package/lib/components/workspace-setup/WorkspaceSetup.js +2 -1
- package/lib/components/workspace-setup/WorkspaceSetup.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/package.json +8 -11
- package/lib/stores/editor/EditorGraphState.d.ts.map +1 -1
- package/lib/stores/editor/EditorGraphState.js +1 -1
- package/lib/stores/editor/EditorGraphState.js.map +1 -1
- package/lib/stores/editor/EditorTabManagerState.d.ts +1 -1
- package/lib/stores/editor/EditorTabManagerState.d.ts.map +1 -1
- package/lib/stores/editor/EditorTabManagerState.js +1 -1
- package/lib/stores/editor/EditorTabManagerState.js.map +1 -1
- package/lib/stores/editor/GraphEditFormModeState.d.ts.map +1 -1
- package/lib/stores/editor/GraphEditFormModeState.js.map +1 -1
- package/lib/stores/editor/editor-state/EditorState.d.ts +1 -1
- package/lib/stores/editor/editor-state/EditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/EditorState.js +1 -1
- package/lib/stores/editor/editor-state/EditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/FileGenerationViewerState.d.ts +2 -2
- package/lib/stores/editor/editor-state/FileGenerationViewerState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/FileGenerationViewerState.js +7 -7
- package/lib/stores/editor/editor-state/FileGenerationViewerState.js.map +1 -1
- package/lib/stores/editor/editor-state/GrammarTextEditorState.d.ts +3 -3
- package/lib/stores/editor/editor-state/GrammarTextEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/GrammarTextEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.d.ts +2 -2
- 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 +50 -26
- 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/MappingExecutionState.d.ts +1 -2
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.js +2 -2
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingTabManagerState.d.ts +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingTabManagerState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingTabManagerState.js +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingTabManagerState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingTestState.d.ts +8 -3
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingTestState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingTestState.js +38 -20
- package/lib/stores/editor/editor-state/element-editor-state/mapping/MappingTestState.js.map +1 -1
- 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 +8 -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/ServiceExecutionState.d.ts +1 -2
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.js +2 -2
- package/lib/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.js.map +1 -1
- package/package.json +17 -20
- package/src/application/LegendStudio.tsx +0 -18
- package/src/application/LegendStudioDocumentation.ts +5 -0
- package/src/components/editor/edit-panel/EditPanel.tsx +4 -1
- package/src/components/editor/edit-panel/FileGenerationViewer.tsx +2 -2
- package/src/components/editor/edit-panel/GrammarTextEditor.tsx +55 -50
- package/src/components/editor/edit-panel/ModelImporter.tsx +5 -5
- package/src/components/editor/edit-panel/connection-editor/DatabaseBuilder.tsx +4 -4
- package/src/components/editor/edit-panel/connection-editor/RelationalDatabaseConnectionEditor.tsx +6 -6
- package/src/components/editor/edit-panel/data-editor/DataElementEditor.tsx +4 -4
- package/src/components/editor/edit-panel/data-editor/EmbeddedDataEditor.tsx +3 -2
- package/src/components/editor/edit-panel/data-editor/RelationalCSVDataEditor.tsx +4 -3
- package/src/components/editor/edit-panel/diff-editor/EntityChangeConflictEditor.tsx +22 -20
- package/src/components/editor/edit-panel/diff-editor/EntityDiffView.tsx +2 -2
- package/src/components/editor/edit-panel/element-generation-editor/ElementNativeView.tsx +5 -5
- package/src/components/editor/edit-panel/element-generation-editor/FileSystemViewer.tsx +3 -5
- package/src/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetElementEditor.tsx +5 -4
- package/src/components/editor/edit-panel/external-format-editor/DSL_ExternalFormat_SchemaSetModelGenerationEditor.tsx +4 -3
- package/src/components/editor/edit-panel/mapping-editor/MappingEditor.tsx +3 -3
- package/src/components/editor/edit-panel/mapping-editor/MappingExecutionBuilder.tsx +18 -16
- package/src/components/editor/edit-panel/mapping-editor/MappingTestEditor.tsx +19 -19
- package/src/components/editor/edit-panel/mapping-editor/MappingTestsExplorer.tsx +4 -4
- package/src/components/editor/edit-panel/project-configuration-editor/ProjectConfigurationEditor.tsx +5 -4
- package/src/components/editor/edit-panel/service-editor/ServiceEditor.tsx +2 -2
- package/src/components/editor/edit-panel/service-editor/ServiceExecutionQueryEditor.tsx +9 -9
- package/src/components/editor/edit-panel/service-editor/testable/ServiceTestDataEditor.tsx +2 -2
- package/src/components/editor/edit-panel/testable/TestAssertionEditor.tsx +4 -3
- package/src/components/editor/edit-panel/uml-editor/AssociationEditor.tsx +2 -2
- package/src/components/editor/side-bar/Explorer.tsx +8 -8
- package/src/components/editor/side-bar/WorkflowManager.tsx +4 -4
- package/src/components/editor/side-bar/testable/GlobalTestRunner.tsx +7 -6
- package/src/components/extensions/Core_LegendStudioApplicationPlugin.tsx +21 -0
- package/src/components/shared/DiffView.tsx +14 -14
- package/src/components/workspace-setup/CreateProjectModal.tsx +2 -4
- package/src/components/workspace-setup/CreateWorkspaceModal.tsx +2 -4
- package/src/components/workspace-setup/WorkspaceSetup.tsx +1 -1
- package/src/index.ts +1 -1
- package/src/stores/editor/EditorGraphState.ts +2 -4
- package/src/stores/editor/EditorTabManagerState.ts +1 -1
- package/src/stores/editor/GraphEditFormModeState.ts +1 -1
- package/src/stores/editor/editor-state/EditorState.ts +1 -1
- package/src/stores/editor/editor-state/FileGenerationViewerState.ts +8 -8
- package/src/stores/editor/editor-state/GrammarTextEditorState.ts +3 -3
- package/src/stores/editor/editor-state/element-editor-state/mapping/MappingEditorState.ts +63 -31
- package/src/stores/editor/editor-state/element-editor-state/mapping/MappingExecutionState.ts +1 -1
- package/src/stores/editor/editor-state/element-editor-state/mapping/MappingTabManagerState.ts +1 -1
- package/src/stores/editor/editor-state/element-editor-state/mapping/MappingTestState.ts +54 -30
- package/src/stores/editor/editor-state/element-editor-state/service/ServiceEditorState.ts +8 -1
- package/src/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.ts +1 -1
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
ModelStore,
|
|
81
81
|
reportGraphAnalytics,
|
|
82
82
|
} from '@finos/legend-graph';
|
|
83
|
-
import {
|
|
83
|
+
import { TAB_SIZE } from '@finos/legend-application';
|
|
84
84
|
import { flatData_setData } from '../../../shared/modifier/STO_FlatData_GraphModifierHelper.js';
|
|
85
85
|
import {
|
|
86
86
|
expectedOutputMappingTestAssert_setExpectedOutput,
|
|
@@ -99,6 +99,7 @@ import {
|
|
|
99
99
|
LambdaEditorState,
|
|
100
100
|
QueryBuilderTelemetryHelper,
|
|
101
101
|
QUERY_BUILDER_EVENT,
|
|
102
|
+
ExecutionPlanState,
|
|
102
103
|
} from '@finos/legend-query-builder';
|
|
103
104
|
import { MappingEditorTabState } from './MappingTabManagerState.js';
|
|
104
105
|
|
|
@@ -393,8 +394,11 @@ export enum MAPPING_TEST_EDITOR_TAB_TYPE {
|
|
|
393
394
|
SETUP = 'Test Setup',
|
|
394
395
|
RESULT = 'Test Result',
|
|
395
396
|
}
|
|
396
|
-
|
|
397
|
-
|
|
397
|
+
/**
|
|
398
|
+
* TODO: Remove once migration from `MappingTest_Legacy` to `MappingTest` is complete
|
|
399
|
+
* @deprecated
|
|
400
|
+
*/
|
|
401
|
+
export class DEPRECATED__MappingTestState extends MappingEditorTabState {
|
|
398
402
|
readonly editorStore: EditorStore;
|
|
399
403
|
readonly mappingEditorState: MappingEditorState;
|
|
400
404
|
|
|
@@ -446,6 +450,8 @@ export class MappingTestState extends MappingEditorTabState {
|
|
|
446
450
|
setQueryState: action,
|
|
447
451
|
setInputDataState: action,
|
|
448
452
|
setAssertionState: action,
|
|
453
|
+
handleError: action,
|
|
454
|
+
handleResult: action,
|
|
449
455
|
setInputDataStateBasedOnSource: action,
|
|
450
456
|
updateAssertion: action,
|
|
451
457
|
generatePlan: flow,
|
|
@@ -725,36 +731,11 @@ export class MappingTestState extends MappingEditorTabState {
|
|
|
725
731
|
this.setTestRunPromise(promise);
|
|
726
732
|
const result = (yield promise) as ExecutionResult;
|
|
727
733
|
if (this.testRunPromise === promise) {
|
|
728
|
-
this.
|
|
729
|
-
extractExecutionResultValues(result),
|
|
730
|
-
undefined,
|
|
731
|
-
TAB_SIZE,
|
|
732
|
-
);
|
|
733
|
-
let assertionMatched = false;
|
|
734
|
-
if (
|
|
735
|
-
this.assertionState instanceof MappingTestExpectedOutputAssertionState
|
|
736
|
-
) {
|
|
737
|
-
// TODO: this logic should probably be better handled in by engine mapping test runner
|
|
738
|
-
assertionMatched =
|
|
739
|
-
hashObject(extractExecutionResultValues(result)) ===
|
|
740
|
-
hashObject(parseLosslessJSON(this.assertionState.expectedResult));
|
|
741
|
-
} else {
|
|
742
|
-
throw new UnsupportedOperationError();
|
|
743
|
-
}
|
|
744
|
-
this.setResult(
|
|
745
|
-
assertionMatched ? TEST_RESULT.PASSED : TEST_RESULT.FAILED,
|
|
746
|
-
);
|
|
734
|
+
this.handleResult(result);
|
|
747
735
|
}
|
|
748
736
|
} catch (error) {
|
|
749
737
|
assertErrorThrown(error);
|
|
750
|
-
this.
|
|
751
|
-
LogEvent.create(GRAPH_MANAGER_EVENT.EXECUTION_FAILURE),
|
|
752
|
-
error,
|
|
753
|
-
);
|
|
754
|
-
if (this.testRunPromise === promise) {
|
|
755
|
-
this.errorRunningTest = error;
|
|
756
|
-
this.setResult(TEST_RESULT.ERROR);
|
|
757
|
-
}
|
|
738
|
+
this.handleError(error, promise);
|
|
758
739
|
} finally {
|
|
759
740
|
this.isRunningTest = false;
|
|
760
741
|
this.runTime = Date.now() - startTime;
|
|
@@ -769,6 +750,49 @@ export class MappingTestState extends MappingEditorTabState {
|
|
|
769
750
|
}
|
|
770
751
|
}
|
|
771
752
|
|
|
753
|
+
handleResult(result: ExecutionResult): void {
|
|
754
|
+
this.testExecutionResultText = stringifyLosslessJSON(
|
|
755
|
+
extractExecutionResultValues(result),
|
|
756
|
+
undefined,
|
|
757
|
+
TAB_SIZE,
|
|
758
|
+
);
|
|
759
|
+
let assertionMatched = false;
|
|
760
|
+
if (
|
|
761
|
+
this.assertionState instanceof MappingTestExpectedOutputAssertionState
|
|
762
|
+
) {
|
|
763
|
+
// TODO: this logic should probably be better handled in by engine mapping test runner
|
|
764
|
+
assertionMatched =
|
|
765
|
+
hashObject(extractExecutionResultValues(result)) ===
|
|
766
|
+
hashObject(parseLosslessJSON(this.assertionState.expectedResult));
|
|
767
|
+
} else {
|
|
768
|
+
throw new UnsupportedOperationError();
|
|
769
|
+
}
|
|
770
|
+
this.setResult(assertionMatched ? TEST_RESULT.PASSED : TEST_RESULT.FAILED);
|
|
771
|
+
this.isExecutingTest = false;
|
|
772
|
+
this.isRunningTest = false;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
handleError(
|
|
776
|
+
error: Error,
|
|
777
|
+
promise: Promise<ExecutionResult> | undefined,
|
|
778
|
+
): void {
|
|
779
|
+
assertErrorThrown(error);
|
|
780
|
+
this.editorStore.applicationStore.logService.error(
|
|
781
|
+
LogEvent.create(GRAPH_MANAGER_EVENT.EXECUTION_FAILURE),
|
|
782
|
+
error,
|
|
783
|
+
);
|
|
784
|
+
|
|
785
|
+
if (
|
|
786
|
+
this.mappingEditorState.isRunningAllTests ||
|
|
787
|
+
this.testRunPromise === promise
|
|
788
|
+
) {
|
|
789
|
+
this.errorRunningTest = error;
|
|
790
|
+
this.setResult(TEST_RESULT.ERROR);
|
|
791
|
+
}
|
|
792
|
+
this.isExecutingTest = false;
|
|
793
|
+
this.isRunningTest = false;
|
|
794
|
+
}
|
|
795
|
+
|
|
772
796
|
*onTestStateOpen(openTab?: MAPPING_TEST_EDITOR_TAB_TYPE): GeneratorFn<void> {
|
|
773
797
|
try {
|
|
774
798
|
// extract test basic info out into state
|
|
@@ -38,6 +38,7 @@ import {
|
|
|
38
38
|
PureSingleExecution,
|
|
39
39
|
PureMultiExecution,
|
|
40
40
|
PureExecution,
|
|
41
|
+
isStubbed_RawLambda,
|
|
41
42
|
} from '@finos/legend-graph';
|
|
42
43
|
import { ServiceTestableState } from './testable/ServiceTestableState.js';
|
|
43
44
|
import { User } from '@finos/legend-server-sdlc';
|
|
@@ -54,7 +55,7 @@ export class ServiceEditorState extends ElementEditorState {
|
|
|
54
55
|
executionState: ServiceExecutionState;
|
|
55
56
|
registrationState: ServiceRegistrationState;
|
|
56
57
|
testableState: ServiceTestableState;
|
|
57
|
-
selectedTab
|
|
58
|
+
selectedTab: SERVICE_TAB;
|
|
58
59
|
|
|
59
60
|
constructor(editorStore: EditorStore, element: PackageableElement) {
|
|
60
61
|
super(editorStore, element);
|
|
@@ -79,6 +80,12 @@ export class ServiceEditorState extends ElementEditorState {
|
|
|
79
80
|
editorStore.sdlcServerClient.features.canCreateVersion,
|
|
80
81
|
);
|
|
81
82
|
this.testableState = new ServiceTestableState(editorStore, this);
|
|
83
|
+
const query = this.executionState.serviceExecutionParameters?.query;
|
|
84
|
+
// default to execution tab if query is defined
|
|
85
|
+
this.selectedTab =
|
|
86
|
+
query && !isStubbed_RawLambda(query)
|
|
87
|
+
? SERVICE_TAB.EXECUTION
|
|
88
|
+
: SERVICE_TAB.GENERAL;
|
|
82
89
|
}
|
|
83
90
|
|
|
84
91
|
setSelectedTab(tab: SERVICE_TAB): void {
|
package/src/stores/editor/editor-state/element-editor-state/service/ServiceExecutionState.ts
CHANGED
|
@@ -34,7 +34,6 @@ import {
|
|
|
34
34
|
import {
|
|
35
35
|
DEFAULT_TYPEAHEAD_SEARCH_LIMIT,
|
|
36
36
|
DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH_LENGTH,
|
|
37
|
-
ExecutionPlanState,
|
|
38
37
|
generateExtensionUrlPattern,
|
|
39
38
|
generatePath,
|
|
40
39
|
TAB_SIZE,
|
|
@@ -94,6 +93,7 @@ import {
|
|
|
94
93
|
PARAMETER_SUBMIT_ACTION,
|
|
95
94
|
QueryBuilderTelemetryHelper,
|
|
96
95
|
QUERY_BUILDER_EVENT,
|
|
96
|
+
ExecutionPlanState,
|
|
97
97
|
} from '@finos/legend-query-builder';
|
|
98
98
|
|
|
99
99
|
enum DSL_SERVICE_PATH_PARAM_TOKEN {
|