@finos/legend-application-studio 28.15.12 → 28.16.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"ServicePostValidationEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/service-editor/ServicePostValidationEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAIV,2BAA2B,EAC5B,MAAM,mGAAmG,CAAC;AAqB3G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAkS1D,eAAO,MAAM,kBAAkB,WACrB;IACN,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,cAAc,CAAC;IAC/B,eAAe,EAAE,2BAA2B,CAAC;CAC9C;;CA6CF,CAAC;AAMF,eAAO,MAAM,4BAA4B,WAC/B;IAAE,eAAe,EAAE,2BAA2B,CAAA;CAAE;;CAqFzD,CAAC"}
1
+ {"version":3,"file":"ServicePostValidationEditor.d.ts","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/service-editor/ServicePostValidationEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAIV,2BAA2B,EAC5B,MAAM,mGAAmG,CAAC;AAuB3G,OAAO,KAAK,EACV,cAAc,EAGf,MAAM,qBAAqB,CAAC;AAmS7B,eAAO,MAAM,kBAAkB,WACrB;IACN,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,cAAc,CAAC;IAC/B,eAAe,EAAE,2BAA2B,CAAC;CAC9C;;CA8DF,CAAC;AA2EF,eAAO,MAAM,4BAA4B,WAC/B;IAAE,eAAe,EAAE,2BAA2B,CAAA;CAAE;;CAqHzD,CAAC"}
@@ -15,11 +15,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
15
  * limitations under the License.
16
16
  */
17
17
  import { observer } from 'mobx-react-lite';
18
- import { BlankPanelPlaceholder, ContextMenu, MenuContent, MenuContentItem, PURE_FunctionIcon, PanelContent, PanelFormTextField, PlusIcon, ResizablePanel, ResizablePanelGroup, ResizablePanelSplitter, ResizablePanelSplitterLine, TimesIcon, clsx, Panel, PanelHeader, PanelHeaderActions, PanelHeaderActionItem, } from '@finos/legend-art';
18
+ import { BlankPanelPlaceholder, ContextMenu, MenuContent, MenuContentItem, PURE_FunctionIcon, PanelContent, PanelFormTextField, PlusIcon, ResizablePanel, ResizablePanelGroup, ResizablePanelSplitter, ResizablePanelSplitterLine, TimesIcon, clsx, Panel, PanelHeader, PanelHeaderActions, PanelHeaderActionItem, PlayIcon, PanelTabs, } from '@finos/legend-art';
19
19
  import { forwardRef, useEffect, useState } from 'react';
20
20
  import { serviceValidation_setASsertionId, serviceValidation_setDescription, } from '../../../../stores/graph-modifier/DSL_Service_GraphModifierHelper.js';
21
21
  import { InlineLambdaEditor } from '@finos/legend-query-builder';
22
22
  import { flowResult } from 'mobx';
23
+ import { useApplicationStore } from '@finos/legend-application';
23
24
  const ServicePostValidationAssertionEditor = observer((props) => {
24
25
  const { assertionState } = props;
25
26
  const servicePostValidationState = assertionState.postValidationState.servicePostValidationState;
@@ -70,6 +71,7 @@ const PostValidationContextMenu = observer(forwardRef(function TestContainerCont
70
71
  export const PostValidationItem = observer((props) => {
71
72
  const { postValidation, validationState, idx } = props;
72
73
  const serviceEditorState = validationState.serviceEditorState;
74
+ const applicationStore = useApplicationStore();
73
75
  const isReadOnly = serviceEditorState.isReadOnly;
74
76
  const [isSelectedFromContextMenu, setIsSelectedFromContextMenu] = useState(false);
75
77
  const isActive = validationState.selectedPostValidationState?.validation ===
@@ -79,9 +81,25 @@ export const PostValidationItem = observer((props) => {
79
81
  const _delete = () => validationState.deleteValidation(postValidation);
80
82
  const onContextMenuOpen = () => setIsSelectedFromContextMenu(true);
81
83
  const onContextMenuClose = () => setIsSelectedFromContextMenu(false);
82
- return (_jsx(ContextMenu, { className: clsx('testable-test-explorer__item', {
84
+ const runVal = () => {
85
+ flowResult(validationState.runVal()).catch(applicationStore.alertUnhandledError);
86
+ };
87
+ return (_jsxs(ContextMenu, { className: clsx('testable-test-explorer__item', {
83
88
  'testable-test-explorer__item--selected-from-context-menu': !isActive && isSelectedFromContextMenu,
84
- }, { 'testable-test-explorer__item--active': isActive }), disabled: isReadOnly, content: _jsx(PostValidationContextMenu, { add: add, _delete: _delete }), menuProps: { elevation: 7 }, onOpen: onContextMenuOpen, onClose: onContextMenuClose, children: _jsx("button", { className: clsx('testable-test-explorer__item__label'), onClick: openVal, tabIndex: -1, children: _jsx("div", { className: "testable-test-explorer__item__label__text", children: `validation ${idx + 1}` }) }) }));
89
+ }, { 'testable-test-explorer__item--active': isActive }), disabled: isReadOnly, content: _jsx(PostValidationContextMenu, { add: add, _delete: _delete }), menuProps: { elevation: 7 }, onOpen: onContextMenuOpen, onClose: onContextMenuClose, children: [_jsx("button", { className: clsx('testable-test-explorer__item__label'), onClick: openVal, tabIndex: -1, children: _jsx("div", { className: "testable-test-explorer__item__label__text", children: `validation ${idx + 1}` }) }), _jsx("div", { className: "mapping-test-explorer__item__actions", children: _jsx("button", { className: "mapping-test-explorer__item__action mapping-test-explorer__run-test-btn", onClick: runVal, disabled: validationState.runningPostValidationAction.isInProgress, tabIndex: -1, title: `Validate ${idx + 1}`, children: _jsx(PlayIcon, {}) }) })] }));
90
+ });
91
+ const ServicePostValidationResultViewer = observer((props) => {
92
+ const { result } = props;
93
+ const summaryType = result.violations.result.rows.length === 0 ? 'success' : 'fail';
94
+ return (_jsxs("div", { className: `testable-test-assertion-result__summary--${summaryType}`, children: [_jsxs("div", { className: "testable-test-assertion-result__summary-main", children: ["Assertion Result Summary (", summaryType, ")"] }), _jsxs("div", { className: "testable-test-assertion-result__summary-info", children: ["Id: ", result.id] }), _jsxs("div", { className: "testable-test-assertion-result__summary-info", children: ["Message: ", result.message] }), _jsxs("div", { className: "testable-test-assertion-result__summary-info", children: ["Violations: ", result.violations.result.rows.length] }), result.violations.result.rows.map((row) => (_jsx("div", { className: `testable-test-assertion-result__summary testable-test-assertion-result__summary--${summaryType}`, children: row.values.map((value, valueIndex) => (_jsxs("div", { className: "testable-test-assertion-result__summary-info", children: [result.violations.result.columns[valueIndex], ": ", value] }, `${result.violations.result.columns[valueIndex]}-${value}`))) }, result.id)))] }));
95
+ });
96
+ const ServicePostValidationResultsViewer = observer((props) => {
97
+ const { isInProgress, results } = props;
98
+ return (_jsx("div", { className: "testable-test-assertion-result__summary", children: results
99
+ ? results.map((result) => (_jsx(ServicePostValidationResultViewer, { result: result }, result.id)))
100
+ : isInProgress
101
+ ? 'Post validation(s) running...'
102
+ : 'Run post validation(s) to see results' }));
85
103
  });
86
104
  // TOD: Currently editor is a very basic editor. Can improve with the following:
87
105
  // 1. generate parameters using the query parameters (verify that those parameter values are used for execution)
@@ -92,10 +110,24 @@ export const ServicePostValidationsEditor = observer((props) => {
92
110
  const serviceEditorState = validationState.serviceEditorState;
93
111
  const service = serviceEditorState.service;
94
112
  const isReadOnly = serviceEditorState.isReadOnly;
113
+ let POST_VALIDATION_TAB;
114
+ (function (POST_VALIDATION_TAB) {
115
+ POST_VALIDATION_TAB["SETUP"] = "SETUP";
116
+ POST_VALIDATION_TAB["ASSERTIONS"] = "ASSERTIONS";
117
+ })(POST_VALIDATION_TAB || (POST_VALIDATION_TAB = {}));
118
+ const [selectedTab, setSelectedTab] = useState(POST_VALIDATION_TAB.SETUP);
95
119
  const addPostValidation = () => validationState.addValidation();
96
120
  useEffect(() => {
97
121
  validationState.init();
98
122
  }, [validationState]);
99
- return (_jsxs("div", { className: "service-post-validation-editor", children: [_jsx(PanelHeader, { title: "Post validations" }), _jsx("div", { className: "service-test-editor__content", children: _jsxs(ResizablePanelGroup, { orientation: "vertical", children: [_jsxs(ResizablePanel, { minSize: 100, size: 300, children: [_jsxs(PanelHeader, { children: [_jsx("div", { className: "panel__header__title", children: _jsx("div", { className: "panel__header__title__label", children: "Post Validations" }) }), _jsx(PanelHeaderActions, { children: _jsx(PanelHeaderActionItem, { onClick: addPostValidation, title: "Add Post Validations", children: _jsx(PlusIcon, {}) }) })] }), _jsxs(PanelContent, { children: [service.postValidations.map((postValidation, _idx) => (_jsx(PostValidationItem, { postValidation: postValidation, validationState: validationState, idx: _idx }, postValidation.hashCode))), !service.postValidations.length && (_jsx(BlankPanelPlaceholder, { text: "Add Post Validation", onClick: addPostValidation, disabled: isReadOnly, clickActionType: "add", tooltipText: "Click to add post validation" }))] })] }), _jsx(ResizablePanelSplitter, { children: _jsx(ResizablePanelSplitterLine, { color: "var(--color-dark-grey-200)" }) }), _jsx(ResizablePanel, { children: _jsxs(Panel, { className: "service-test-editor", children: [_jsx(PanelHeader, { className: "service-test-suite-editor__header", title: "valiation", labelClassName: "service-test-suite-editor__header__title__label--tests-suites" }), _jsxs(PanelContent, { className: "service-test-editor__content", children: [validationState.selectedPostValidationState && (_jsx(ServicePostValidationEditor, { postValidationState: validationState.selectedPostValidationState })), !service.postValidations.length && (_jsx(BlankPanelPlaceholder, { text: "Add Post Validation", onClick: addPostValidation, disabled: isReadOnly, clickActionType: "add", tooltipText: "Click to add post validation" }))] })] }) })] }) })] }));
123
+ useEffect(() => {
124
+ if (validationState.runningPostValidationAction.isInProgress) {
125
+ setSelectedTab(POST_VALIDATION_TAB.ASSERTIONS);
126
+ }
127
+ }, [
128
+ validationState.runningPostValidationAction.isInProgress,
129
+ POST_VALIDATION_TAB.ASSERTIONS,
130
+ ]);
131
+ return (_jsxs("div", { className: "service-post-validation-editor", children: [_jsx(PanelHeader, { title: "Post validations" }), _jsx("div", { className: "service-test-editor__content", children: _jsxs(ResizablePanelGroup, { orientation: "vertical", children: [_jsxs(ResizablePanel, { minSize: 100, size: 300, children: [_jsxs(PanelHeader, { children: [_jsx("div", { className: "panel__header__title", children: _jsx("div", { className: "panel__header__title__label", children: "Post Validations" }) }), _jsx(PanelHeaderActions, { children: _jsx(PanelHeaderActionItem, { onClick: addPostValidation, title: "Add Post Validations", children: _jsx(PlusIcon, {}) }) })] }), _jsxs(PanelContent, { children: [service.postValidations.map((postValidation, _idx) => (_jsx(PostValidationItem, { postValidation: postValidation, validationState: validationState, idx: _idx }, postValidation.hashCode))), !service.postValidations.length && (_jsx(BlankPanelPlaceholder, { text: "Add Post Validation", onClick: addPostValidation, disabled: isReadOnly, clickActionType: "add", tooltipText: "Click to add post validation" }))] })] }), _jsx(ResizablePanelSplitter, { children: _jsx(ResizablePanelSplitterLine, { color: "var(--color-dark-grey-200)" }) }), _jsx(ResizablePanel, { children: _jsxs(Panel, { className: "service-test-editor", children: [_jsx(PanelTabs, { tabTitles: Object.keys(POST_VALIDATION_TAB), selectedTab: selectedTab, changeTheTab: (tab) => () => setSelectedTab(POST_VALIDATION_TAB[tab]), tabClassName: "panel__header__tab" }), selectedTab === POST_VALIDATION_TAB.SETUP ? (_jsxs(PanelContent, { className: "service-test-editor__content", children: [validationState.selectedPostValidationState && (_jsx(ServicePostValidationEditor, { postValidationState: validationState.selectedPostValidationState })), !service.postValidations.length && (_jsx(BlankPanelPlaceholder, { text: "Add Post Validation", onClick: addPostValidation, disabled: isReadOnly, clickActionType: "add", tooltipText: "Click to add post validation" }))] })) : null, selectedTab === POST_VALIDATION_TAB.ASSERTIONS ? (_jsx(PanelContent, { children: _jsx(ServicePostValidationResultsViewer, { isInProgress: validationState.runningPostValidationAction.isInProgress, results: validationState.postValidationAssertionResults }) })) : null] }) })] }) })] }));
100
132
  });
101
133
  //# sourceMappingURL=ServicePostValidationEditor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ServicePostValidationEditor.js","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/service-editor/ServicePostValidationEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAO3C,OAAO,EACL,qBAAqB,EACrB,WAAW,EACX,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,m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GAAG,GAC1C,EACzB,KAAC,cAAc,cACb,MAAC,KAAK,IAAC,SAAS,EAAC,qBAAqB,aACpC,KAAC,WAAW,IACV,SAAS,EAAC,mCAAmC,EAC7C,KAAK,EAAC,WAAW,EACjB,cAAc,EAAC,+DAA+D,GAC9E,EACF,MAAC,YAAY,IAAC,SAAS,EAAC,8BAA8B,aACnD,eAAe,CAAC,2BAA2B,IAAI,CAC9C,KAAC,2BAA2B,IAC1B,mBAAmB,EACjB,eAAe,CAAC,2BAA2B,GAE7C,CACH,EACA,CAAC,OAAO,CAAC,eAAe,CAAC,MAAM,IAAI,CAClC,KAAC,qBAAqB,IACpB,IAAI,EAAC,qBAAqB,EAC1B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,UAAU,EACpB,eAAe,EAAC,KAAK,EACrB,WAAW,EAAC,8BAA8B,GAC1C,CACH,IACY,IACT,GACO,IACG,GAClB,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
1
+ {"version":3,"file":"ServicePostValidationEditor.js","sourceRoot":"","sources":["../../../../../src/components/editor/editor-group/service-editor/ServicePostValidationEditor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAO3C,OAAO,EACL,qBAAqB,EACrB,WAAW,EACX,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,mBAAmB,EACnB,sBAAsB,EACtB,0BAA0B,EAC1B,SAAS,EACT,IAAI,EACJ,KAAK,EACL,WAAW,EACX,kBAAkB,EAClB,qBAAqB,EACrB,QAAQ,EACR,SAAS,GACV,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EACL,gCAAgC,EAChC,gCAAgC,GACjC,MAAM,sEAAsE,CAAC;AAC9E,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AAE,CAAC,GAAG,EAAE,CAC1B,cAAc,CACZ,mBAAmB,CACjB,GAAuC,CACxC,CACF,EAEH,YAAY,EAAC,oBAAoB,GACjC,EACD,WAAW,KAAK,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,CAC3C,MAAC,YAAY,IAAC,SAAS,EAAC,8BAA8B,aACnD,eAAe,CAAC,2BAA2B,IAAI,CAC9C,KAAC,2BAA2B,IAC1B,mBAAmB,EACjB,eAAe,CAAC,2BAA2B,GAE7C,CACH,EACA,CAAC,OAAO,CAAC,eAAe,CAAC,MAAM,IAAI,CAClC,KAAC,qBAAqB,IACpB,IAAI,EAAC,qBAAqB,EAC1B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,UAAU,EACpB,eAAe,EAAC,KAAK,EACrB,WAAW,EAAC,8BAA8B,GAC1C,CACH,IACY,CAChB,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,KAAK,mBAAmB,CAAC,UAAU,CAAC,CAAC,CAAC,CAChD,KAAC,YAAY,cACX,KAAC,kCAAkC,IACjC,YAAY,EACV,eAAe,CAAC,2BAA2B,CAAC,YAAY,EAE1D,OAAO,EAAE,eAAe,CAAC,8BAA8B,GACvD,GACW,CAChB,CAAC,CAAC,CAAC,IAAI,IACF,GACO,IACG,GAClB,IACF,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
package/lib/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /** @license @finos/legend-application-studio v28.15.12
1
+ /** @license @finos/legend-application-studio v28.16.0
2
2
  * Copyright (c) 2020-present, Goldman Sachs
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-application-studio",
3
- "version": "28.15.12",
3
+ "version": "28.16.0",
4
4
  "description": "Legend Studio application core",
5
5
  "keywords": [
6
6
  "legend",
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { type Service, PostValidation, PostValidationAssertion, RawLambda } from '@finos/legend-graph';
16
+ import { type Service, PostValidation, PostValidationAssertion, RawLambda, type PostValidationAssertionResult } from '@finos/legend-graph';
17
17
  import type { ServiceEditorState } from './ServiceEditorState.js';
18
18
  import type { EditorStore } from '../../../EditorStore.js';
19
19
  import { LambdaEditorState } from '@finos/legend-query-builder';
@@ -69,6 +69,8 @@ export declare class ServicePostValidationsState {
69
69
  readonly serviceEditorState: ServiceEditorState;
70
70
  readonly editorStore: EditorStore;
71
71
  selectedPostValidationState: PostValidationState | undefined;
72
+ runningPostValidationAction: ActionState;
73
+ postValidationAssertionResults: PostValidationAssertionResult[] | undefined;
72
74
  constructor(serviceEditorState: ServiceEditorState);
73
75
  get service(): Service;
74
76
  get postValidations(): PostValidation[];
@@ -77,5 +79,7 @@ export declare class ServicePostValidationsState {
77
79
  deleteValidation(validation: PostValidation): void;
78
80
  addValidation(): void;
79
81
  changeValidation(validation: PostValidation): void;
82
+ fetchValidationResult(): Promise<PostValidationAssertionResult[]>;
83
+ runVal(): GeneratorFn<void>;
80
84
  }
81
85
  //# sourceMappingURL=ServicePostValidationState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ServicePostValidationState.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,OAAO,EAIZ,cAAc,EACd,uBAAuB,EACvB,SAAS,EAGV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAUlE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EACL,iBAAiB,EAElB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,KAAK,WAAW,EAIhB,WAAW,EACZ,MAAM,sBAAsB,CAAC;AAE9B,q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AmB;IAC9B,QAAQ,CAAC,0BAA0B,EAAE,2BAA2B,CAAC;IACjE,UAAU,EAAE,cAAc,CAAC;IAC3B,eAAe,EAAE,4BAA4B,EAAE,CAAM;IACrD,eAAe,EAAE,4BAA4B,EAAE,CAAM;IACrD,iCAAiC,cAAwB;IACzD,iCAAiC,cAAwB;gBAGvD,UAAU,EAAE,cAAc,EAC1B,0BAA0B,EAAE,2BAA2B;IA2BzD,IAAI,cAAc,IAAI,OAAO,CAE5B;IAED,IAAI,yBAAyB,IAAI,OAAO,CAKvC;IAED,mBAAmB,IAAI,IAAI;IAW1B,wBAAwB,IAAI,WAAW,CAAC,IAAI,CAAC;IAsC7C,uBAAuB,IAAI,WAAW,CAAC,IAAI,CAAC;IAgC5C,YAAY,IAAI,WAAW,CAAC,IAAI,CAAC;IAmBlC,WAAW,CAAC,UAAU,EAAE,4BAA4B,GAAG,IAAI;IAS1D,YAAY,IAAI,WAAW,CAAC,IAAI,CAAC;IAuBlC,eAAe,CAAC,SAAS,EAAE,uBAAuB,GAAG,IAAI;CAS1D;AAED,qBAAa,2BAA2B;IACtC,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAChD,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,2BAA2B,EAAE,mBAAmB,GAAG,SAAS,CAAC;gBAEjD,kBAAkB,EAAE,kBAAkB;IAclD,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,eAAe,IAAI,cAAc,EAAE,CAEtC;IAED,IAAI,IAAI,IAAI;IAaZ,wBAAwB,CAAC,UAAU,EAAE,cAAc,GAAG,mBAAmB;IAIzE,gBAAgB,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI;IAKlD,aAAa,IAAI,IAAI;IASrB,gBAAgB,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI;CAInD"}
1
+ {"version":3,"file":"ServicePostValidationState.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/service/ServicePostVal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IAC7D,2BAA2B,cAAwB;IACnD,8BAA8B,EAAE,6BAA6B,EAAE,GAAG,SAAS,CAAC;gBAEhE,kBAAkB,EAAE,kBAAkB;IAgBlD,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,eAAe,IAAI,cAAc,EAAE,CAEtC;IAED,IAAI,IAAI,IAAI;IAaZ,wBAAwB,CAAC,UAAU,EAAE,cAAc,GAAG,mBAAmB;IAIzE,gBAAgB,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI;IAKlD,aAAa,IAAI,IAAI;IASrB,gBAAgB,CAAC,UAAU,EAAE,cAAc,GAAG,IAAI;IAM5C,qBAAqB,IAAI,OAAO,CAAC,6BAA6B,EAAE,CAAC;IAuBtE,MAAM,IAAI,WAAW,CAAC,IAAI,CAAC;CAgB7B"}
@@ -17,7 +17,7 @@ import { GRAPH_MANAGER_EVENT, LAMBDA_PIPE, ParserError, PostValidation, PostVali
17
17
  import { serviceValidation_addAssertion, serviceValidation_addParam, serviceValidation_deleteAssertion, serviceValidation_deleteParam, service_addValidation, service_deleteValidation, } from '../../../../graph-modifier/DSL_Service_GraphModifierHelper.js';
18
18
  import { action, flow, flowResult, makeObservable, observable } from 'mobx';
19
19
  import { LambdaEditorState, buildDefaultEmptyStringRawLambda, } from '@finos/legend-query-builder';
20
- import { assertErrorThrown, LogEvent, generateEnumerableNameFromToken, ActionState, } from '@finos/legend-shared';
20
+ import { assertErrorThrown, LogEvent, generateEnumerableNameFromToken, ActionState, guaranteeNonNullable, } from '@finos/legend-shared';
21
21
  export class PostValidationAssertionState extends LambdaEditorState {
22
22
  editorStore;
23
23
  postValidationState;
@@ -280,14 +280,18 @@ export class ServicePostValidationsState {
280
280
  serviceEditorState;
281
281
  editorStore;
282
282
  selectedPostValidationState;
283
+ runningPostValidationAction = ActionState.create();
284
+ postValidationAssertionResults;
283
285
  constructor(serviceEditorState) {
284
286
  makeObservable(this, {
285
287
  selectedPostValidationState: observable,
288
+ postValidationAssertionResults: observable,
286
289
  init: action,
287
290
  buildPostValidationState: action,
288
291
  addValidation: action,
289
292
  deleteValidation: action,
290
293
  changeValidation: action,
294
+ runVal: flow,
291
295
  });
292
296
  this.serviceEditorState = serviceEditorState;
293
297
  this.editorStore = serviceEditorState.editorStore;
@@ -329,5 +333,29 @@ export class ServicePostValidationsState {
329
333
  this.selectedPostValidationState =
330
334
  this.buildPostValidationState(validation);
331
335
  }
336
+ // Fetches validation results. Caller of validation should catch the error
337
+ async fetchValidationResult() {
338
+ const validation = guaranteeNonNullable(this.selectedPostValidationState?.validation);
339
+ return Promise.all(validation.assertions.map(async (assertion) => {
340
+ const assertionId = guaranteeNonNullable(assertion.id);
341
+ const testResults = await this.editorStore.graphManagerState.graphManager
342
+ .runServicePostValidations(this.service, this.editorStore.graphManagerState.graph, assertionId)
343
+ .then((data) => data);
344
+ return guaranteeNonNullable(testResults);
345
+ }));
346
+ }
347
+ *runVal() {
348
+ try {
349
+ this.runningPostValidationAction.inProgress();
350
+ this.postValidationAssertionResults = undefined;
351
+ this.postValidationAssertionResults = (yield flowResult(this.fetchValidationResult()));
352
+ this.runningPostValidationAction.complete();
353
+ }
354
+ catch (error) {
355
+ assertErrorThrown(error);
356
+ this.editorStore.applicationStore.notificationService.notifyError(`Error running validation: ${error.message}`);
357
+ this.runningPostValidationAction.fail();
358
+ }
359
+ }
332
360
  }
333
361
  //# sourceMappingURL=ServicePostValidationState.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ServicePostValidationState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,cAAc,EACd,uBAAuB,EACvB,SAAS,EACT,mBAAmB,EACnB,cAAc,GACf,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,8BAA8B,EAC9B,0BAA0B,EAC1B,iCAAiC,EACjC,6BA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,CAAC,UAAU,CAAC,EAAE;YAC7D,MAAM,UAAU,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;YACtE,IAAI,UAAU,EAAE;gBACd,IAAI,CAAC,2BAA2B;oBAC9B,IAAI,CAAC,wBAAwB,CAAC,UAAU,CAAC,CAAC;aAC7C;iBAAM;gBACL,IAAI,CAAC,2BAA2B,GAAG,SAAS,CAAC;aAC9C;SACF;IACH,CAAC;IAED,wBAAwB,CAAC,UAA0B;QACjD,OAAO,IAAI,mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IACnD,CAAC;IAED,gBAAgB,CAAC,UAA0B;QACzC,wBAAwB,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QACtE,IAAI,CAAC,IAAI,EAAE,CAAC;IACd,CAAC;IAED,aAAa;QACX,MAAM,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;QACjC,GAAG,CAAC,WAAW,GAAG,8BAChB,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,CAChC,EAAE,CAAC;QACH,qBAAqB,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAC5D,IAAI,CAAC,2BAA2B,GAAG,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAC;IACxE,CAAC;IAED,gBAAgB,CAAC,UAA0B;QACzC,IAAI,CAAC,2BAA2B;YAC9B,IAAI,CAAC,wBAAwB,CAAC,UAAU,CAAC,CAAC;IAC9C,CAAC;CACF"}
1
+ {"version":3,"file":"ServicePostValidationState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/service/ServicePostValidationState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,cAAc,EACd,uBAAuB,EACvB,SAAS,EACT,mBAAm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/legend-application-studio",
3
- "version": "28.15.12",
3
+ "version": "28.16.0",
4
4
  "description": "Legend Studio application core",
5
5
  "keywords": [
6
6
  "legend",
@@ -45,11 +45,11 @@
45
45
  "test:watch": "jest --watch"
46
46
  },
47
47
  "dependencies": {
48
- "@finos/legend-application": "15.0.70",
49
- "@finos/legend-art": "7.1.22",
50
- "@finos/legend-graph": "31.8.7",
51
- "@finos/legend-lego": "1.2.12",
52
- "@finos/legend-query-builder": "4.14.12",
48
+ "@finos/legend-application": "15.0.71",
49
+ "@finos/legend-art": "7.1.23",
50
+ "@finos/legend-graph": "31.9.0",
51
+ "@finos/legend-lego": "1.2.13",
52
+ "@finos/legend-query-builder": "4.14.13",
53
53
  "@finos/legend-server-depot": "6.0.36",
54
54
  "@finos/legend-server-sdlc": "5.3.8",
55
55
  "@finos/legend-server-showcase": "0.2.5",
@@ -40,8 +40,14 @@ import {
40
40
  PanelHeader,
41
41
  PanelHeaderActions,
42
42
  PanelHeaderActionItem,
43
+ PlayIcon,
44
+ PanelTabs,
43
45
  } from '@finos/legend-art';
44
- import type { PostValidation } from '@finos/legend-graph';
46
+ import type {
47
+ PostValidation,
48
+ PostValidationAssertionResult,
49
+ PostValidationViolationsResultRow,
50
+ } from '@finos/legend-graph';
45
51
  import { forwardRef, useEffect, useState } from 'react';
46
52
  import {
47
53
  serviceValidation_setASsertionId,
@@ -49,6 +55,7 @@ import {
49
55
  } from '../../../../stores/graph-modifier/DSL_Service_GraphModifierHelper.js';
50
56
  import { InlineLambdaEditor } from '@finos/legend-query-builder';
51
57
  import { flowResult } from 'mobx';
58
+ import { useApplicationStore } from '@finos/legend-application';
52
59
 
53
60
  const ServicePostValidationAssertionEditor = observer(
54
61
  (props: { assertionState: PostValidationAssertionState }) => {
@@ -339,6 +346,7 @@ export const PostValidationItem = observer(
339
346
  }) => {
340
347
  const { postValidation, validationState, idx } = props;
341
348
  const serviceEditorState = validationState.serviceEditorState;
349
+ const applicationStore = useApplicationStore();
342
350
  const isReadOnly = serviceEditorState.isReadOnly;
343
351
  const [isSelectedFromContextMenu, setIsSelectedFromContextMenu] =
344
352
  useState(false);
@@ -353,6 +361,11 @@ export const PostValidationItem = observer(
353
361
  validationState.deleteValidation(postValidation);
354
362
  const onContextMenuOpen = (): void => setIsSelectedFromContextMenu(true);
355
363
  const onContextMenuClose = (): void => setIsSelectedFromContextMenu(false);
364
+ const runVal = (): void => {
365
+ flowResult(validationState.runVal()).catch(
366
+ applicationStore.alertUnhandledError,
367
+ );
368
+ };
356
369
  return (
357
370
  <ContextMenu
358
371
  className={clsx(
@@ -378,11 +391,91 @@ export const PostValidationItem = observer(
378
391
  {`validation ${idx + 1}`}
379
392
  </div>
380
393
  </button>
394
+ <div className="mapping-test-explorer__item__actions">
395
+ <button
396
+ className="mapping-test-explorer__item__action mapping-test-explorer__run-test-btn"
397
+ onClick={runVal}
398
+ disabled={validationState.runningPostValidationAction.isInProgress}
399
+ tabIndex={-1}
400
+ title={`Validate ${idx + 1}`}
401
+ >
402
+ {<PlayIcon />}
403
+ </button>
404
+ </div>
381
405
  </ContextMenu>
382
406
  );
383
407
  },
384
408
  );
385
409
 
410
+ const ServicePostValidationResultViewer = observer(
411
+ (props: { result: PostValidationAssertionResult }) => {
412
+ const { result } = props;
413
+
414
+ const summaryType =
415
+ result.violations.result.rows.length === 0 ? 'success' : 'fail';
416
+
417
+ return (
418
+ <div
419
+ className={`testable-test-assertion-result__summary--${summaryType}`}
420
+ >
421
+ <div className="testable-test-assertion-result__summary-main">
422
+ Assertion Result Summary ({summaryType})
423
+ </div>
424
+ <div className="testable-test-assertion-result__summary-info">
425
+ Id: {result.id}
426
+ </div>
427
+ <div className="testable-test-assertion-result__summary-info">
428
+ Message: {result.message}
429
+ </div>
430
+ <div className="testable-test-assertion-result__summary-info">
431
+ Violations: {result.violations.result.rows.length}
432
+ </div>
433
+ {result.violations.result.rows.map(
434
+ (row: PostValidationViolationsResultRow) => (
435
+ <div
436
+ key={result.id}
437
+ className={`testable-test-assertion-result__summary testable-test-assertion-result__summary--${summaryType}`}
438
+ >
439
+ {row.values.map((value, valueIndex) => (
440
+ <div
441
+ key={`${result.violations.result.columns[valueIndex]}-${value}`}
442
+ className="testable-test-assertion-result__summary-info"
443
+ >
444
+ {result.violations.result.columns[valueIndex]}: {value}
445
+ </div>
446
+ ))}
447
+ </div>
448
+ ),
449
+ )}
450
+ </div>
451
+ );
452
+ },
453
+ );
454
+
455
+ const ServicePostValidationResultsViewer = observer(
456
+ (props: {
457
+ isInProgress: boolean;
458
+ results: PostValidationAssertionResult[] | undefined;
459
+ }) => {
460
+ const { isInProgress, results } = props;
461
+
462
+ return (
463
+ <div className="testable-test-assertion-result__summary">
464
+ {results
465
+ ? results.map((result) => (
466
+ <ServicePostValidationResultViewer
467
+ key={result.id}
468
+ result={result}
469
+ />
470
+ ))
471
+ : isInProgress
472
+ ? 'Post validation(s) running...'
473
+ : 'Run post validation(s) to see results'}
474
+ </div>
475
+ );
476
+ },
477
+ );
478
+
386
479
  // TOD: Currently editor is a very basic editor. Can improve with the following:
387
480
  // 1. generate parameters using the query parameters (verify that those parameter values are used for execution)
388
481
  // most likely the parameter values should be consistent with other parameter value shapes such as service tests
@@ -393,10 +486,23 @@ export const ServicePostValidationsEditor = observer(
393
486
  const serviceEditorState = validationState.serviceEditorState;
394
487
  const service = serviceEditorState.service;
395
488
  const isReadOnly = serviceEditorState.isReadOnly;
489
+ enum POST_VALIDATION_TAB {
490
+ SETUP = 'SETUP',
491
+ ASSERTIONS = 'ASSERTIONS',
492
+ }
493
+ const [selectedTab, setSelectedTab] = useState(POST_VALIDATION_TAB.SETUP);
396
494
  const addPostValidation = (): void => validationState.addValidation();
397
495
  useEffect(() => {
398
496
  validationState.init();
399
497
  }, [validationState]);
498
+ useEffect(() => {
499
+ if (validationState.runningPostValidationAction.isInProgress) {
500
+ setSelectedTab(POST_VALIDATION_TAB.ASSERTIONS);
501
+ }
502
+ }, [
503
+ validationState.runningPostValidationAction.isInProgress,
504
+ POST_VALIDATION_TAB.ASSERTIONS,
505
+ ]);
400
506
  return (
401
507
  <div className="service-post-validation-editor">
402
508
  <PanelHeader title="Post validations" />
@@ -443,29 +549,48 @@ export const ServicePostValidationsEditor = observer(
443
549
  </ResizablePanelSplitter>
444
550
  <ResizablePanel>
445
551
  <Panel className="service-test-editor">
446
- <PanelHeader
447
- className="service-test-suite-editor__header"
448
- title="valiation"
449
- labelClassName="service-test-suite-editor__header__title__label--tests-suites"
552
+ <PanelTabs
553
+ tabTitles={Object.keys(POST_VALIDATION_TAB)}
554
+ selectedTab={selectedTab}
555
+ changeTheTab={(tab) => () =>
556
+ setSelectedTab(
557
+ POST_VALIDATION_TAB[
558
+ tab as keyof typeof POST_VALIDATION_TAB
559
+ ],
560
+ )
561
+ }
562
+ tabClassName="panel__header__tab"
450
563
  />
451
- <PanelContent className="service-test-editor__content">
452
- {validationState.selectedPostValidationState && (
453
- <ServicePostValidationEditor
454
- postValidationState={
455
- validationState.selectedPostValidationState
564
+ {selectedTab === POST_VALIDATION_TAB.SETUP ? (
565
+ <PanelContent className="service-test-editor__content">
566
+ {validationState.selectedPostValidationState && (
567
+ <ServicePostValidationEditor
568
+ postValidationState={
569
+ validationState.selectedPostValidationState
570
+ }
571
+ />
572
+ )}
573
+ {!service.postValidations.length && (
574
+ <BlankPanelPlaceholder
575
+ text="Add Post Validation"
576
+ onClick={addPostValidation}
577
+ disabled={isReadOnly}
578
+ clickActionType="add"
579
+ tooltipText="Click to add post validation"
580
+ />
581
+ )}
582
+ </PanelContent>
583
+ ) : null}
584
+ {selectedTab === POST_VALIDATION_TAB.ASSERTIONS ? (
585
+ <PanelContent>
586
+ <ServicePostValidationResultsViewer
587
+ isInProgress={
588
+ validationState.runningPostValidationAction.isInProgress
456
589
  }
590
+ results={validationState.postValidationAssertionResults}
457
591
  />
458
- )}
459
- {!service.postValidations.length && (
460
- <BlankPanelPlaceholder
461
- text="Add Post Validation"
462
- onClick={addPostValidation}
463
- disabled={isReadOnly}
464
- clickActionType="add"
465
- tooltipText="Click to add post validation"
466
- />
467
- )}
468
- </PanelContent>
592
+ </PanelContent>
593
+ ) : null}
469
594
  </Panel>
470
595
  </ResizablePanel>
471
596
  </ResizablePanelGroup>
@@ -24,6 +24,7 @@ import {
24
24
  RawLambda,
25
25
  isStubbed_RawLambda,
26
26
  stub_RawLambda,
27
+ type PostValidationAssertionResult,
27
28
  } from '@finos/legend-graph';
28
29
  import type { ServiceEditorState } from './ServiceEditorState.js';
29
30
  import {
@@ -46,6 +47,7 @@ import {
46
47
  LogEvent,
47
48
  generateEnumerableNameFromToken,
48
49
  ActionState,
50
+ guaranteeNonNullable,
49
51
  } from '@finos/legend-shared';
50
52
 
51
53
  export class PostValidationAssertionState extends LambdaEditorState {
@@ -432,15 +434,19 @@ export class ServicePostValidationsState {
432
434
  readonly serviceEditorState: ServiceEditorState;
433
435
  readonly editorStore: EditorStore;
434
436
  selectedPostValidationState: PostValidationState | undefined;
437
+ runningPostValidationAction = ActionState.create();
438
+ postValidationAssertionResults: PostValidationAssertionResult[] | undefined;
435
439
 
436
440
  constructor(serviceEditorState: ServiceEditorState) {
437
441
  makeObservable(this, {
438
442
  selectedPostValidationState: observable,
443
+ postValidationAssertionResults: observable,
439
444
  init: action,
440
445
  buildPostValidationState: action,
441
446
  addValidation: action,
442
447
  deleteValidation: action,
443
448
  changeValidation: action,
449
+ runVal: flow,
444
450
  });
445
451
  this.serviceEditorState = serviceEditorState;
446
452
  this.editorStore = serviceEditorState.editorStore;
@@ -490,4 +496,45 @@ export class ServicePostValidationsState {
490
496
  this.selectedPostValidationState =
491
497
  this.buildPostValidationState(validation);
492
498
  }
499
+
500
+ // Fetches validation results. Caller of validation should catch the error
501
+ async fetchValidationResult(): Promise<PostValidationAssertionResult[]> {
502
+ const validation = guaranteeNonNullable(
503
+ this.selectedPostValidationState?.validation,
504
+ );
505
+
506
+ return Promise.all(
507
+ validation.assertions.map(async (assertion) => {
508
+ const assertionId = guaranteeNonNullable(assertion.id);
509
+
510
+ const testResults =
511
+ await this.editorStore.graphManagerState.graphManager
512
+ .runServicePostValidations(
513
+ this.service,
514
+ this.editorStore.graphManagerState.graph,
515
+ assertionId,
516
+ )
517
+ .then((data: PostValidationAssertionResult) => data);
518
+
519
+ return guaranteeNonNullable(testResults);
520
+ }),
521
+ );
522
+ }
523
+
524
+ *runVal(): GeneratorFn<void> {
525
+ try {
526
+ this.runningPostValidationAction.inProgress();
527
+ this.postValidationAssertionResults = undefined;
528
+ this.postValidationAssertionResults = (yield flowResult(
529
+ this.fetchValidationResult(),
530
+ )) as PostValidationAssertionResult[];
531
+ this.runningPostValidationAction.complete();
532
+ } catch (error) {
533
+ assertErrorThrown(error);
534
+ this.editorStore.applicationStore.notificationService.notifyError(
535
+ `Error running validation: ${error.message}`,
536
+ );
537
+ this.runningPostValidationAction.fail();
538
+ }
539
+ }
493
540
  }