@finos/legend-application-studio 28.21.31 → 28.21.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/__lib__/LegendStudioApplicationNavigationContext.d.ts +2 -1
- package/lib/__lib__/LegendStudioApplicationNavigationContext.d.ts.map +1 -1
- package/lib/__lib__/LegendStudioApplicationNavigationContext.js +1 -0
- package/lib/__lib__/LegendStudioApplicationNavigationContext.js.map +1 -1
- package/lib/components/ElementIconUtils.d.ts.map +1 -1
- package/lib/components/ElementIconUtils.js +2 -0
- package/lib/components/ElementIconUtils.js.map +1 -1
- package/lib/components/editor/availability-editor.css +1 -0
- package/lib/components/editor/availability-editor.css.map +1 -0
- package/lib/components/editor/editor-group/EditorGroup.d.ts.map +1 -1
- package/lib/components/editor/editor-group/EditorGroup.js +5 -0
- package/lib/components/editor/editor-group/EditorGroup.js.map +1 -1
- package/lib/components/editor/editor-group/availability/AvailabilityEditor.d.ts +19 -0
- package/lib/components/editor/editor-group/availability/AvailabilityEditor.d.ts.map +1 -0
- package/lib/components/editor/editor-group/availability/AvailabilityEditor.js +50 -0
- package/lib/components/editor/editor-group/availability/AvailabilityEditor.js.map +1 -0
- package/lib/components/editor/editor-group/availability/testable/AvailabilityTestableEditor.d.ts +22 -0
- package/lib/components/editor/editor-group/availability/testable/AvailabilityTestableEditor.d.ts.map +1 -0
- package/lib/components/editor/editor-group/availability/testable/AvailabilityTestableEditor.js +205 -0
- package/lib/components/editor/editor-group/availability/testable/AvailabilityTestableEditor.js.map +1 -0
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.d.ts +5 -0
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.d.ts.map +1 -1
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.js +1 -1
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.js.map +1 -1
- package/lib/components/editor/panel-group/DevToolPanel.d.ts.map +1 -1
- package/lib/components/editor/panel-group/DevToolPanel.js +27 -24
- package/lib/components/editor/panel-group/DevToolPanel.js.map +1 -1
- package/lib/components/extensions/Core_LegendStudioApplicationPlugin.d.ts.map +1 -1
- package/lib/components/extensions/Core_LegendStudioApplicationPlugin.js +1 -0
- package/lib/components/extensions/Core_LegendStudioApplicationPlugin.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/EditorGraphState.d.ts.map +1 -1
- package/lib/stores/editor/EditorGraphState.js +4 -1
- package/lib/stores/editor/EditorGraphState.js.map +1 -1
- package/lib/stores/editor/EditorTabManagerState.d.ts.map +1 -1
- package/lib/stores/editor/EditorTabManagerState.js +5 -1
- package/lib/stores/editor/EditorTabManagerState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/availability/AvailabilityEditorState.d.ts +32 -0
- package/lib/stores/editor/editor-state/element-editor-state/availability/AvailabilityEditorState.d.ts.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/availability/AvailabilityEditorState.js +46 -0
- package/lib/stores/editor/editor-state/element-editor-state/availability/AvailabilityEditorState.js.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.d.ts +111 -0
- package/lib/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.d.ts.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.js +425 -0
- package/lib/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.js.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.d.ts +3 -0
- 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 +8 -2
- package/lib/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.js.map +1 -1
- package/lib/stores/editor/utils/ModelClassifierUtils.d.ts +2 -1
- package/lib/stores/editor/utils/ModelClassifierUtils.d.ts.map +1 -1
- package/lib/stores/editor/utils/ModelClassifierUtils.js +1 -0
- package/lib/stores/editor/utils/ModelClassifierUtils.js.map +1 -1
- package/package.json +12 -12
- package/src/__lib__/LegendStudioApplicationNavigationContext.ts +1 -0
- package/src/components/ElementIconUtils.tsx +2 -0
- package/src/components/editor/editor-group/EditorGroup.tsx +4 -0
- package/src/components/editor/editor-group/availability/AvailabilityEditor.tsx +114 -0
- package/src/components/editor/editor-group/availability/testable/AvailabilityTestableEditor.tsx +829 -0
- package/src/components/editor/editor-group/testable/TestableSharedComponents.tsx +1 -1
- package/src/components/editor/panel-group/DevToolPanel.tsx +61 -60
- package/src/components/extensions/Core_LegendStudioApplicationPlugin.tsx +1 -0
- package/src/stores/editor/EditorGraphState.ts +3 -0
- package/src/stores/editor/EditorTabManagerState.ts +4 -0
- package/src/stores/editor/editor-state/element-editor-state/availability/AvailabilityEditorState.ts +56 -0
- package/src/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.ts +631 -0
- package/src/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.ts +13 -3
- package/src/stores/editor/utils/ModelClassifierUtils.ts +1 -0
- package/tsconfig.json +4 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditorTabManagerState.js","sourceRoot":"","sources":["../../../src/stores/editor/EditorTabManagerState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,WAAW,EACX,KAAK,EACL,0BAA0B,EAC1B,QAAQ,EACR,WAAW,EACX,WAAW,EACX,2BAA2B,EAC3B,QAAQ,EACR,uBAAuB,EACvB,OAAO,EACP,OAAO,EACP,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,OAAO,EACP,OAAO,EACP,kCAAkC,EAClC,YAAY,EACZ,eAAe,EACf,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,cAAc,
|
|
1
|
+
{"version":3,"file":"EditorTabManagerState.js","sourceRoot":"","sources":["../../../src/stores/editor/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GAA4B,EAC5B,cAAkC,EACT,EAAE;QAC3B,IAAI,GAAG,EAAE,CAAC;YACR,OAAO,GAAG,CAAC;QACb,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CACnB,CAAC,WAAW,EAAE,EAAE,CACd,WAAW,YAAY,kBAAkB;gBACzC,WAAW,CAAC,WAAW,KAAK,cAAc,CAC7C,CAAC;QACJ,CAAC;IACH,CAAC,CAAC;CACH"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { type PackageableElement, Availability } from '@finos/legend-graph';
|
|
17
|
+
import type { EditorStore } from '../../../EditorStore.js';
|
|
18
|
+
import { ElementEditorState } from '../ElementEditorState.js';
|
|
19
|
+
import { AvailabilityTestableState } from './testable/AvailabilityTestableState.js';
|
|
20
|
+
export declare enum AVAILABILITY_TAB {
|
|
21
|
+
DEFINITION = "Definition",
|
|
22
|
+
TESTING = "Testing"
|
|
23
|
+
}
|
|
24
|
+
export declare class AvailabilityEditorState extends ElementEditorState {
|
|
25
|
+
activeTab: AVAILABILITY_TAB;
|
|
26
|
+
readonly testableState: AvailabilityTestableState;
|
|
27
|
+
constructor(editorStore: EditorStore, element: PackageableElement);
|
|
28
|
+
get availability(): Availability;
|
|
29
|
+
setActiveTab(tab: AVAILABILITY_TAB): void;
|
|
30
|
+
reprocess(newElement: PackageableElement, editorStore: EditorStore): ElementEditorState;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=AvailabilityEditorState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvailabilityEditorState.d.ts","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/availability/AvailabilityEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,kBAAkB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAG5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAEpF,oBAAY,gBAAgB;IAC1B,UAAU,eAAe;IACzB,OAAO,YAAY;CACpB;AAED,qBAAa,uBAAwB,SAAQ,kBAAkB;IAC7D,SAAS,mBAA+B;IACxC,QAAQ,CAAC,aAAa,4BAAuC;gBAEjD,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB;IASjE,IAAI,YAAY,IAAI,YAAY,CAE/B;IAED,YAAY,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI;IAIhC,SAAS,CAChB,UAAU,EAAE,kBAAkB,EAC9B,WAAW,EAAE,WAAW,GACvB,kBAAkB;CAGtB"}
|
package/lib/stores/editor/editor-state/element-editor-state/availability/AvailabilityEditorState.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Availability } from '@finos/legend-graph';
|
|
17
|
+
import { guaranteeType } from '@finos/legend-shared';
|
|
18
|
+
import { action, makeObservable, observable } from 'mobx';
|
|
19
|
+
import { ElementEditorState } from '../ElementEditorState.js';
|
|
20
|
+
import { AvailabilityTestableState } from './testable/AvailabilityTestableState.js';
|
|
21
|
+
export var AVAILABILITY_TAB;
|
|
22
|
+
(function (AVAILABILITY_TAB) {
|
|
23
|
+
AVAILABILITY_TAB["DEFINITION"] = "Definition";
|
|
24
|
+
AVAILABILITY_TAB["TESTING"] = "Testing";
|
|
25
|
+
})(AVAILABILITY_TAB || (AVAILABILITY_TAB = {}));
|
|
26
|
+
export class AvailabilityEditorState extends ElementEditorState {
|
|
27
|
+
activeTab = AVAILABILITY_TAB.DEFINITION;
|
|
28
|
+
testableState = new AvailabilityTestableState(this);
|
|
29
|
+
constructor(editorStore, element) {
|
|
30
|
+
super(editorStore, element);
|
|
31
|
+
makeObservable(this, {
|
|
32
|
+
activeTab: observable,
|
|
33
|
+
setActiveTab: action,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
get availability() {
|
|
37
|
+
return guaranteeType(this.element, Availability);
|
|
38
|
+
}
|
|
39
|
+
setActiveTab(tab) {
|
|
40
|
+
this.activeTab = tab;
|
|
41
|
+
}
|
|
42
|
+
reprocess(newElement, editorStore) {
|
|
43
|
+
return new AvailabilityEditorState(editorStore, newElement);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=AvailabilityEditorState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvailabilityEditorState.js","sourceRoot":"","sources":["../../../../../../src/stores/editor/editor-state/element-editor-state/availability/AvailabilityEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAA2B,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAEpF,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,6CAAyB,CAAA;IACzB,uCAAmB,CAAA;AACrB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAED,MAAM,OAAO,uBAAwB,SAAQ,kBAAkB;IAC7D,SAAS,GAAG,gBAAgB,CAAC,UAAU,CAAC;IAC/B,aAAa,GAAG,IAAI,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAE7D,YAAY,WAAwB,EAAE,OAA2B;QAC/D,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAE5B,cAAc,CAAC,IAAI,EAAE;YACnB,SAAS,EAAE,UAAU;YACrB,YAAY,EAAE,MAAM;SACrB,CAAC,CAAC;IACL,CAAC;IAED,IAAI,YAAY;QACd,OAAO,aAAa,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IACnD,CAAC;IAED,YAAY,CAAC,GAAqB;QAChC,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC;IACvB,CAAC;IAEQ,SAAS,CAChB,UAA8B,EAC9B,WAAwB;QAExB,OAAO,IAAI,uBAAuB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;IAC9D,CAAC;CACF"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { type Availability, AvailabilityBarrierTest, AvailabilityTestSuite, EqualToJson } from '@finos/legend-graph';
|
|
17
|
+
import { type GeneratorFn } from '@finos/legend-shared';
|
|
18
|
+
import type { AvailabilityEditorState } from '../AvailabilityEditorState.js';
|
|
19
|
+
import { type TESTABLE_RESULT } from '../../../../sidebar-state/testable/GlobalTestRunnerState.js';
|
|
20
|
+
import { TestableTestEditorState, TestableTestSuiteEditorState } from '../../testable/TestableEditorState.js';
|
|
21
|
+
import { RelationElementState } from '../../data/EmbeddedDataState.js';
|
|
22
|
+
export declare enum AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT {
|
|
23
|
+
DEFAULT = "DEFAULT",
|
|
24
|
+
LITE = "LITE",
|
|
25
|
+
ALLOY_QUERY = "ALLOY_QUERY"
|
|
26
|
+
}
|
|
27
|
+
export declare const AVAILABILITY_TEST_DATA_COLUMNS: string[];
|
|
28
|
+
export declare const DEFAULT_INGEST_COMPLETED_TS_UTC = "2025-01-01T00:00:00Z";
|
|
29
|
+
type WatermarkBatch = {
|
|
30
|
+
batchId: number;
|
|
31
|
+
ingestDefinitionPath: string;
|
|
32
|
+
ingestDefinitionReference: {
|
|
33
|
+
ingestDefinitionUrn: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
type WatermarkExpectedDefault = {
|
|
37
|
+
availabilityDefinitionReference: {
|
|
38
|
+
availabilityDefinitionUrn: string;
|
|
39
|
+
};
|
|
40
|
+
evaluatedWatermark: {
|
|
41
|
+
watermarkBatches: WatermarkBatch[];
|
|
42
|
+
};
|
|
43
|
+
evaluationResult: boolean;
|
|
44
|
+
eventId: number;
|
|
45
|
+
watermarkId: string;
|
|
46
|
+
};
|
|
47
|
+
type WatermarkLiteEntry = {
|
|
48
|
+
ingestDefinitionPath: string;
|
|
49
|
+
batchId: number;
|
|
50
|
+
};
|
|
51
|
+
type WatermarkAlloyQueryEntry = {
|
|
52
|
+
batchId: number;
|
|
53
|
+
};
|
|
54
|
+
type WatermarkExpected = {
|
|
55
|
+
format: AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT.DEFAULT;
|
|
56
|
+
value: WatermarkExpectedDefault;
|
|
57
|
+
} | {
|
|
58
|
+
format: AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT.LITE;
|
|
59
|
+
value: WatermarkLiteEntry[];
|
|
60
|
+
} | {
|
|
61
|
+
format: AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT.ALLOY_QUERY;
|
|
62
|
+
value: Record<string, WatermarkAlloyQueryEntry>;
|
|
63
|
+
};
|
|
64
|
+
export declare class AvailabilityTestState extends TestableTestEditorState {
|
|
65
|
+
readonly suiteState: AvailabilityTestSuiteState;
|
|
66
|
+
test: AvailabilityBarrierTest;
|
|
67
|
+
constructor(suiteState: AvailabilityTestSuiteState, test: AvailabilityBarrierTest);
|
|
68
|
+
get format(): AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT;
|
|
69
|
+
get firstJsonAssertion(): EqualToJson | undefined;
|
|
70
|
+
get expectedValue(): string;
|
|
71
|
+
setExpectedValue(val: string): void;
|
|
72
|
+
get parsedExpected(): WatermarkExpected | undefined;
|
|
73
|
+
addExpectedEntry(): void;
|
|
74
|
+
}
|
|
75
|
+
export declare class AvailabilityTestSuiteState extends TestableTestSuiteEditorState {
|
|
76
|
+
readonly testableState: AvailabilityTestableState;
|
|
77
|
+
suite: AvailabilityTestSuite;
|
|
78
|
+
testStates: AvailabilityTestState[];
|
|
79
|
+
selectTestState: AvailabilityTestState | undefined;
|
|
80
|
+
testToRename: AvailabilityBarrierTest | undefined;
|
|
81
|
+
readonly testDataState: RelationElementState;
|
|
82
|
+
constructor(testableState: AvailabilityTestableState, suite: AvailabilityTestSuite);
|
|
83
|
+
private buildTestStates;
|
|
84
|
+
setTestToRename(test: AvailabilityBarrierTest | undefined): void;
|
|
85
|
+
addTest(format: AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT, id?: string): AvailabilityTestState;
|
|
86
|
+
deleteTest(test: AvailabilityBarrierTest): void;
|
|
87
|
+
get result(): TESTABLE_RESULT;
|
|
88
|
+
}
|
|
89
|
+
export declare class AvailabilityTestableState {
|
|
90
|
+
readonly editorState: AvailabilityEditorState;
|
|
91
|
+
selectedSuiteState: AvailabilityTestSuiteState | undefined;
|
|
92
|
+
suiteToRename: AvailabilityTestSuite | undefined;
|
|
93
|
+
showCreateSuiteModal: boolean;
|
|
94
|
+
showCreateTestModal: boolean;
|
|
95
|
+
constructor(editorState: AvailabilityEditorState);
|
|
96
|
+
get availability(): Availability;
|
|
97
|
+
initSuites(): void;
|
|
98
|
+
setSuiteToRename(suite: AvailabilityTestSuite | undefined): void;
|
|
99
|
+
setShowCreateSuiteModal(val: boolean): void;
|
|
100
|
+
setShowCreateTestModal(val: boolean): void;
|
|
101
|
+
changeSuite(suite: AvailabilityTestSuite): void;
|
|
102
|
+
addSuite(format: AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT, suiteId?: string, testId?: string): AvailabilityTestSuiteState;
|
|
103
|
+
deleteSuite(suite: AvailabilityTestSuite): void;
|
|
104
|
+
runSuite(): GeneratorFn<void>;
|
|
105
|
+
runFailingSuiteTests(): GeneratorFn<void>;
|
|
106
|
+
get suites(): AvailabilityTestSuite[];
|
|
107
|
+
get suiteCount(): number;
|
|
108
|
+
get testCount(): number;
|
|
109
|
+
}
|
|
110
|
+
export {};
|
|
111
|
+
//# sourceMappingURL=AvailabilityTestableState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvailabilityTestableState.d.ts","sourceRoot":"","sources":["../../../../../../../src/stores/editor/editor-state/element-editor-state/availability/testable/AvailabilityTestableState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,YAAY,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,WAAW,EAaZ,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAIL,KAAK,WAAW,EAGjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,6DAA6D,CAAC;AACrE,OAAO,EACL,uBAAuB,EACvB,4BAA4B,EAC7B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAMvE,oBAAY,2CAA2C;IACrD,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,WAAW,gBAAgB;CAC5B;AAMD,eAAO,MAAM,8BAA8B,UAO1C,CAAC;AAGF,eAAO,MAAM,+BAA+B,yBAAyB,CAAC;AAWtE,KAAK,cAAc,GAAG;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,yBAAyB,EAAE;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5D,CAAC;AAEF,KAAK,wBAAwB,GAAG;IAC9B,+BAA+B,EAAE;QAAE,yBAAyB,EAAE,MAAM,CAAA;KAAE,CAAC;IACvE,kBAAkB,EAAE;QAAE,gBAAgB,EAAE,cAAc,EAAE,CAAA;KAAE,CAAC;IAC3D,gBAAgB,EAAE,OAAO,CAA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AEvB;IAED,IAAI,SAAS,IAAI,MAAM,CAEtB;CACF"}
|
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { AvailabilityBarrierTest, AvailabilityTestSuite, EqualToJson, ExternalFormatData, RelationElement, RelationRowTestData, DEFAULT_TEST_PREFIX, DEFAULT_TEST_SUITE_PREFIX, DEFAULT_TEST_ASSERTION_PREFIX, observe_AvailabilityBarrierTest, observe_AvailabilityTestSuite, observe_EqualToJson, observe_ExternalFormatData, observe_RelationElement, observe_RelationRowTestData, } from '@finos/legend-graph';
|
|
17
|
+
import { action, computed, flow, makeObservable, observable } from 'mobx';
|
|
18
|
+
import { addUniqueEntry, ContentType, generateEnumerableNameFromToken, guaranteeType, isString, } from '@finos/legend-shared';
|
|
19
|
+
import { getTestableResultFromTestResults, } from '../../../../sidebar-state/testable/GlobalTestRunnerState.js';
|
|
20
|
+
import { TestableTestEditorState, TestableTestSuiteEditorState, } from '../../testable/TestableEditorState.js';
|
|
21
|
+
import { RelationElementState } from '../../data/EmbeddedDataState.js';
|
|
22
|
+
import { atomicTest_addAssertion } from '../../../../../graph-modifier/Testable_GraphModifierHelper.js';
|
|
23
|
+
import { externalFormatData_setData } from '../../../../../graph-modifier/DSL_Data_GraphModifierHelper.js';
|
|
24
|
+
// ─── Constants ──────────────────────────────────────────────────────────────
|
|
25
|
+
export var AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT;
|
|
26
|
+
(function (AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT) {
|
|
27
|
+
AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT["DEFAULT"] = "DEFAULT";
|
|
28
|
+
AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT["LITE"] = "LITE";
|
|
29
|
+
AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT["ALLOY_QUERY"] = "ALLOY_QUERY";
|
|
30
|
+
})(AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT || (AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT = {}));
|
|
31
|
+
const DEFAULT_RELATION_PATH = 'barrier';
|
|
32
|
+
// Hard-coded columns shared by every availability barrier test. These match
|
|
33
|
+
// the schema the engine's barrier relation exposes to the test runtime.
|
|
34
|
+
export const AVAILABILITY_TEST_DATA_COLUMNS = [
|
|
35
|
+
'event_id',
|
|
36
|
+
'batch_id',
|
|
37
|
+
'ingest_path',
|
|
38
|
+
'appdir_id',
|
|
39
|
+
'batch_attributes',
|
|
40
|
+
'ingest_completed_ts_utc',
|
|
41
|
+
];
|
|
42
|
+
// Default fixed timestamp populated for new rows.
|
|
43
|
+
export const DEFAULT_INGEST_COMPLETED_TS_UTC = '2025-01-01T00:00:00Z';
|
|
44
|
+
const AVAILABILITY_COLUMN_DEFAULTS = {
|
|
45
|
+
ingest_completed_ts_utc: DEFAULT_INGEST_COMPLETED_TS_UTC,
|
|
46
|
+
};
|
|
47
|
+
const buildWatermarkBatch = () => ({
|
|
48
|
+
batchId: 0,
|
|
49
|
+
ingestDefinitionPath: '',
|
|
50
|
+
ingestDefinitionReference: { ingestDefinitionUrn: '' },
|
|
51
|
+
});
|
|
52
|
+
const buildLiteEntry = () => ({
|
|
53
|
+
ingestDefinitionPath: '',
|
|
54
|
+
batchId: 0,
|
|
55
|
+
});
|
|
56
|
+
const buildAlloyQueryEntry = () => ({ batchId: 0 });
|
|
57
|
+
const buildDefaultTemplate = () => ({
|
|
58
|
+
availabilityDefinitionReference: { availabilityDefinitionUrn: '' },
|
|
59
|
+
evaluatedWatermark: { watermarkBatches: [buildWatermarkBatch()] },
|
|
60
|
+
evaluationResult: true,
|
|
61
|
+
eventId: 0,
|
|
62
|
+
watermarkId: '',
|
|
63
|
+
});
|
|
64
|
+
const stringifyExpected = (value) => JSON.stringify(value, null, 2);
|
|
65
|
+
const buildExpectedTemplateString = (format) => {
|
|
66
|
+
switch (format) {
|
|
67
|
+
case AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT.LITE:
|
|
68
|
+
return stringifyExpected([buildLiteEntry()]);
|
|
69
|
+
case AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT.ALLOY_QUERY:
|
|
70
|
+
return stringifyExpected({ '': buildAlloyQueryEntry() });
|
|
71
|
+
case AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT.DEFAULT:
|
|
72
|
+
default:
|
|
73
|
+
return stringifyExpected(buildDefaultTemplate());
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
// Structural validators — user edits raw JSON in Monaco, so the parsed value
|
|
77
|
+
// might not match the expected format. These narrow the parse result to a
|
|
78
|
+
// typed `WatermarkExpected`; on failure the "Add entry" action is disabled.
|
|
79
|
+
const isRecord = (val) => typeof val === 'object' && val !== null && !Array.isArray(val);
|
|
80
|
+
const isDefaultShape = (val) => isRecord(val) &&
|
|
81
|
+
isRecord(val.evaluatedWatermark) &&
|
|
82
|
+
Array.isArray(val.evaluatedWatermark.watermarkBatches);
|
|
83
|
+
const isLiteShape = (val) => Array.isArray(val);
|
|
84
|
+
const isAlloyQueryShape = (val) => isRecord(val);
|
|
85
|
+
const parseWatermarkExpected = (format, raw) => {
|
|
86
|
+
if (!raw) {
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
let parsed;
|
|
90
|
+
try {
|
|
91
|
+
parsed = JSON.parse(raw);
|
|
92
|
+
}
|
|
93
|
+
catch {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
switch (format) {
|
|
97
|
+
case AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT.DEFAULT:
|
|
98
|
+
return isDefaultShape(parsed) ? { format, value: parsed } : undefined;
|
|
99
|
+
case AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT.LITE:
|
|
100
|
+
return isLiteShape(parsed) ? { format, value: parsed } : undefined;
|
|
101
|
+
case AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT.ALLOY_QUERY:
|
|
102
|
+
return isAlloyQueryShape(parsed) ? { format, value: parsed } : undefined;
|
|
103
|
+
default:
|
|
104
|
+
return undefined;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
// Append a new entry to the parsed expected model. Returns the mutated value
|
|
108
|
+
// serialized as pretty JSON, ready to be written back onto the assertion.
|
|
109
|
+
const addWatermarkEntry = (expected) => {
|
|
110
|
+
switch (expected.format) {
|
|
111
|
+
case AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT.DEFAULT: {
|
|
112
|
+
const next = {
|
|
113
|
+
...expected.value,
|
|
114
|
+
evaluatedWatermark: {
|
|
115
|
+
watermarkBatches: [
|
|
116
|
+
...expected.value.evaluatedWatermark.watermarkBatches,
|
|
117
|
+
buildWatermarkBatch(),
|
|
118
|
+
],
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
return stringifyExpected(next);
|
|
122
|
+
}
|
|
123
|
+
case AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT.LITE:
|
|
124
|
+
return stringifyExpected([...expected.value, buildLiteEntry()]);
|
|
125
|
+
case AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT.ALLOY_QUERY: {
|
|
126
|
+
const next = { ...expected.value };
|
|
127
|
+
// Pick a fresh unique key so a second empty-string add is still visible.
|
|
128
|
+
let key = '';
|
|
129
|
+
if (Object.prototype.hasOwnProperty.call(next, key)) {
|
|
130
|
+
let counter = 1;
|
|
131
|
+
while (Object.prototype.hasOwnProperty.call(next, `path_${counter}`)) {
|
|
132
|
+
counter++;
|
|
133
|
+
}
|
|
134
|
+
key = `path_${counter}`;
|
|
135
|
+
}
|
|
136
|
+
next[key] = buildAlloyQueryEntry();
|
|
137
|
+
return stringifyExpected(next);
|
|
138
|
+
}
|
|
139
|
+
default:
|
|
140
|
+
return stringifyExpected(expected);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
// ─── Test-data helpers ──────────────────────────────────────────────────────
|
|
144
|
+
const createDefaultRelationElement = (columns = AVAILABILITY_TEST_DATA_COLUMNS) => {
|
|
145
|
+
const element = new RelationElement();
|
|
146
|
+
element.paths = [DEFAULT_RELATION_PATH];
|
|
147
|
+
element.columns = [...columns];
|
|
148
|
+
const row = new RelationRowTestData();
|
|
149
|
+
row.values = columns.map((col) => AVAILABILITY_COLUMN_DEFAULTS[col] ?? '');
|
|
150
|
+
element.rows = [observe_RelationRowTestData(row)];
|
|
151
|
+
return observe_RelationElement(element);
|
|
152
|
+
};
|
|
153
|
+
// Return the union of columns declared across all existing suites in the
|
|
154
|
+
// availability, preserving first-seen order. Used to seed a new suite's
|
|
155
|
+
// test data so users don't have to redeclare the whole schema.
|
|
156
|
+
const collectExistingColumns = (availability) => {
|
|
157
|
+
const seen = new Set();
|
|
158
|
+
const ordered = [];
|
|
159
|
+
availability.tests.forEach((test) => {
|
|
160
|
+
if (!(test instanceof AvailabilityTestSuite)) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
test.testData?.columns.forEach((column) => {
|
|
164
|
+
if (!seen.has(column)) {
|
|
165
|
+
seen.add(column);
|
|
166
|
+
ordered.push(column);
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
return ordered.length > 0 ? ordered : undefined;
|
|
171
|
+
};
|
|
172
|
+
// ─── Assertion / test / suite factories ─────────────────────────────────────
|
|
173
|
+
const createDefaultAssertion = (test, format) => {
|
|
174
|
+
const externalFormatData = new ExternalFormatData();
|
|
175
|
+
externalFormatData.contentType = ContentType.APPLICATION_JSON;
|
|
176
|
+
externalFormatData.data = buildExpectedTemplateString(format);
|
|
177
|
+
const assertion = new EqualToJson();
|
|
178
|
+
assertion.id = generateEnumerableNameFromToken(test.assertions.map((value) => value.id), DEFAULT_TEST_ASSERTION_PREFIX);
|
|
179
|
+
assertion.parentTest = test;
|
|
180
|
+
assertion.expected = observe_ExternalFormatData(externalFormatData);
|
|
181
|
+
return observe_EqualToJson(assertion);
|
|
182
|
+
};
|
|
183
|
+
const createDefaultTest = (suite, format, id) => {
|
|
184
|
+
const test = new AvailabilityBarrierTest();
|
|
185
|
+
test.id =
|
|
186
|
+
id ??
|
|
187
|
+
generateEnumerableNameFromToken(suite.tests.map((value) => value.id), DEFAULT_TEST_PREFIX);
|
|
188
|
+
test.__parent = suite;
|
|
189
|
+
test.watermarkSerializationFormat = format;
|
|
190
|
+
const observedTest = observe_AvailabilityBarrierTest(test);
|
|
191
|
+
atomicTest_addAssertion(observedTest, createDefaultAssertion(observedTest, format));
|
|
192
|
+
return observedTest;
|
|
193
|
+
};
|
|
194
|
+
const createDefaultSuite = (availability, format, suiteId, testId) => {
|
|
195
|
+
const suite = new AvailabilityTestSuite();
|
|
196
|
+
suite.id =
|
|
197
|
+
suiteId ??
|
|
198
|
+
generateEnumerableNameFromToken(availability.tests.map((value) => value.id), DEFAULT_TEST_SUITE_PREFIX);
|
|
199
|
+
suite.__parent = availability;
|
|
200
|
+
suite.testData = createDefaultRelationElement(collectExistingColumns(availability));
|
|
201
|
+
const observedSuite = observe_AvailabilityTestSuite(suite);
|
|
202
|
+
addUniqueEntry(observedSuite.tests, createDefaultTest(observedSuite, format, testId));
|
|
203
|
+
return observedSuite;
|
|
204
|
+
};
|
|
205
|
+
// ─── Per-test state ─────────────────────────────────────────────────────────
|
|
206
|
+
export class AvailabilityTestState extends TestableTestEditorState {
|
|
207
|
+
suiteState;
|
|
208
|
+
test;
|
|
209
|
+
constructor(suiteState, test) {
|
|
210
|
+
super(suiteState.testableState.availability, test, suiteState.testableState.editorState.isReadOnly, suiteState.editorStore);
|
|
211
|
+
makeObservable(this, {
|
|
212
|
+
selectedAsertionState: observable,
|
|
213
|
+
selectedTab: observable,
|
|
214
|
+
assertionToRename: observable,
|
|
215
|
+
assertionEditorStates: observable,
|
|
216
|
+
testResultState: observable,
|
|
217
|
+
debugTestResultState: observable,
|
|
218
|
+
runningTestAction: observable,
|
|
219
|
+
format: computed,
|
|
220
|
+
firstJsonAssertion: computed,
|
|
221
|
+
parsedExpected: computed,
|
|
222
|
+
setAssertionToRename: action,
|
|
223
|
+
setSelectedTab: action,
|
|
224
|
+
addAssertion: action,
|
|
225
|
+
deleteAssertion: action,
|
|
226
|
+
openAssertion: action,
|
|
227
|
+
handleTestResult: action,
|
|
228
|
+
resetResult: action,
|
|
229
|
+
setExpectedValue: action,
|
|
230
|
+
addExpectedEntry: action,
|
|
231
|
+
runTest: flow,
|
|
232
|
+
debugTest: flow,
|
|
233
|
+
});
|
|
234
|
+
this.suiteState = suiteState;
|
|
235
|
+
this.test = test;
|
|
236
|
+
}
|
|
237
|
+
get format() {
|
|
238
|
+
const raw = this.test.watermarkSerializationFormat;
|
|
239
|
+
if (raw === AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT.LITE ||
|
|
240
|
+
raw === AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT.ALLOY_QUERY) {
|
|
241
|
+
return raw;
|
|
242
|
+
}
|
|
243
|
+
return AVAILABILITY_WATERMARK_SERIALIZATION_FORMAT.DEFAULT;
|
|
244
|
+
}
|
|
245
|
+
get firstJsonAssertion() {
|
|
246
|
+
const first = this.test.assertions[0];
|
|
247
|
+
return first instanceof EqualToJson ? first : undefined;
|
|
248
|
+
}
|
|
249
|
+
get expectedValue() {
|
|
250
|
+
return this.firstJsonAssertion?.expected.data ?? '';
|
|
251
|
+
}
|
|
252
|
+
setExpectedValue(val) {
|
|
253
|
+
const assertion = this.firstJsonAssertion;
|
|
254
|
+
if (!assertion) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
externalFormatData_setData(assertion.expected, val);
|
|
258
|
+
}
|
|
259
|
+
get parsedExpected() {
|
|
260
|
+
return parseWatermarkExpected(this.format, this.expectedValue);
|
|
261
|
+
}
|
|
262
|
+
// Append a new entry to the expected payload. No-op if the current text
|
|
263
|
+
// does not parse to a valid shape for the test's format.
|
|
264
|
+
addExpectedEntry() {
|
|
265
|
+
const parsed = this.parsedExpected;
|
|
266
|
+
if (!parsed) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
this.setExpectedValue(addWatermarkEntry(parsed));
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
// ─── Per-suite state ────────────────────────────────────────────────────────
|
|
273
|
+
export class AvailabilityTestSuiteState extends TestableTestSuiteEditorState {
|
|
274
|
+
testableState;
|
|
275
|
+
suite;
|
|
276
|
+
testStates = [];
|
|
277
|
+
selectTestState;
|
|
278
|
+
testToRename;
|
|
279
|
+
testDataState;
|
|
280
|
+
constructor(testableState, suite) {
|
|
281
|
+
super(testableState.availability, suite, testableState.editorState.isReadOnly, testableState.editorState.editorStore);
|
|
282
|
+
makeObservable(this, {
|
|
283
|
+
selectTestState: observable,
|
|
284
|
+
testStates: observable,
|
|
285
|
+
testToRename: observable,
|
|
286
|
+
runningSuiteState: observable,
|
|
287
|
+
setTestToRename: action,
|
|
288
|
+
changeTest: action,
|
|
289
|
+
addTest: action,
|
|
290
|
+
deleteTest: action,
|
|
291
|
+
runSuite: flow,
|
|
292
|
+
runFailingTests: flow,
|
|
293
|
+
});
|
|
294
|
+
this.testableState = testableState;
|
|
295
|
+
this.suite = suite;
|
|
296
|
+
// Ensure the suite has test data with the canonical shape (hard-coded columns).
|
|
297
|
+
const testData = this.suite.testData ?? createDefaultRelationElement();
|
|
298
|
+
this.suite.testData = testData;
|
|
299
|
+
// Column editing is enabled so users can add/remove columns beyond the
|
|
300
|
+
// seeded schema; new rows are prefilled from `columnDefaults` so the fixed
|
|
301
|
+
// `ingest_completed_ts_utc` value doesn't need to be re-typed.
|
|
302
|
+
this.testDataState = new RelationElementState(testData, {
|
|
303
|
+
columnDefaults: AVAILABILITY_COLUMN_DEFAULTS,
|
|
304
|
+
});
|
|
305
|
+
this.testStates = this.buildTestStates();
|
|
306
|
+
this.selectTestState = this.testStates[0];
|
|
307
|
+
}
|
|
308
|
+
buildTestStates() {
|
|
309
|
+
return this.suite.tests
|
|
310
|
+
.map((value) => guaranteeType(value, AvailabilityBarrierTest))
|
|
311
|
+
.map((value) => new AvailabilityTestState(this, value));
|
|
312
|
+
}
|
|
313
|
+
setTestToRename(test) {
|
|
314
|
+
this.testToRename = test;
|
|
315
|
+
}
|
|
316
|
+
addTest(format, id) {
|
|
317
|
+
const test = createDefaultTest(this.suite, format, id);
|
|
318
|
+
addUniqueEntry(this.suite.tests, test);
|
|
319
|
+
const state = new AvailabilityTestState(this, test);
|
|
320
|
+
addUniqueEntry(this.testStates, state);
|
|
321
|
+
this.selectTestState = state;
|
|
322
|
+
return state;
|
|
323
|
+
}
|
|
324
|
+
deleteTest(test) {
|
|
325
|
+
super.deleteTest(test);
|
|
326
|
+
this.selectTestState = this.testStates[0];
|
|
327
|
+
}
|
|
328
|
+
get result() {
|
|
329
|
+
return getTestableResultFromTestResults(this.testStates.map((state) => state.testResultState.result));
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
// ─── Top-level testable state ───────────────────────────────────────────────
|
|
333
|
+
export class AvailabilityTestableState {
|
|
334
|
+
editorState;
|
|
335
|
+
selectedSuiteState;
|
|
336
|
+
suiteToRename;
|
|
337
|
+
showCreateSuiteModal = false;
|
|
338
|
+
showCreateTestModal = false;
|
|
339
|
+
constructor(editorState) {
|
|
340
|
+
this.editorState = editorState;
|
|
341
|
+
makeObservable(this, {
|
|
342
|
+
selectedSuiteState: observable,
|
|
343
|
+
suiteToRename: observable,
|
|
344
|
+
showCreateSuiteModal: observable,
|
|
345
|
+
showCreateTestModal: observable,
|
|
346
|
+
suites: computed,
|
|
347
|
+
suiteCount: computed,
|
|
348
|
+
testCount: computed,
|
|
349
|
+
initSuites: action,
|
|
350
|
+
changeSuite: action,
|
|
351
|
+
addSuite: action,
|
|
352
|
+
setSuiteToRename: action,
|
|
353
|
+
setShowCreateSuiteModal: action,
|
|
354
|
+
setShowCreateTestModal: action,
|
|
355
|
+
deleteSuite: action,
|
|
356
|
+
runSuite: flow,
|
|
357
|
+
runFailingSuiteTests: flow,
|
|
358
|
+
});
|
|
359
|
+
this.initSuites();
|
|
360
|
+
}
|
|
361
|
+
get availability() {
|
|
362
|
+
return this.editorState.availability;
|
|
363
|
+
}
|
|
364
|
+
initSuites() {
|
|
365
|
+
const suite = this.availability.tests[0];
|
|
366
|
+
this.selectedSuiteState =
|
|
367
|
+
suite instanceof AvailabilityTestSuite
|
|
368
|
+
? new AvailabilityTestSuiteState(this, suite)
|
|
369
|
+
: undefined;
|
|
370
|
+
}
|
|
371
|
+
setSuiteToRename(suite) {
|
|
372
|
+
this.suiteToRename = suite;
|
|
373
|
+
}
|
|
374
|
+
setShowCreateSuiteModal(val) {
|
|
375
|
+
this.showCreateSuiteModal = val;
|
|
376
|
+
}
|
|
377
|
+
setShowCreateTestModal(val) {
|
|
378
|
+
this.showCreateTestModal = val;
|
|
379
|
+
}
|
|
380
|
+
changeSuite(suite) {
|
|
381
|
+
this.selectedSuiteState = new AvailabilityTestSuiteState(this, suite);
|
|
382
|
+
}
|
|
383
|
+
addSuite(format, suiteId, testId) {
|
|
384
|
+
const suite = createDefaultSuite(this.availability, format, isString(suiteId) && suiteId ? suiteId : undefined, isString(testId) && testId ? testId : undefined);
|
|
385
|
+
addUniqueEntry(this.availability.tests, suite);
|
|
386
|
+
const state = new AvailabilityTestSuiteState(this, suite);
|
|
387
|
+
this.selectedSuiteState = state;
|
|
388
|
+
return state;
|
|
389
|
+
}
|
|
390
|
+
deleteSuite(suite) {
|
|
391
|
+
const idx = this.availability.tests.indexOf(suite);
|
|
392
|
+
if (idx !== -1) {
|
|
393
|
+
this.availability.tests.splice(idx, 1);
|
|
394
|
+
}
|
|
395
|
+
if (this.selectedSuiteState?.suite === suite) {
|
|
396
|
+
const nextSuite = this.availability.tests[0];
|
|
397
|
+
this.selectedSuiteState =
|
|
398
|
+
nextSuite instanceof AvailabilityTestSuite
|
|
399
|
+
? new AvailabilityTestSuiteState(this, nextSuite)
|
|
400
|
+
: undefined;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
*runSuite() {
|
|
404
|
+
if (!this.selectedSuiteState) {
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
yield* this.selectedSuiteState.runSuite();
|
|
408
|
+
}
|
|
409
|
+
*runFailingSuiteTests() {
|
|
410
|
+
if (!this.selectedSuiteState) {
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
yield* this.selectedSuiteState.runFailingTests();
|
|
414
|
+
}
|
|
415
|
+
get suites() {
|
|
416
|
+
return this.editorState.availability.tests;
|
|
417
|
+
}
|
|
418
|
+
get suiteCount() {
|
|
419
|
+
return this.suites.length;
|
|
420
|
+
}
|
|
421
|
+
get testCount() {
|
|
422
|
+
return this.suites.reduce((sum, suite) => sum + suite.tests.length, 0);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
//# sourceMappingURL=AvailabilityTestableState.js.map
|