@itwin/presentation-testing 3.4.0-dev.57 → 3.4.0-dev.58
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/cjs/presentation-testing/ContentBuilder.d.ts +87 -87
- package/lib/cjs/presentation-testing/ContentBuilder.js +147 -147
- package/lib/cjs/presentation-testing/ContentBuilder.js.map +1 -1
- package/lib/cjs/presentation-testing/Helpers.d.ts +38 -38
- package/lib/cjs/presentation-testing/Helpers.js +125 -125
- package/lib/cjs/presentation-testing/Helpers.js.map +1 -1
- package/lib/cjs/presentation-testing/HierarchyBuilder.d.ts +66 -66
- package/lib/cjs/presentation-testing/HierarchyBuilder.js +68 -68
- package/lib/cjs/presentation-testing/HierarchyBuilder.js.map +1 -1
- package/lib/cjs/presentation-testing/IModelBuilder.d.ts +45 -45
- package/lib/cjs/presentation-testing/IModelBuilder.js +170 -170
- package/lib/cjs/presentation-testing/IModelBuilder.js.map +1 -1
- package/lib/cjs/presentation-testing/IModelTestUtility.d.ts +24 -24
- package/lib/cjs/presentation-testing/IModelTestUtility.js +62 -62
- package/lib/cjs/presentation-testing/IModelTestUtility.js.map +1 -1
- package/lib/cjs/presentation-testing.d.ts +28 -28
- package/lib/cjs/presentation-testing.js +44 -44
- package/lib/cjs/presentation-testing.js.map +1 -1
- package/lib/esm/presentation-testing/ContentBuilder.d.ts +87 -87
- package/lib/esm/presentation-testing/ContentBuilder.js +143 -143
- package/lib/esm/presentation-testing/ContentBuilder.js.map +1 -1
- package/lib/esm/presentation-testing/Helpers.d.ts +38 -38
- package/lib/esm/presentation-testing/Helpers.js +100 -100
- package/lib/esm/presentation-testing/Helpers.js.map +1 -1
- package/lib/esm/presentation-testing/HierarchyBuilder.d.ts +66 -66
- package/lib/esm/presentation-testing/HierarchyBuilder.js +63 -63
- package/lib/esm/presentation-testing/HierarchyBuilder.js.map +1 -1
- package/lib/esm/presentation-testing/IModelBuilder.d.ts +45 -45
- package/lib/esm/presentation-testing/IModelBuilder.js +146 -146
- package/lib/esm/presentation-testing/IModelBuilder.js.map +1 -1
- package/lib/esm/presentation-testing/IModelTestUtility.d.ts +24 -24
- package/lib/esm/presentation-testing/IModelTestUtility.js +58 -58
- package/lib/esm/presentation-testing/IModelTestUtility.js.map +1 -1
- package/lib/esm/presentation-testing.d.ts +28 -28
- package/lib/esm/presentation-testing.js +32 -32
- package/lib/esm/presentation-testing.js.map +1 -1
- package/package.json +13 -13
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IModelTestUtility = void 0;
|
|
4
|
-
/*---------------------------------------------------------------------------------------------
|
|
5
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
|
-
*--------------------------------------------------------------------------------------------*/
|
|
8
|
-
/** @packageDocumentation
|
|
9
|
-
* @module TestUtilities
|
|
10
|
-
*/
|
|
11
|
-
const core_backend_1 = require("@itwin/core-backend");
|
|
12
|
-
const IModelBuilder_1 = require("./IModelBuilder");
|
|
13
|
-
/**
|
|
14
|
-
* Test utility to push an iModel.
|
|
15
|
-
*
|
|
16
|
-
* @internal
|
|
17
|
-
*/
|
|
18
|
-
class IModelTestUtility {
|
|
19
|
-
createIModel() {
|
|
20
|
-
this.outputFile = IModelBuilder_1.IModelBuilder.prepareOutputFile("IModelTest", IModelBuilder_1.IModelBuilder.generateUniqueName("IModelTest.bim"));
|
|
21
|
-
this._iModel = core_backend_1.SnapshotDb.createEmpty(this.outputFile, { rootSubject: { name: "IModelTest" } });
|
|
22
|
-
this.iModelId = this._iModel.iModelId;
|
|
23
|
-
}
|
|
24
|
-
addPhysicalModel() {
|
|
25
|
-
[, this._modelId] = IModelBuilder_1.IModelBuilder.createAndInsertPhysicalPartitionAndModel(this._iModel, IModelBuilder_1.IModelBuilder.getUniqueModelCode(this._iModel, "TestPhysicalModel"), false);
|
|
26
|
-
this._iModel.saveChanges("Added test model");
|
|
27
|
-
return this._modelId;
|
|
28
|
-
}
|
|
29
|
-
addDrawingModel() {
|
|
30
|
-
[, this._modelId] = IModelBuilder_1.IModelBuilder.createAndInsertDrawingPartitionAndModel(this._iModel, IModelBuilder_1.IModelBuilder.getUniqueModelCode(this._iModel, "TestDrawingModel"), false);
|
|
31
|
-
this._iModel.saveChanges("Added test model");
|
|
32
|
-
return this._modelId;
|
|
33
|
-
}
|
|
34
|
-
addSpatialCategory(elementProps) {
|
|
35
|
-
const categoryId = this._iModel.elements.insertElement(new core_backend_1.SpatialCategory(elementProps, this._iModel).toJSON());
|
|
36
|
-
this._iModel.saveChanges("Added spatial category");
|
|
37
|
-
return categoryId;
|
|
38
|
-
}
|
|
39
|
-
addDrawingCategory(elementProps) {
|
|
40
|
-
const categoryId = this._iModel.elements.insertElement(new core_backend_1.DrawingCategory(elementProps, this._iModel).toJSON());
|
|
41
|
-
this._iModel.saveChanges("Added drawing category");
|
|
42
|
-
return categoryId;
|
|
43
|
-
}
|
|
44
|
-
addPhysicalObject(categoryId) {
|
|
45
|
-
this._iModel.elements.insertElement(IModelBuilder_1.IModelBuilder.createPhysicalObject(this._iModel, this._modelId, categoryId).toJSON());
|
|
46
|
-
this._iModel.saveChanges("Added physical object");
|
|
47
|
-
}
|
|
48
|
-
addDrawingGraphic(categoryId) {
|
|
49
|
-
this._iModel.elements.insertElement(IModelBuilder_1.IModelBuilder.createDrawingGraphic(this._iModel, this._modelId, categoryId).toJSON());
|
|
50
|
-
this._iModel.saveChanges("Added drawing graphic");
|
|
51
|
-
}
|
|
52
|
-
getSpatialCategoryCode(codeValue) {
|
|
53
|
-
return core_backend_1.SpatialCategory.createCode(this._iModel, this._modelId, codeValue);
|
|
54
|
-
}
|
|
55
|
-
getDrawingCategoryCode(codeValue) {
|
|
56
|
-
return core_backend_1.DrawingCategory.createCode(this._iModel, this._modelId, codeValue);
|
|
57
|
-
}
|
|
58
|
-
closeIModel() {
|
|
59
|
-
this._iModel.close();
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
exports.IModelTestUtility = IModelTestUtility;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IModelTestUtility = void 0;
|
|
4
|
+
/*---------------------------------------------------------------------------------------------
|
|
5
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
|
+
*--------------------------------------------------------------------------------------------*/
|
|
8
|
+
/** @packageDocumentation
|
|
9
|
+
* @module TestUtilities
|
|
10
|
+
*/
|
|
11
|
+
const core_backend_1 = require("@itwin/core-backend");
|
|
12
|
+
const IModelBuilder_1 = require("./IModelBuilder");
|
|
13
|
+
/**
|
|
14
|
+
* Test utility to push an iModel.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
class IModelTestUtility {
|
|
19
|
+
createIModel() {
|
|
20
|
+
this.outputFile = IModelBuilder_1.IModelBuilder.prepareOutputFile("IModelTest", IModelBuilder_1.IModelBuilder.generateUniqueName("IModelTest.bim"));
|
|
21
|
+
this._iModel = core_backend_1.SnapshotDb.createEmpty(this.outputFile, { rootSubject: { name: "IModelTest" } });
|
|
22
|
+
this.iModelId = this._iModel.iModelId;
|
|
23
|
+
}
|
|
24
|
+
addPhysicalModel() {
|
|
25
|
+
[, this._modelId] = IModelBuilder_1.IModelBuilder.createAndInsertPhysicalPartitionAndModel(this._iModel, IModelBuilder_1.IModelBuilder.getUniqueModelCode(this._iModel, "TestPhysicalModel"), false);
|
|
26
|
+
this._iModel.saveChanges("Added test model");
|
|
27
|
+
return this._modelId;
|
|
28
|
+
}
|
|
29
|
+
addDrawingModel() {
|
|
30
|
+
[, this._modelId] = IModelBuilder_1.IModelBuilder.createAndInsertDrawingPartitionAndModel(this._iModel, IModelBuilder_1.IModelBuilder.getUniqueModelCode(this._iModel, "TestDrawingModel"), false);
|
|
31
|
+
this._iModel.saveChanges("Added test model");
|
|
32
|
+
return this._modelId;
|
|
33
|
+
}
|
|
34
|
+
addSpatialCategory(elementProps) {
|
|
35
|
+
const categoryId = this._iModel.elements.insertElement(new core_backend_1.SpatialCategory(elementProps, this._iModel).toJSON());
|
|
36
|
+
this._iModel.saveChanges("Added spatial category");
|
|
37
|
+
return categoryId;
|
|
38
|
+
}
|
|
39
|
+
addDrawingCategory(elementProps) {
|
|
40
|
+
const categoryId = this._iModel.elements.insertElement(new core_backend_1.DrawingCategory(elementProps, this._iModel).toJSON());
|
|
41
|
+
this._iModel.saveChanges("Added drawing category");
|
|
42
|
+
return categoryId;
|
|
43
|
+
}
|
|
44
|
+
addPhysicalObject(categoryId) {
|
|
45
|
+
this._iModel.elements.insertElement(IModelBuilder_1.IModelBuilder.createPhysicalObject(this._iModel, this._modelId, categoryId).toJSON());
|
|
46
|
+
this._iModel.saveChanges("Added physical object");
|
|
47
|
+
}
|
|
48
|
+
addDrawingGraphic(categoryId) {
|
|
49
|
+
this._iModel.elements.insertElement(IModelBuilder_1.IModelBuilder.createDrawingGraphic(this._iModel, this._modelId, categoryId).toJSON());
|
|
50
|
+
this._iModel.saveChanges("Added drawing graphic");
|
|
51
|
+
}
|
|
52
|
+
getSpatialCategoryCode(codeValue) {
|
|
53
|
+
return core_backend_1.SpatialCategory.createCode(this._iModel, this._modelId, codeValue);
|
|
54
|
+
}
|
|
55
|
+
getDrawingCategoryCode(codeValue) {
|
|
56
|
+
return core_backend_1.DrawingCategory.createCode(this._iModel, this._modelId, codeValue);
|
|
57
|
+
}
|
|
58
|
+
closeIModel() {
|
|
59
|
+
this._iModel.close();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.IModelTestUtility = IModelTestUtility;
|
|
63
63
|
//# sourceMappingURL=IModelTestUtility.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelTestUtility.js","sourceRoot":"","sources":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AAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC5E,CAAC;IAEM,WAAW;QAChB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;CACF;AA1DD,8CA0DC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module TestUtilities\n */\nimport { DrawingCategory, IModelDb, SnapshotDb, SpatialCategory } from \"@itwin/core-backend\";\nimport { GuidString } from \"@itwin/core-bentley\";\nimport { Code, ElementProps } from \"@itwin/core-common\";\nimport { IModelBuilder } from \"./IModelBuilder\";\n\n/**\n * Test utility to push an iModel.\n *\n * @internal\n */\nexport class IModelTestUtility {\n public iTwinId!: GuidString;\n public iModelId!: string;\n public outputFile!: string;\n private _iModel!: IModelDb;\n private _modelId!: string;\n\n public createIModel(): void {\n this.outputFile = IModelBuilder.prepareOutputFile(\"IModelTest\", IModelBuilder.generateUniqueName(\"IModelTest.bim\"));\n this._iModel = SnapshotDb.createEmpty(this.outputFile, { rootSubject: { name: \"IModelTest\" } });\n this.iModelId = this._iModel.iModelId;\n }\n\n public addPhysicalModel(): string {\n [, this._modelId] = IModelBuilder.createAndInsertPhysicalPartitionAndModel(this._iModel, IModelBuilder.getUniqueModelCode(this._iModel, \"TestPhysicalModel\"), false);\n this._iModel.saveChanges(\"Added test model\");\n return this._modelId;\n }\n\n public addDrawingModel(): string {\n [, this._modelId] = IModelBuilder.createAndInsertDrawingPartitionAndModel(this._iModel, IModelBuilder.getUniqueModelCode(this._iModel, \"TestDrawingModel\"), false);\n this._iModel.saveChanges(\"Added test model\");\n return this._modelId;\n }\n\n public addSpatialCategory(elementProps: ElementProps): string {\n const categoryId = this._iModel.elements.insertElement(new SpatialCategory(elementProps, this._iModel).toJSON());\n this._iModel.saveChanges(\"Added spatial category\");\n return categoryId;\n }\n\n public addDrawingCategory(elementProps: ElementProps): string {\n const categoryId = this._iModel.elements.insertElement(new DrawingCategory(elementProps, this._iModel).toJSON());\n this._iModel.saveChanges(\"Added drawing category\");\n return categoryId;\n }\n\n public addPhysicalObject(categoryId: string): void {\n this._iModel.elements.insertElement(IModelBuilder.createPhysicalObject(this._iModel, this._modelId, categoryId).toJSON());\n this._iModel.saveChanges(\"Added physical object\");\n }\n\n public addDrawingGraphic(categoryId: string): void {\n this._iModel.elements.insertElement(IModelBuilder.createDrawingGraphic(this._iModel, this._modelId, categoryId).toJSON());\n this._iModel.saveChanges(\"Added drawing graphic\");\n }\n\n public getSpatialCategoryCode(codeValue: string): Code {\n return SpatialCategory.createCode(this._iModel, this._modelId, codeValue);\n }\n\n public getDrawingCategoryCode(codeValue: string): Code {\n return DrawingCategory.createCode(this._iModel, this._modelId, codeValue);\n }\n\n public closeIModel(): void {\n this._iModel.close();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IModelTestUtility.js","sourceRoot":"","sources":["../../../src/presentation-testing/IModelTestUtility.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAA6F;AAG7F,mDAAgD;AAEhD;;;;GAIG;AACH,MAAa,iBAAiB;IAOrB,YAAY;QACjB,IAAI,CAAC,UAAU,GAAG,6BAAa,CAAC,iBAAiB,CAAC,YAAY,EAAE,6BAAa,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC,CAAC;QACpH,IAAI,CAAC,OAAO,GAAG,yBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,CAAC,CAAC;QAChG,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;IACxC,CAAC;IAEM,gBAAgB;QACrB,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,G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AAa,CAAC,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAC1H,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,uBAAuB,CAAC,CAAC;IACpD,CAAC;IAEM,iBAAiB,CAAC,UAAkB;QACzC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,6BAAa,CAAC,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAC1H,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,uBAAuB,CAAC,CAAC;IACpD,CAAC;IAEM,sBAAsB,CAAC,SAAiB;QAC7C,OAAO,8BAAe,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC5E,CAAC;IAEM,sBAAsB,CAAC,SAAiB;QAC7C,OAAO,8BAAe,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC5E,CAAC;IAEM,WAAW;QAChB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;CACF;AA1DD,8CA0DC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module TestUtilities\r\n */\r\nimport { DrawingCategory, IModelDb, SnapshotDb, SpatialCategory } from \"@itwin/core-backend\";\r\nimport { GuidString } from \"@itwin/core-bentley\";\r\nimport { Code, ElementProps } from \"@itwin/core-common\";\r\nimport { IModelBuilder } from \"./IModelBuilder\";\r\n\r\n/**\r\n * Test utility to push an iModel.\r\n *\r\n * @internal\r\n */\r\nexport class IModelTestUtility {\r\n public iTwinId!: GuidString;\r\n public iModelId!: string;\r\n public outputFile!: string;\r\n private _iModel!: IModelDb;\r\n private _modelId!: string;\r\n\r\n public createIModel(): void {\r\n this.outputFile = IModelBuilder.prepareOutputFile(\"IModelTest\", IModelBuilder.generateUniqueName(\"IModelTest.bim\"));\r\n this._iModel = SnapshotDb.createEmpty(this.outputFile, { rootSubject: { name: \"IModelTest\" } });\r\n this.iModelId = this._iModel.iModelId;\r\n }\r\n\r\n public addPhysicalModel(): string {\r\n [, this._modelId] = IModelBuilder.createAndInsertPhysicalPartitionAndModel(this._iModel, IModelBuilder.getUniqueModelCode(this._iModel, \"TestPhysicalModel\"), false);\r\n this._iModel.saveChanges(\"Added test model\");\r\n return this._modelId;\r\n }\r\n\r\n public addDrawingModel(): string {\r\n [, this._modelId] = IModelBuilder.createAndInsertDrawingPartitionAndModel(this._iModel, IModelBuilder.getUniqueModelCode(this._iModel, \"TestDrawingModel\"), false);\r\n this._iModel.saveChanges(\"Added test model\");\r\n return this._modelId;\r\n }\r\n\r\n public addSpatialCategory(elementProps: ElementProps): string {\r\n const categoryId = this._iModel.elements.insertElement(new SpatialCategory(elementProps, this._iModel).toJSON());\r\n this._iModel.saveChanges(\"Added spatial category\");\r\n return categoryId;\r\n }\r\n\r\n public addDrawingCategory(elementProps: ElementProps): string {\r\n const categoryId = this._iModel.elements.insertElement(new DrawingCategory(elementProps, this._iModel).toJSON());\r\n this._iModel.saveChanges(\"Added drawing category\");\r\n return categoryId;\r\n }\r\n\r\n public addPhysicalObject(categoryId: string): void {\r\n this._iModel.elements.insertElement(IModelBuilder.createPhysicalObject(this._iModel, this._modelId, categoryId).toJSON());\r\n this._iModel.saveChanges(\"Added physical object\");\r\n }\r\n\r\n public addDrawingGraphic(categoryId: string): void {\r\n this._iModel.elements.insertElement(IModelBuilder.createDrawingGraphic(this._iModel, this._modelId, categoryId).toJSON());\r\n this._iModel.saveChanges(\"Added drawing graphic\");\r\n }\r\n\r\n public getSpatialCategoryCode(codeValue: string): Code {\r\n return SpatialCategory.createCode(this._iModel, this._modelId, codeValue);\r\n }\r\n\r\n public getDrawingCategoryCode(codeValue: string): Code {\r\n return DrawingCategory.createCode(this._iModel, this._modelId, codeValue);\r\n }\r\n\r\n public closeIModel(): void {\r\n this._iModel.close();\r\n }\r\n}\r\n"]}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module Hierarchies
|
|
3
|
-
*
|
|
4
|
-
* @docs-group-description Hierarchies
|
|
5
|
-
* Types for testing hierarchies.
|
|
6
|
-
*/
|
|
7
|
-
export * from "./presentation-testing/HierarchyBuilder";
|
|
8
|
-
/**
|
|
9
|
-
* @module Content
|
|
10
|
-
*
|
|
11
|
-
* @docs-group-description Content
|
|
12
|
-
* Types for testing content.
|
|
13
|
-
*/
|
|
14
|
-
export * from "./presentation-testing/ContentBuilder";
|
|
15
|
-
/**
|
|
16
|
-
* @module Helpers
|
|
17
|
-
*
|
|
18
|
-
* @docs-group-description Helpers
|
|
19
|
-
* Various test helpers.
|
|
20
|
-
*/
|
|
21
|
-
export * from "./presentation-testing/Helpers";
|
|
22
|
-
/**
|
|
23
|
-
* @module TestUtilities
|
|
24
|
-
*
|
|
25
|
-
* @docs-group-description TestUtilities
|
|
26
|
-
* Various test helpers.
|
|
27
|
-
*/
|
|
28
|
-
export * from "./presentation-testing/IModelTestUtility";
|
|
1
|
+
/**
|
|
2
|
+
* @module Hierarchies
|
|
3
|
+
*
|
|
4
|
+
* @docs-group-description Hierarchies
|
|
5
|
+
* Types for testing hierarchies.
|
|
6
|
+
*/
|
|
7
|
+
export * from "./presentation-testing/HierarchyBuilder";
|
|
8
|
+
/**
|
|
9
|
+
* @module Content
|
|
10
|
+
*
|
|
11
|
+
* @docs-group-description Content
|
|
12
|
+
* Types for testing content.
|
|
13
|
+
*/
|
|
14
|
+
export * from "./presentation-testing/ContentBuilder";
|
|
15
|
+
/**
|
|
16
|
+
* @module Helpers
|
|
17
|
+
*
|
|
18
|
+
* @docs-group-description Helpers
|
|
19
|
+
* Various test helpers.
|
|
20
|
+
*/
|
|
21
|
+
export * from "./presentation-testing/Helpers";
|
|
22
|
+
/**
|
|
23
|
+
* @module TestUtilities
|
|
24
|
+
*
|
|
25
|
+
* @docs-group-description TestUtilities
|
|
26
|
+
* Various test helpers.
|
|
27
|
+
*/
|
|
28
|
+
export * from "./presentation-testing/IModelTestUtility";
|
|
29
29
|
//# sourceMappingURL=presentation-testing.d.ts.map
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
/*---------------------------------------------------------------------------------------------
|
|
14
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
15
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
16
|
-
*--------------------------------------------------------------------------------------------*/
|
|
17
|
-
/**
|
|
18
|
-
* @module Hierarchies
|
|
19
|
-
*
|
|
20
|
-
* @docs-group-description Hierarchies
|
|
21
|
-
* Types for testing hierarchies.
|
|
22
|
-
*/
|
|
23
|
-
__exportStar(require("./presentation-testing/HierarchyBuilder"), exports);
|
|
24
|
-
/**
|
|
25
|
-
* @module Content
|
|
26
|
-
*
|
|
27
|
-
* @docs-group-description Content
|
|
28
|
-
* Types for testing content.
|
|
29
|
-
*/
|
|
30
|
-
__exportStar(require("./presentation-testing/ContentBuilder"), exports);
|
|
31
|
-
/**
|
|
32
|
-
* @module Helpers
|
|
33
|
-
*
|
|
34
|
-
* @docs-group-description Helpers
|
|
35
|
-
* Various test helpers.
|
|
36
|
-
*/
|
|
37
|
-
__exportStar(require("./presentation-testing/Helpers"), exports);
|
|
38
|
-
/**
|
|
39
|
-
* @module TestUtilities
|
|
40
|
-
*
|
|
41
|
-
* @docs-group-description TestUtilities
|
|
42
|
-
* Various test helpers.
|
|
43
|
-
*/
|
|
44
|
-
__exportStar(require("./presentation-testing/IModelTestUtility"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
/*---------------------------------------------------------------------------------------------
|
|
14
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
15
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
16
|
+
*--------------------------------------------------------------------------------------------*/
|
|
17
|
+
/**
|
|
18
|
+
* @module Hierarchies
|
|
19
|
+
*
|
|
20
|
+
* @docs-group-description Hierarchies
|
|
21
|
+
* Types for testing hierarchies.
|
|
22
|
+
*/
|
|
23
|
+
__exportStar(require("./presentation-testing/HierarchyBuilder"), exports);
|
|
24
|
+
/**
|
|
25
|
+
* @module Content
|
|
26
|
+
*
|
|
27
|
+
* @docs-group-description Content
|
|
28
|
+
* Types for testing content.
|
|
29
|
+
*/
|
|
30
|
+
__exportStar(require("./presentation-testing/ContentBuilder"), exports);
|
|
31
|
+
/**
|
|
32
|
+
* @module Helpers
|
|
33
|
+
*
|
|
34
|
+
* @docs-group-description Helpers
|
|
35
|
+
* Various test helpers.
|
|
36
|
+
*/
|
|
37
|
+
__exportStar(require("./presentation-testing/Helpers"), exports);
|
|
38
|
+
/**
|
|
39
|
+
* @module TestUtilities
|
|
40
|
+
*
|
|
41
|
+
* @docs-group-description TestUtilities
|
|
42
|
+
* Various test helpers.
|
|
43
|
+
*/
|
|
44
|
+
__exportStar(require("./presentation-testing/IModelTestUtility"), exports);
|
|
45
45
|
//# sourceMappingURL=presentation-testing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation-testing.js","sourceRoot":"","sources":["../../src/presentation-testing.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F;;;;;GAKG;AACH,0EAAwD;AAExD;;;;;GAKG;AACH,wEAAsD;AAEtD;;;;;GAKG;AACH,iEAA+C;AAE/C;;;;;GAKG;AACH,2EAAyD","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/**\n * @module Hierarchies\n *\n * @docs-group-description Hierarchies\n * Types for testing hierarchies.\n */\nexport * from \"./presentation-testing/HierarchyBuilder\";\n\n/**\n * @module Content\n *\n * @docs-group-description Content\n * Types for testing content.\n */\nexport * from \"./presentation-testing/ContentBuilder\";\n\n/**\n * @module Helpers\n *\n * @docs-group-description Helpers\n * Various test helpers.\n */\nexport * from \"./presentation-testing/Helpers\";\n\n/**\n * @module TestUtilities\n *\n * @docs-group-description TestUtilities\n * Various test helpers.\n */\nexport * from \"./presentation-testing/IModelTestUtility\";\n"]}
|
|
1
|
+
{"version":3,"file":"presentation-testing.js","sourceRoot":"","sources":["../../src/presentation-testing.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F;;;;;GAKG;AACH,0EAAwD;AAExD;;;;;GAKG;AACH,wEAAsD;AAEtD;;;;;GAKG;AACH,iEAA+C;AAE/C;;;;;GAKG;AACH,2EAAyD","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/**\r\n * @module Hierarchies\r\n *\r\n * @docs-group-description Hierarchies\r\n * Types for testing hierarchies.\r\n */\r\nexport * from \"./presentation-testing/HierarchyBuilder\";\r\n\r\n/**\r\n * @module Content\r\n *\r\n * @docs-group-description Content\r\n * Types for testing content.\r\n */\r\nexport * from \"./presentation-testing/ContentBuilder\";\r\n\r\n/**\r\n * @module Helpers\r\n *\r\n * @docs-group-description Helpers\r\n * Various test helpers.\r\n */\r\nexport * from \"./presentation-testing/Helpers\";\r\n\r\n/**\r\n * @module TestUtilities\r\n *\r\n * @docs-group-description TestUtilities\r\n * Various test helpers.\r\n */\r\nexport * from \"./presentation-testing/IModelTestUtility\";\r\n"]}
|
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
import { PropertyRecord } from "@itwin/appui-abstract";
|
|
2
|
-
import { IModelConnection } from "@itwin/core-frontend";
|
|
3
|
-
import { Content, InstanceKey, KeySet, PageOptions, Ruleset } from "@itwin/presentation-common";
|
|
4
|
-
/**
|
|
5
|
-
* Interface for a data provider, which is used by ContentBuilder.
|
|
6
|
-
* @public
|
|
7
|
-
*/
|
|
8
|
-
export interface IContentBuilderDataProvider {
|
|
9
|
-
/** Keys the data provider is creating content for */
|
|
10
|
-
keys: Readonly<KeySet>;
|
|
11
|
-
/** Get the size of content result set */
|
|
12
|
-
getContentSetSize: () => Promise<number>;
|
|
13
|
-
/** Get the content */
|
|
14
|
-
getContent: (options?: PageOptions) => Promise<Readonly<Content> | undefined>;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Property records grouped under a single className
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
export interface ContentBuilderResult {
|
|
21
|
-
/** Full name of ECClass whose records are contained in this data structure */
|
|
22
|
-
className: string;
|
|
23
|
-
/** Property records for the ECClass instance */
|
|
24
|
-
records: PropertyRecord[];
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Properties for creating a `ContentBuilder` instance.
|
|
28
|
-
* @public
|
|
29
|
-
*/
|
|
30
|
-
export interface ContentBuilderProps {
|
|
31
|
-
/** The iModel to pull data from */
|
|
32
|
-
imodel: IModelConnection;
|
|
33
|
-
/** Custom data provider that allows mocking data ContentBuilder receives */
|
|
34
|
-
dataProvider?: IContentBuilderDataProvider;
|
|
35
|
-
/**
|
|
36
|
-
* Decimal precision or numeric types.
|
|
37
|
-
*
|
|
38
|
-
* Raw numeric values with high precision may slightly differ from platform to platform due to
|
|
39
|
-
* rounding differences on different platforms. This may be a problem when used with snapshot testing,
|
|
40
|
-
* in which case this attribute may be set to supply the maximum precision of raw numeric values.
|
|
41
|
-
*
|
|
42
|
-
* By default no rounding is applied.
|
|
43
|
-
*/
|
|
44
|
-
decimalPrecision?: number;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* A class that constructs content from specified imodel and ruleset.
|
|
48
|
-
* @public
|
|
49
|
-
*/
|
|
50
|
-
export declare class ContentBuilder {
|
|
51
|
-
private readonly _iModel;
|
|
52
|
-
private _dataProvider;
|
|
53
|
-
private _decimalPrecision?;
|
|
54
|
-
/**
|
|
55
|
-
* Constructor
|
|
56
|
-
* @param iModel
|
|
57
|
-
* @param dataProvider
|
|
58
|
-
*/
|
|
59
|
-
constructor(props: ContentBuilderProps);
|
|
60
|
-
private doCreateContent;
|
|
61
|
-
/**
|
|
62
|
-
* Create a list of property records using the supplied presentation ruleset.
|
|
63
|
-
* @param rulesetOrId Either a [[Ruleset]] object or a ruleset id.
|
|
64
|
-
* @param instanceKeys Keys of instances that should be queried.
|
|
65
|
-
* @param displayType Type of content container display. For example:
|
|
66
|
-
* "PropertyPane", "Grid", "List" etc.
|
|
67
|
-
*/
|
|
68
|
-
createContent(rulesetOrId: Ruleset | string, instanceKeys: InstanceKey[], displayType?: string): Promise<PropertyRecord[]>;
|
|
69
|
-
private getECClassNames;
|
|
70
|
-
private createContentForClasses;
|
|
71
|
-
/**
|
|
72
|
-
* Create a list of grouped property records using the supplied presentation ruleset.
|
|
73
|
-
* Each group includes all of the class instances.
|
|
74
|
-
* @param rulesetOrId Either a [[Ruleset]] object or a ruleset id.
|
|
75
|
-
* @param displayType Type of content container display. For example:
|
|
76
|
-
* "PropertyPane", "Grid", "List" etc.
|
|
77
|
-
*/
|
|
78
|
-
createContentForAllInstances(rulesetOrId: Ruleset | string, displayType?: string): Promise<ContentBuilderResult[]>;
|
|
79
|
-
/**
|
|
80
|
-
* Create a list of grouped property records using the supplied presentation ruleset.
|
|
81
|
-
* Each group includes at most one class instance.
|
|
82
|
-
* @param rulesetOrId Either a [[Ruleset]] object or a ruleset id.
|
|
83
|
-
* @param displayType Type of content container display. For example:
|
|
84
|
-
* "PropertyPane", "Grid", "List" etc.
|
|
85
|
-
*/
|
|
86
|
-
createContentForInstancePerClass(rulesetOrId: Ruleset | string, displayType?: string): Promise<ContentBuilderResult[]>;
|
|
87
|
-
}
|
|
1
|
+
import { PropertyRecord } from "@itwin/appui-abstract";
|
|
2
|
+
import { IModelConnection } from "@itwin/core-frontend";
|
|
3
|
+
import { Content, InstanceKey, KeySet, PageOptions, Ruleset } from "@itwin/presentation-common";
|
|
4
|
+
/**
|
|
5
|
+
* Interface for a data provider, which is used by ContentBuilder.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface IContentBuilderDataProvider {
|
|
9
|
+
/** Keys the data provider is creating content for */
|
|
10
|
+
keys: Readonly<KeySet>;
|
|
11
|
+
/** Get the size of content result set */
|
|
12
|
+
getContentSetSize: () => Promise<number>;
|
|
13
|
+
/** Get the content */
|
|
14
|
+
getContent: (options?: PageOptions) => Promise<Readonly<Content> | undefined>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Property records grouped under a single className
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export interface ContentBuilderResult {
|
|
21
|
+
/** Full name of ECClass whose records are contained in this data structure */
|
|
22
|
+
className: string;
|
|
23
|
+
/** Property records for the ECClass instance */
|
|
24
|
+
records: PropertyRecord[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Properties for creating a `ContentBuilder` instance.
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export interface ContentBuilderProps {
|
|
31
|
+
/** The iModel to pull data from */
|
|
32
|
+
imodel: IModelConnection;
|
|
33
|
+
/** Custom data provider that allows mocking data ContentBuilder receives */
|
|
34
|
+
dataProvider?: IContentBuilderDataProvider;
|
|
35
|
+
/**
|
|
36
|
+
* Decimal precision or numeric types.
|
|
37
|
+
*
|
|
38
|
+
* Raw numeric values with high precision may slightly differ from platform to platform due to
|
|
39
|
+
* rounding differences on different platforms. This may be a problem when used with snapshot testing,
|
|
40
|
+
* in which case this attribute may be set to supply the maximum precision of raw numeric values.
|
|
41
|
+
*
|
|
42
|
+
* By default no rounding is applied.
|
|
43
|
+
*/
|
|
44
|
+
decimalPrecision?: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A class that constructs content from specified imodel and ruleset.
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
export declare class ContentBuilder {
|
|
51
|
+
private readonly _iModel;
|
|
52
|
+
private _dataProvider;
|
|
53
|
+
private _decimalPrecision?;
|
|
54
|
+
/**
|
|
55
|
+
* Constructor
|
|
56
|
+
* @param iModel
|
|
57
|
+
* @param dataProvider
|
|
58
|
+
*/
|
|
59
|
+
constructor(props: ContentBuilderProps);
|
|
60
|
+
private doCreateContent;
|
|
61
|
+
/**
|
|
62
|
+
* Create a list of property records using the supplied presentation ruleset.
|
|
63
|
+
* @param rulesetOrId Either a [[Ruleset]] object or a ruleset id.
|
|
64
|
+
* @param instanceKeys Keys of instances that should be queried.
|
|
65
|
+
* @param displayType Type of content container display. For example:
|
|
66
|
+
* "PropertyPane", "Grid", "List" etc.
|
|
67
|
+
*/
|
|
68
|
+
createContent(rulesetOrId: Ruleset | string, instanceKeys: InstanceKey[], displayType?: string): Promise<PropertyRecord[]>;
|
|
69
|
+
private getECClassNames;
|
|
70
|
+
private createContentForClasses;
|
|
71
|
+
/**
|
|
72
|
+
* Create a list of grouped property records using the supplied presentation ruleset.
|
|
73
|
+
* Each group includes all of the class instances.
|
|
74
|
+
* @param rulesetOrId Either a [[Ruleset]] object or a ruleset id.
|
|
75
|
+
* @param displayType Type of content container display. For example:
|
|
76
|
+
* "PropertyPane", "Grid", "List" etc.
|
|
77
|
+
*/
|
|
78
|
+
createContentForAllInstances(rulesetOrId: Ruleset | string, displayType?: string): Promise<ContentBuilderResult[]>;
|
|
79
|
+
/**
|
|
80
|
+
* Create a list of grouped property records using the supplied presentation ruleset.
|
|
81
|
+
* Each group includes at most one class instance.
|
|
82
|
+
* @param rulesetOrId Either a [[Ruleset]] object or a ruleset id.
|
|
83
|
+
* @param displayType Type of content container display. For example:
|
|
84
|
+
* "PropertyPane", "Grid", "List" etc.
|
|
85
|
+
*/
|
|
86
|
+
createContentForInstancePerClass(rulesetOrId: Ruleset | string, displayType?: string): Promise<ContentBuilderResult[]>;
|
|
87
|
+
}
|
|
88
88
|
//# sourceMappingURL=ContentBuilder.d.ts.map
|