@finos/legend-application-studio 28.21.3 → 28.21.4
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/components/editor/editor-group/data-editor/RelationElementsDataEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/data-editor/RelationElementsDataEditor.js +63 -20
- package/lib/components/editor/editor-group/data-editor/RelationElementsDataEditor.js.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataProductEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataProductEditor.js +9 -1
- package/lib/components/editor/editor-group/dataProduct/DataProductEditor.js.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/testable/DataProductTestableEditor.d.ts +23 -0
- package/lib/components/editor/editor-group/dataProduct/testable/DataProductTestableEditor.d.ts.map +1 -0
- package/lib/components/editor/editor-group/dataProduct/testable/DataProductTestableEditor.js +230 -0
- package/lib/components/editor/editor-group/dataProduct/testable/DataProductTestableEditor.js.map +1 -0
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.d.ts.map +1 -1
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.js +39 -5
- package/lib/components/editor/editor-group/testable/TestableSharedComponents.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/editor-state/element-editor-state/data/EmbeddedDataState.d.ts +16 -1
- 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 +36 -1
- package/lib/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts +4 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js +4 -0
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.d.ts +118 -0
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.d.ts.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.js +600 -0
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.js.map +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.d.ts +17 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.js +46 -1
- package/lib/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.js.map +1 -1
- package/package.json +9 -9
- package/src/components/editor/editor-group/data-editor/RelationElementsDataEditor.tsx +135 -49
- package/src/components/editor/editor-group/dataProduct/DataProductEditor.tsx +14 -0
- package/src/components/editor/editor-group/dataProduct/testable/DataProductTestableEditor.tsx +872 -0
- package/src/components/editor/editor-group/testable/TestableSharedComponents.tsx +169 -15
- package/src/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.ts +54 -1
- package/src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts +4 -0
- package/src/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.ts +863 -0
- package/src/stores/editor/editor-state/element-editor-state/testable/TestAssertionState.ts +66 -0
- package/tsconfig.json +2 -0
|
@@ -25,10 +25,13 @@ import {
|
|
|
25
25
|
EqualToJson,
|
|
26
26
|
ExternalFormatData,
|
|
27
27
|
EqualToJsonAssertFail,
|
|
28
|
+
EqualToRelationAssertFail,
|
|
28
29
|
MultiExecutionServiceTestResult,
|
|
29
30
|
AssertPass,
|
|
30
31
|
TestExecutionStatus,
|
|
31
32
|
EqualTo,
|
|
33
|
+
EqualToRelation,
|
|
34
|
+
RelationElement,
|
|
32
35
|
observe_ValueSpecification,
|
|
33
36
|
} from '@finos/legend-graph';
|
|
34
37
|
import {
|
|
@@ -53,6 +56,7 @@ import {
|
|
|
53
56
|
TESTABLE_RESULT,
|
|
54
57
|
} from '../../../sidebar-state/testable/GlobalTestRunnerState.js';
|
|
55
58
|
import type { TestableTestEditorState } from './TestableEditorState.js';
|
|
59
|
+
import { RelationElementState } from '../data/EmbeddedDataState.js';
|
|
56
60
|
import { isTestPassing } from '../../../utils/TestableUtils.js';
|
|
57
61
|
import { equalTo_setExpected } from '../../../../graph-modifier/Testable_GraphModifierHelper.js';
|
|
58
62
|
|
|
@@ -120,6 +124,27 @@ export class EqualToJsonAssertFailState extends AssertFailState {
|
|
|
120
124
|
}
|
|
121
125
|
}
|
|
122
126
|
|
|
127
|
+
export class EqualToRelationAssertFailState extends AssertFailState {
|
|
128
|
+
declare status: EqualToRelationAssertFail;
|
|
129
|
+
diffModal = false;
|
|
130
|
+
|
|
131
|
+
constructor(
|
|
132
|
+
resultState: TestAssertionResultState,
|
|
133
|
+
status: EqualToRelationAssertFail,
|
|
134
|
+
) {
|
|
135
|
+
super(resultState, status);
|
|
136
|
+
this.status = status;
|
|
137
|
+
makeObservable(this, {
|
|
138
|
+
diffModal: observable,
|
|
139
|
+
setDiffModal: action,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
setDiffModal(val: boolean): void {
|
|
144
|
+
this.diffModal = val;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
123
148
|
export class UnsupportedAssertionStatusState extends TestAssertionStatusState {}
|
|
124
149
|
|
|
125
150
|
export class TestAssertionResultState {
|
|
@@ -172,6 +197,9 @@ export class TestAssertionResultState {
|
|
|
172
197
|
if (val instanceof EqualToJsonAssertFail) {
|
|
173
198
|
return new EqualToJsonAssertFailState(this, val);
|
|
174
199
|
}
|
|
200
|
+
if (val instanceof EqualToRelationAssertFail) {
|
|
201
|
+
return new EqualToRelationAssertFailState(this, val);
|
|
202
|
+
}
|
|
175
203
|
if (val instanceof AssertFail) {
|
|
176
204
|
if (this.assertionState.assertion instanceof EqualTo) {
|
|
177
205
|
const message = val.message ?? '';
|
|
@@ -298,6 +326,42 @@ export class EqualToJsonAssertionState extends TestAssertionState {
|
|
|
298
326
|
}
|
|
299
327
|
}
|
|
300
328
|
|
|
329
|
+
export class EqualToRelationAssertionState extends TestAssertionState {
|
|
330
|
+
declare assertion: EqualToRelation;
|
|
331
|
+
expectedRelationElementState: RelationElementState;
|
|
332
|
+
|
|
333
|
+
constructor(
|
|
334
|
+
editorStore: EditorStore,
|
|
335
|
+
assertionState: TestAssertionEditorState,
|
|
336
|
+
) {
|
|
337
|
+
super(editorStore, assertionState);
|
|
338
|
+
this.expectedRelationElementState = new RelationElementState(
|
|
339
|
+
this.assertion.expected,
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
override get supportsGeneratingAssertion(): boolean {
|
|
344
|
+
return false;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
generateExpected(_status: AssertFail): boolean {
|
|
348
|
+
return false;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
generateBare(): TestAssertion {
|
|
352
|
+
const bareAssertion = new EqualToRelation();
|
|
353
|
+
bareAssertion.expected = new RelationElement();
|
|
354
|
+
bareAssertion.expected.columns = [];
|
|
355
|
+
bareAssertion.expected.paths = [];
|
|
356
|
+
bareAssertion.expected.rows = [];
|
|
357
|
+
return bareAssertion;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
label(): string {
|
|
361
|
+
return 'EqualToRelation';
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
301
365
|
export class EqualToAssertionState extends TestAssertionState {
|
|
302
366
|
declare assertion: EqualTo;
|
|
303
367
|
valueSpec: ValueSpecification;
|
|
@@ -466,6 +530,8 @@ export class TestAssertionEditorState {
|
|
|
466
530
|
buildAssertionState(assertion: TestAssertion): TestAssertionState {
|
|
467
531
|
if (assertion instanceof EqualToJson) {
|
|
468
532
|
return new EqualToJsonAssertionState(this.editorStore, this);
|
|
533
|
+
} else if (assertion instanceof EqualToRelation) {
|
|
534
|
+
return new EqualToRelationAssertionState(this.editorStore, this);
|
|
469
535
|
} else if (assertion instanceof EqualTo) {
|
|
470
536
|
const val = returnUndefOnError(() =>
|
|
471
537
|
this.editorStore.graphManagerState.graphManager.buildValueSpecification(
|
package/tsconfig.json
CHANGED
|
@@ -133,6 +133,7 @@
|
|
|
133
133
|
"./src/stores/editor/editor-state/element-editor-state/data/DataEditorState.ts",
|
|
134
134
|
"./src/stores/editor/editor-state/element-editor-state/data/EmbeddedDataState.ts",
|
|
135
135
|
"./src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts",
|
|
136
|
+
"./src/stores/editor/editor-state/element-editor-state/dataProduct/testable/DataProductTestableState.ts",
|
|
136
137
|
"./src/stores/editor/editor-state/element-editor-state/external-format/DSL_ExternalFormat_BindingEditorState.ts",
|
|
137
138
|
"./src/stores/editor/editor-state/element-editor-state/external-format/DSL_ExternalFormat_SchemaSetEditorState.ts",
|
|
138
139
|
"./src/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.ts",
|
|
@@ -264,6 +265,7 @@
|
|
|
264
265
|
"./src/components/editor/editor-group/data-editor/RelationElementsDataEditor.tsx",
|
|
265
266
|
"./src/components/editor/editor-group/data-editor/RelationalCSVDataEditor.tsx",
|
|
266
267
|
"./src/components/editor/editor-group/dataProduct/DataProductEditor.tsx",
|
|
268
|
+
"./src/components/editor/editor-group/dataProduct/testable/DataProductTestableEditor.tsx",
|
|
267
269
|
"./src/components/editor/editor-group/database-editor/DatabaseAnnotationDisplay.tsx",
|
|
268
270
|
"./src/components/editor/editor-group/database-editor/DatabaseDiagramCanvas.tsx",
|
|
269
271
|
"./src/components/editor/editor-group/database-editor/DatabaseEditor.tsx",
|