@itwin/presentation-testing 3.5.0-dev.8 → 3.6.0-dev.1
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/CHANGELOG.md +58 -1
- package/lib/cjs/presentation-testing/Helpers.d.ts +4 -0
- package/lib/cjs/presentation-testing/Helpers.d.ts.map +1 -1
- package/lib/cjs/presentation-testing/Helpers.js +11 -1
- package/lib/cjs/presentation-testing/Helpers.js.map +1 -1
- package/lib/cjs/presentation-testing/IModelUtilities.d.ts +47 -0
- package/lib/cjs/presentation-testing/IModelUtilities.d.ts.map +1 -0
- package/lib/cjs/presentation-testing/IModelUtilities.js +78 -0
- package/lib/cjs/presentation-testing/IModelUtilities.js.map +1 -0
- package/lib/cjs/presentation-testing.d.ts +4 -4
- package/lib/cjs/presentation-testing.d.ts.map +1 -1
- package/lib/cjs/presentation-testing.js +4 -4
- package/lib/cjs/presentation-testing.js.map +1 -1
- package/lib/esm/presentation-testing/Helpers.d.ts +4 -0
- package/lib/esm/presentation-testing/Helpers.d.ts.map +1 -1
- package/lib/esm/presentation-testing/Helpers.js +10 -0
- package/lib/esm/presentation-testing/Helpers.js.map +1 -1
- package/lib/esm/presentation-testing/IModelUtilities.d.ts +47 -0
- package/lib/esm/presentation-testing/IModelUtilities.d.ts.map +1 -0
- package/lib/esm/presentation-testing/IModelUtilities.js +70 -0
- package/lib/esm/presentation-testing/IModelUtilities.js.map +1 -0
- package/lib/esm/presentation-testing.d.ts +4 -4
- package/lib/esm/presentation-testing.d.ts.map +1 -1
- package/lib/esm/presentation-testing.js +4 -4
- package/lib/esm/presentation-testing.js.map +1 -1
- package/package.json +13 -13
- package/lib/cjs/presentation-testing/IModelBuilder.d.ts +0 -46
- package/lib/cjs/presentation-testing/IModelBuilder.d.ts.map +0 -1
- package/lib/cjs/presentation-testing/IModelBuilder.js +0 -171
- package/lib/cjs/presentation-testing/IModelBuilder.js.map +0 -1
- package/lib/cjs/presentation-testing/IModelTestUtility.d.ts +0 -25
- package/lib/cjs/presentation-testing/IModelTestUtility.d.ts.map +0 -1
- package/lib/cjs/presentation-testing/IModelTestUtility.js +0 -63
- package/lib/cjs/presentation-testing/IModelTestUtility.js.map +0 -1
- package/lib/esm/presentation-testing/IModelBuilder.d.ts +0 -46
- package/lib/esm/presentation-testing/IModelBuilder.d.ts.map +0 -1
- package/lib/esm/presentation-testing/IModelBuilder.js +0 -147
- package/lib/esm/presentation-testing/IModelBuilder.js.map +0 -1
- package/lib/esm/presentation-testing/IModelTestUtility.d.ts +0 -25
- package/lib/esm/presentation-testing/IModelTestUtility.d.ts.map +0 -1
- package/lib/esm/presentation-testing/IModelTestUtility.js +0 -59
- package/lib/esm/presentation-testing/IModelTestUtility.js.map +0 -1
|
@@ -20,10 +20,10 @@ export * from "./presentation-testing/ContentBuilder";
|
|
|
20
20
|
*/
|
|
21
21
|
export * from "./presentation-testing/Helpers";
|
|
22
22
|
/**
|
|
23
|
-
* @module
|
|
23
|
+
* @module IModel
|
|
24
24
|
*
|
|
25
|
-
* @docs-group-description
|
|
26
|
-
*
|
|
25
|
+
* @docs-group-description IModel
|
|
26
|
+
* Utilities for creating test iModels that can be used to exercise presentation rules.
|
|
27
27
|
*/
|
|
28
|
-
export * from "./presentation-testing/
|
|
28
|
+
export * from "./presentation-testing/IModelUtilities";
|
|
29
29
|
//# sourceMappingURL=presentation-testing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation-testing.d.ts","sourceRoot":"","sources":["../../src/presentation-testing.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,cAAc,yCAAyC,CAAC;AAExD;;;;;GAKG;AACH,cAAc,uCAAuC,CAAC;AAEtD;;;;;GAKG;AACH,cAAc,gCAAgC,CAAC;AAE/C;;;;;GAKG;AACH,cAAc,
|
|
1
|
+
{"version":3,"file":"presentation-testing.d.ts","sourceRoot":"","sources":["../../src/presentation-testing.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,cAAc,yCAAyC,CAAC;AAExD;;;;;GAKG;AACH,cAAc,uCAAuC,CAAC;AAEtD;;;;;GAKG;AACH,cAAc,gCAAgC,CAAC;AAE/C;;;;;GAKG;AACH,cAAc,wCAAwC,CAAC"}
|
|
@@ -24,10 +24,10 @@ export * from "./presentation-testing/ContentBuilder";
|
|
|
24
24
|
*/
|
|
25
25
|
export * from "./presentation-testing/Helpers";
|
|
26
26
|
/**
|
|
27
|
-
* @module
|
|
27
|
+
* @module IModel
|
|
28
28
|
*
|
|
29
|
-
* @docs-group-description
|
|
30
|
-
*
|
|
29
|
+
* @docs-group-description IModel
|
|
30
|
+
* Utilities for creating test iModels that can be used to exercise presentation rules.
|
|
31
31
|
*/
|
|
32
|
-
export * from "./presentation-testing/
|
|
32
|
+
export * from "./presentation-testing/IModelUtilities";
|
|
33
33
|
//# 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,cAAc,yCAAyC,CAAC;AAExD;;;;;GAKG;AACH,cAAc,uCAAuC,CAAC;AAEtD;;;;;GAKG;AACH,cAAc,gCAAgC,CAAC;AAE/C;;;;;GAKG;AACH,cAAc,
|
|
1
|
+
{"version":3,"file":"presentation-testing.js","sourceRoot":"","sources":["../../src/presentation-testing.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;;;;GAKG;AACH,cAAc,yCAAyC,CAAC;AAExD;;;;;GAKG;AACH,cAAc,uCAAuC,CAAC;AAEtD;;;;;GAKG;AACH,cAAc,gCAAgC,CAAC;AAE/C;;;;;GAKG;AACH,cAAc,wCAAwC,CAAC","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 IModel\r\n *\r\n * @docs-group-description IModel\r\n * Utilities for creating test iModels that can be used to exercise presentation rules.\r\n */\r\nexport * from \"./presentation-testing/IModelUtilities\";\r\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/presentation-testing",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0-dev.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
"ignore-styles": "^5.0.1"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@itwin/appui-abstract": "3.
|
|
29
|
-
"@itwin/build-tools": "3.
|
|
30
|
-
"@itwin/components-react": "3.
|
|
31
|
-
"@itwin/core-backend": "3.
|
|
32
|
-
"@itwin/core-bentley": "3.
|
|
33
|
-
"@itwin/core-common": "3.
|
|
34
|
-
"@itwin/core-frontend": "3.
|
|
35
|
-
"@itwin/eslint-plugin": "3.
|
|
36
|
-
"@itwin/presentation-backend": "3.
|
|
37
|
-
"@itwin/presentation-common": "3.
|
|
38
|
-
"@itwin/presentation-components": "3.
|
|
39
|
-
"@itwin/presentation-frontend": "3.
|
|
28
|
+
"@itwin/appui-abstract": "3.6.0-dev.1",
|
|
29
|
+
"@itwin/build-tools": "3.6.0-dev.1",
|
|
30
|
+
"@itwin/components-react": "3.6.0-dev.1",
|
|
31
|
+
"@itwin/core-backend": "3.6.0-dev.1",
|
|
32
|
+
"@itwin/core-bentley": "3.6.0-dev.1",
|
|
33
|
+
"@itwin/core-common": "3.6.0-dev.1",
|
|
34
|
+
"@itwin/core-frontend": "3.6.0-dev.1",
|
|
35
|
+
"@itwin/eslint-plugin": "3.6.0-dev.1",
|
|
36
|
+
"@itwin/presentation-backend": "3.6.0-dev.1",
|
|
37
|
+
"@itwin/presentation-common": "3.6.0-dev.1",
|
|
38
|
+
"@itwin/presentation-components": "3.6.0-dev.1",
|
|
39
|
+
"@itwin/presentation-frontend": "3.6.0-dev.1",
|
|
40
40
|
"@types/chai": "4.3.1",
|
|
41
41
|
"@types/chai-as-promised": "^7",
|
|
42
42
|
"@types/chai-jest-snapshot": "^1.3.0",
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module IModel
|
|
3
|
-
*/
|
|
4
|
-
import { Element, IModelDb } from "@itwin/core-backend";
|
|
5
|
-
import { Id64String } from "@itwin/core-bentley";
|
|
6
|
-
import { Code, CodeProps, LocalFileName, RelatedElement } from "@itwin/core-common";
|
|
7
|
-
export declare class IModelBuilder {
|
|
8
|
-
/**
|
|
9
|
-
* Create and insert a PhysicalPartition element (in the repositoryModel) and an associated PhysicalModel.
|
|
10
|
-
* @return [modeledElementId, modelId]
|
|
11
|
-
*/
|
|
12
|
-
static createAndInsertPhysicalPartitionAndModel(testImodel: IModelDb, newModelCode: CodeProps, privateModel?: boolean, parent?: Id64String): Id64String[];
|
|
13
|
-
/** Create and insert a PhysicalPartition element (in the repositoryModel) and an associated PhysicalModel. */
|
|
14
|
-
static createAndInsertPhysicalPartition(testDb: IModelDb, newModelCode: CodeProps, parentId?: Id64String): Id64String;
|
|
15
|
-
/** Create and insert a PhysicalPartition element (in the repositoryModel) and an associated PhysicalModel. */
|
|
16
|
-
static createAndInsertPhysicalModel(testDb: IModelDb, modeledElementRef: RelatedElement, privateModel?: boolean): Id64String;
|
|
17
|
-
/**
|
|
18
|
-
* Create and insert a DrawingPartition element (in the repositoryModel) and an associated DrawingModel.
|
|
19
|
-
* @return [modeledElementId, modelId]
|
|
20
|
-
*/
|
|
21
|
-
static createAndInsertDrawingPartitionAndModel(testImodel: IModelDb, newModelCode: CodeProps, privateModel?: boolean, parent?: Id64String): Id64String[];
|
|
22
|
-
/** Create and insert a DrawingPartition element (in the repositoryModel) and an associated DrawingModel. */
|
|
23
|
-
static createAndInsertDrawingPartition(testDb: IModelDb, newModelCode: CodeProps, parentId?: Id64String): Id64String;
|
|
24
|
-
/** Create and insert a DrawingPartition element (in the repositoryModel) and an associated DrawingModel. */
|
|
25
|
-
static createAndInsertDrawingModel(testDb: IModelDb, modeledElementRef: RelatedElement, privateModel?: boolean): Id64String;
|
|
26
|
-
static createDrawingGraphic(testImodel: IModelDb, modelId: Id64String, categoryId: Id64String, elemCode?: Code): Element;
|
|
27
|
-
static createPhysicalObject(testImodel: IModelDb, modelId: Id64String, categoryId: Id64String, elemCode?: Code): Element;
|
|
28
|
-
static getUniqueModelCode(testDb: IModelDb, newModelCodeBase: string): Code;
|
|
29
|
-
/** Generate a name for an iModel that's unique using the baseName provided and appending a new GUID. */
|
|
30
|
-
static generateUniqueName(baseName: string): string;
|
|
31
|
-
/** Prepare for an output file by:
|
|
32
|
-
* - Resolving the output file name under the known test output directory
|
|
33
|
-
* - Making directories as necessary
|
|
34
|
-
* - Removing a previous copy of the output file
|
|
35
|
-
* @param subDirName Sub-directory under known test output directory. Should match the name of the test file minus the .test.ts file extension.
|
|
36
|
-
* @param fileName Name of output fille
|
|
37
|
-
*/
|
|
38
|
-
static prepareOutputFile(subDirName: string, fileName: string): LocalFileName;
|
|
39
|
-
}
|
|
40
|
-
export declare class KnownTestLocations {
|
|
41
|
-
/** The directory where test assets are stored. Keep in mind that the test is playing the role of the app. */
|
|
42
|
-
static get assetsDir(): string;
|
|
43
|
-
/** The directory where tests can write. */
|
|
44
|
-
static get outputDir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,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,IAAI,GAAG,OAAO;WAWjH,oBAAoB,CAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,IAAI,GAAG,OAAO;WAUjH,kBAAkB,CAAC,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,GAAG,IAAI;IAalF,yGAAyG;WAC3F,kBAAkB,CAAC,QAAQ,EAAE,MAAM;IAIjD;;;;;;OAMG;WACW,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,aAAa;CAcrF;AAED,qBAAa,kBAAkB;IAE7B,6GAA6G;IAC7G,WAAkB,SAAS,IAAI,MAAM,CAEpC;IAED,2CAA2C;IAC3C,WAAkB,SAAS,IAAI,MAAM,CAOpC;CACF"}
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
/** @packageDocumentation
|
|
7
|
-
* @module IModel
|
|
8
|
-
*/
|
|
9
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
-
if (mod && mod.__esModule) return mod;
|
|
23
|
-
var result = {};
|
|
24
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
-
__setModuleDefault(result, mod);
|
|
26
|
-
return result;
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.KnownTestLocations = exports.IModelBuilder = void 0;
|
|
30
|
-
const core_backend_1 = require("@itwin/core-backend");
|
|
31
|
-
const core_bentley_1 = require("@itwin/core-bentley");
|
|
32
|
-
const core_common_1 = require("@itwin/core-common");
|
|
33
|
-
const chai_1 = require("chai");
|
|
34
|
-
const os_1 = require("os");
|
|
35
|
-
const path_1 = __importStar(require("path"));
|
|
36
|
-
class IModelBuilder {
|
|
37
|
-
/**
|
|
38
|
-
* Create and insert a PhysicalPartition element (in the repositoryModel) and an associated PhysicalModel.
|
|
39
|
-
* @return [modeledElementId, modelId]
|
|
40
|
-
*/
|
|
41
|
-
static createAndInsertPhysicalPartitionAndModel(testImodel, newModelCode, privateModel = false, parent) {
|
|
42
|
-
const eid = IModelBuilder.createAndInsertPhysicalPartition(testImodel, newModelCode, parent);
|
|
43
|
-
const modeledElementRef = new core_common_1.RelatedElement({ id: eid });
|
|
44
|
-
const mid = IModelBuilder.createAndInsertPhysicalModel(testImodel, modeledElementRef, privateModel);
|
|
45
|
-
return [eid, mid];
|
|
46
|
-
}
|
|
47
|
-
/** Create and insert a PhysicalPartition element (in the repositoryModel) and an associated PhysicalModel. */
|
|
48
|
-
static createAndInsertPhysicalPartition(testDb, newModelCode, parentId) {
|
|
49
|
-
const model = parentId ? testDb.elements.getElement(parentId).model : core_common_1.IModel.repositoryModelId;
|
|
50
|
-
const parent = new core_backend_1.SubjectOwnsPartitionElements(parentId || core_common_1.IModel.rootSubjectId);
|
|
51
|
-
const modeledElementProps = {
|
|
52
|
-
classFullName: core_backend_1.PhysicalPartition.classFullName,
|
|
53
|
-
parent,
|
|
54
|
-
model,
|
|
55
|
-
code: newModelCode,
|
|
56
|
-
};
|
|
57
|
-
const modeledElement = testDb.elements.createElement(modeledElementProps);
|
|
58
|
-
return testDb.elements.insertElement(modeledElement.toJSON());
|
|
59
|
-
}
|
|
60
|
-
/** Create and insert a PhysicalPartition element (in the repositoryModel) and an associated PhysicalModel. */
|
|
61
|
-
static createAndInsertPhysicalModel(testDb, modeledElementRef, privateModel = false) {
|
|
62
|
-
const newModel = testDb.models.createModel({ modeledElement: modeledElementRef, classFullName: core_backend_1.PhysicalModel.classFullName, isPrivate: privateModel });
|
|
63
|
-
const newModelId = newModel.id = testDb.models.insertModel(newModel.toJSON());
|
|
64
|
-
chai_1.assert.isTrue(core_bentley_1.Id64.isValidId64(newModelId));
|
|
65
|
-
chai_1.assert.isTrue(core_bentley_1.Id64.isValidId64(newModel.id));
|
|
66
|
-
chai_1.assert.deepEqual(newModelId, newModel.id);
|
|
67
|
-
return newModelId;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Create and insert a DrawingPartition element (in the repositoryModel) and an associated DrawingModel.
|
|
71
|
-
* @return [modeledElementId, modelId]
|
|
72
|
-
*/
|
|
73
|
-
static createAndInsertDrawingPartitionAndModel(testImodel, newModelCode, privateModel = false, parent) {
|
|
74
|
-
const eid = IModelBuilder.createAndInsertDrawingPartition(testImodel, newModelCode, parent);
|
|
75
|
-
const modeledElementRef = new core_common_1.RelatedElement({ id: eid });
|
|
76
|
-
const mid = IModelBuilder.createAndInsertDrawingModel(testImodel, modeledElementRef, privateModel);
|
|
77
|
-
return [eid, mid];
|
|
78
|
-
}
|
|
79
|
-
/** Create and insert a DrawingPartition element (in the repositoryModel) and an associated DrawingModel. */
|
|
80
|
-
static createAndInsertDrawingPartition(testDb, newModelCode, parentId) {
|
|
81
|
-
const model = parentId ? testDb.elements.getElement(parentId).model : core_common_1.IModel.repositoryModelId;
|
|
82
|
-
const parent = new core_backend_1.SubjectOwnsPartitionElements(parentId || core_common_1.IModel.rootSubjectId);
|
|
83
|
-
const modeledElementProps = {
|
|
84
|
-
classFullName: core_backend_1.Drawing.classFullName,
|
|
85
|
-
parent,
|
|
86
|
-
model,
|
|
87
|
-
code: newModelCode,
|
|
88
|
-
};
|
|
89
|
-
const modeledElement = testDb.elements.createElement(modeledElementProps);
|
|
90
|
-
return testDb.elements.insertElement(modeledElement.toJSON());
|
|
91
|
-
}
|
|
92
|
-
/** Create and insert a DrawingPartition element (in the repositoryModel) and an associated DrawingModel. */
|
|
93
|
-
static createAndInsertDrawingModel(testDb, modeledElementRef, privateModel = false) {
|
|
94
|
-
const newModel = testDb.models.createModel({ modeledElement: modeledElementRef, classFullName: core_backend_1.DrawingModel.classFullName, isPrivate: privateModel });
|
|
95
|
-
const newModelId = newModel.id = testDb.models.insertModel(newModel.toJSON());
|
|
96
|
-
chai_1.assert.isTrue(core_bentley_1.Id64.isValidId64(newModelId));
|
|
97
|
-
chai_1.assert.isTrue(core_bentley_1.Id64.isValidId64(newModel.id));
|
|
98
|
-
chai_1.assert.deepEqual(newModelId, newModel.id);
|
|
99
|
-
return newModelId;
|
|
100
|
-
}
|
|
101
|
-
// Create a DrawingObject. (Does not insert it.)
|
|
102
|
-
static createDrawingGraphic(testImodel, modelId, categoryId, elemCode) {
|
|
103
|
-
const elementProps = {
|
|
104
|
-
classFullName: "BisCore:DrawingGraphic",
|
|
105
|
-
model: modelId,
|
|
106
|
-
category: categoryId,
|
|
107
|
-
code: elemCode ? elemCode : core_common_1.Code.createEmpty(),
|
|
108
|
-
};
|
|
109
|
-
return testImodel.elements.createElement(elementProps);
|
|
110
|
-
}
|
|
111
|
-
// Create a PhysicalObject. (Does not insert it.)
|
|
112
|
-
static createPhysicalObject(testImodel, modelId, categoryId, elemCode) {
|
|
113
|
-
const elementProps = {
|
|
114
|
-
classFullName: "Generic:PhysicalObject",
|
|
115
|
-
model: modelId,
|
|
116
|
-
category: categoryId,
|
|
117
|
-
code: elemCode ? elemCode : core_common_1.Code.createEmpty(),
|
|
118
|
-
};
|
|
119
|
-
return testImodel.elements.createElement(elementProps);
|
|
120
|
-
}
|
|
121
|
-
static getUniqueModelCode(testDb, newModelCodeBase) {
|
|
122
|
-
let newModelCode = newModelCodeBase;
|
|
123
|
-
let iter = 0;
|
|
124
|
-
while (true) {
|
|
125
|
-
const modelCode = core_backend_1.InformationPartitionElement.createCode(testDb, core_common_1.IModel.rootSubjectId, newModelCode);
|
|
126
|
-
if (testDb.elements.queryElementIdByCode(modelCode) === undefined)
|
|
127
|
-
return modelCode;
|
|
128
|
-
newModelCode = newModelCodeBase + iter;
|
|
129
|
-
++iter;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
/** Generate a name for an iModel that's unique using the baseName provided and appending a new GUID. */
|
|
133
|
-
static generateUniqueName(baseName) {
|
|
134
|
-
return `${baseName} - ${core_bentley_1.Guid.createValue()}`;
|
|
135
|
-
}
|
|
136
|
-
/** Prepare for an output file by:
|
|
137
|
-
* - Resolving the output file name under the known test output directory
|
|
138
|
-
* - Making directories as necessary
|
|
139
|
-
* - Removing a previous copy of the output file
|
|
140
|
-
* @param subDirName Sub-directory under known test output directory. Should match the name of the test file minus the .test.ts file extension.
|
|
141
|
-
* @param fileName Name of output fille
|
|
142
|
-
*/
|
|
143
|
-
static prepareOutputFile(subDirName, fileName) {
|
|
144
|
-
if (!core_backend_1.IModelJsFs.existsSync(KnownTestLocations.outputDir))
|
|
145
|
-
core_backend_1.IModelJsFs.mkdirSync(KnownTestLocations.outputDir);
|
|
146
|
-
const outputDir = path_1.default.join(KnownTestLocations.outputDir, subDirName);
|
|
147
|
-
if (!core_backend_1.IModelJsFs.existsSync(outputDir))
|
|
148
|
-
core_backend_1.IModelJsFs.mkdirSync(outputDir);
|
|
149
|
-
const outputFile = path_1.default.join(outputDir, fileName);
|
|
150
|
-
if (core_backend_1.IModelJsFs.existsSync(outputFile))
|
|
151
|
-
core_backend_1.IModelJsFs.unlinkSync(outputFile);
|
|
152
|
-
return outputFile;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
exports.IModelBuilder = IModelBuilder;
|
|
156
|
-
class KnownTestLocations {
|
|
157
|
-
/** The directory where test assets are stored. Keep in mind that the test is playing the role of the app. */
|
|
158
|
-
static get assetsDir() {
|
|
159
|
-
return (0, path_1.join)(__dirname, "assets");
|
|
160
|
-
}
|
|
161
|
-
/** The directory where tests can write. */
|
|
162
|
-
static get outputDir() {
|
|
163
|
-
if (core_bentley_1.ProcessDetector.isMobileAppBackend) {
|
|
164
|
-
return (0, path_1.join)((0, os_1.tmpdir)(), "output");
|
|
165
|
-
}
|
|
166
|
-
// Assume that we are running in nodejs
|
|
167
|
-
return (0, path_1.join)(__dirname, "output");
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
exports.KnownTestLocations = KnownTestLocations;
|
|
171
|
-
//# sourceMappingURL=IModelBuilder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IModelBuilder.js","sourceRoot":"","sources":["../../../src/presentation-testing/IModelBuilder.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;;;;;;;;;;;;;;;;;AAEH,sDAAwL;AACxL,sDAA8E;AAC9E,oDAAyJ;AACzJ,+BAA8B;AAC9B,2BAA4B;AAC5B,6CAAkC;AAElC,MAAa,aAAa;IACxB;;;OAGG;IACI,MAAM,CAAC,wCAAwC,CAAC,UAAoB,EAAE,YAAuB,EAAE,eAAwB,KAAK,EAAE,MAAmB;QACtJ,MAAM,GAAG,GAAG,aAAa,CAAC,gCAAgC,CAAC,UAAU,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;QAC7F,MAAM,iBAAiB,GAAG,IAAI,4BAAc,CAAC,EAAE,EAAE,EAAE,GAAG,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CAAC,CAAC;QAElC,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;QAClD,IAAI,yBAAU,CAAC,UAAU,CAAC,UAAU,CAAC;YACnC,yBAAU,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAEpC,OAAO,UAAU,CAAC;IACpB,CAAC;CACF;AAtID,sCAsIC;AAED,MAAa,kBAAkB;IAE7B,6GAA6G;IACtG,MAAM,KAAK,SAAS;QACzB,OAAO,IAAA,WAAI,EAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACnC,CAAC;IAED,2CAA2C;IACpC,MAAM,KAAK,SAAS;QACzB,IAAI,8BAAe,CAAC,kBAAkB,EAAE;YACtC,OAAO,IAAA,WAAI,EAAC,IAAA,WAAM,GAAE,EAAE,QAAQ,CAAC,CAAC;SACjC;QAED,uCAAuC;QACvC,OAAO,IAAA,WAAI,EAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACnC,CAAC;CACF;AAhBD,gDAgBC","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 IModel\r\n */\r\n\r\nimport { Drawing, DrawingModel, Element, IModelDb, IModelJsFs, InformationPartitionElement, PhysicalModel, PhysicalPartition, SubjectOwnsPartitionElements } from \"@itwin/core-backend\";\r\nimport { Guid, Id64, Id64String, ProcessDetector } from \"@itwin/core-bentley\";\r\nimport { Code, CodeProps, ElementProps, GeometricElement2dProps, IModel, LocalFileName, PhysicalElementProps, RelatedElement } from \"@itwin/core-common\";\r\nimport { assert } from \"chai\";\r\nimport { tmpdir } from \"os\";\r\nimport path, { join } from \"path\";\r\n\r\nexport class IModelBuilder {\r\n /**\r\n * Create and insert a PhysicalPartition element (in the repositoryModel) and an associated PhysicalModel.\r\n * @return [modeledElementId, modelId]\r\n */\r\n public static createAndInsertPhysicalPartitionAndModel(testImodel: IModelDb, newModelCode: CodeProps, privateModel: boolean = false, parent?: Id64String): Id64String[] {\r\n const eid = IModelBuilder.createAndInsertPhysicalPartition(testImodel, newModelCode, parent);\r\n const modeledElementRef = new RelatedElement({ id: eid });\r\n const mid = IModelBuilder.createAndInsertPhysicalModel(testImodel, modeledElementRef, privateModel);\r\n return [eid, mid];\r\n }\r\n\r\n /** Create and insert a PhysicalPartition element (in the repositoryModel) and an associated PhysicalModel. */\r\n public static createAndInsertPhysicalPartition(testDb: IModelDb, newModelCode: CodeProps, parentId?: Id64String): Id64String {\r\n const model = parentId ? testDb.elements.getElement(parentId).model : IModel.repositoryModelId;\r\n const parent = new SubjectOwnsPartitionElements(parentId || IModel.rootSubjectId);\r\n\r\n const modeledElementProps: ElementProps = {\r\n classFullName: PhysicalPartition.classFullName,\r\n parent,\r\n model,\r\n code: newModelCode,\r\n };\r\n const modeledElement: Element = testDb.elements.createElement(modeledElementProps);\r\n return testDb.elements.insertElement(modeledElement.toJSON());\r\n }\r\n\r\n /** Create and insert a PhysicalPartition element (in the repositoryModel) and an associated PhysicalModel. */\r\n public static createAndInsertPhysicalModel(testDb: IModelDb, modeledElementRef: RelatedElement, privateModel: boolean = false): Id64String {\r\n const newModel = testDb.models.createModel({ modeledElement: modeledElementRef, classFullName: PhysicalModel.classFullName, isPrivate: privateModel });\r\n const newModelId = newModel.id = testDb.models.insertModel(newModel.toJSON());\r\n assert.isTrue(Id64.isValidId64(newModelId));\r\n assert.isTrue(Id64.isValidId64(newModel.id));\r\n assert.deepEqual(newModelId, newModel.id);\r\n return newModelId;\r\n }\r\n\r\n /**\r\n * Create and insert a DrawingPartition element (in the repositoryModel) and an associated DrawingModel.\r\n * @return [modeledElementId, modelId]\r\n */\r\n public static createAndInsertDrawingPartitionAndModel(testImodel: IModelDb, newModelCode: CodeProps, privateModel: boolean = false, parent?: Id64String): Id64String[] {\r\n const eid = IModelBuilder.createAndInsertDrawingPartition(testImodel, newModelCode, parent);\r\n const modeledElementRef = new RelatedElement({ id: eid });\r\n const mid = IModelBuilder.createAndInsertDrawingModel(testImodel, modeledElementRef, privateModel);\r\n return [eid, mid];\r\n }\r\n\r\n /** Create and insert a DrawingPartition element (in the repositoryModel) and an associated DrawingModel. */\r\n public static createAndInsertDrawingPartition(testDb: IModelDb, newModelCode: CodeProps, parentId?: Id64String): Id64String {\r\n const model = parentId ? testDb.elements.getElement(parentId).model : IModel.repositoryModelId;\r\n const parent = new SubjectOwnsPartitionElements(parentId || IModel.rootSubjectId);\r\n\r\n const modeledElementProps: ElementProps = {\r\n classFullName: Drawing.classFullName,\r\n parent,\r\n model,\r\n code: newModelCode,\r\n };\r\n const modeledElement: Element = testDb.elements.createElement(modeledElementProps);\r\n return testDb.elements.insertElement(modeledElement.toJSON());\r\n }\r\n\r\n /** Create and insert a DrawingPartition element (in the repositoryModel) and an associated DrawingModel. */\r\n public static createAndInsertDrawingModel(testDb: IModelDb, modeledElementRef: RelatedElement, privateModel: boolean = false): Id64String {\r\n const newModel = testDb.models.createModel({ modeledElement: modeledElementRef, classFullName: DrawingModel.classFullName, isPrivate: privateModel });\r\n const newModelId = newModel.id = testDb.models.insertModel(newModel.toJSON());\r\n assert.isTrue(Id64.isValidId64(newModelId));\r\n assert.isTrue(Id64.isValidId64(newModel.id));\r\n assert.deepEqual(newModelId, newModel.id);\r\n return newModelId;\r\n }\r\n\r\n // Create a DrawingObject. (Does not insert it.)\r\n public static createDrawingGraphic(testImodel: IModelDb, modelId: Id64String, categoryId: Id64String, elemCode?: Code): Element {\r\n const elementProps: GeometricElement2dProps = {\r\n classFullName: \"BisCore:DrawingGraphic\",\r\n model: modelId,\r\n category: categoryId,\r\n code: elemCode ? elemCode : Code.createEmpty(),\r\n };\r\n return testImodel.elements.createElement(elementProps);\r\n }\r\n\r\n // Create a PhysicalObject. (Does not insert it.)\r\n public static createPhysicalObject(testImodel: IModelDb, modelId: Id64String, categoryId: Id64String, elemCode?: Code): Element {\r\n const elementProps: PhysicalElementProps = {\r\n classFullName: \"Generic:PhysicalObject\",\r\n model: modelId,\r\n category: categoryId,\r\n code: elemCode ? elemCode : Code.createEmpty(),\r\n };\r\n return testImodel.elements.createElement(elementProps);\r\n }\r\n\r\n public static getUniqueModelCode(testDb: IModelDb, newModelCodeBase: string): Code {\r\n let newModelCode: string = newModelCodeBase;\r\n let iter: number = 0;\r\n while (true) {\r\n const modelCode = InformationPartitionElement.createCode(testDb, IModel.rootSubjectId, newModelCode);\r\n if (testDb.elements.queryElementIdByCode(modelCode) === undefined)\r\n return modelCode;\r\n\r\n newModelCode = newModelCodeBase + iter;\r\n ++iter;\r\n }\r\n }\r\n\r\n /** Generate a name for an iModel that's unique using the baseName provided and appending a new GUID. */\r\n public static generateUniqueName(baseName: string) {\r\n return `${baseName} - ${Guid.createValue()}`;\r\n }\r\n\r\n /** Prepare for an output file by:\r\n * - Resolving the output file name under the known test output directory\r\n * - Making directories as necessary\r\n * - Removing a previous copy of the output file\r\n * @param subDirName Sub-directory under known test output directory. Should match the name of the test file minus the .test.ts file extension.\r\n * @param fileName Name of output fille\r\n */\r\n public static prepareOutputFile(subDirName: string, fileName: string): LocalFileName {\r\n if (!IModelJsFs.existsSync(KnownTestLocations.outputDir))\r\n IModelJsFs.mkdirSync(KnownTestLocations.outputDir);\r\n\r\n const outputDir = path.join(KnownTestLocations.outputDir, subDirName);\r\n if (!IModelJsFs.existsSync(outputDir))\r\n IModelJsFs.mkdirSync(outputDir);\r\n\r\n const outputFile = path.join(outputDir, fileName);\r\n if (IModelJsFs.existsSync(outputFile))\r\n IModelJsFs.unlinkSync(outputFile);\r\n\r\n return outputFile;\r\n }\r\n}\r\n\r\nexport class KnownTestLocations {\r\n\r\n /** The directory where test assets are stored. Keep in mind that the test is playing the role of the app. */\r\n public static get assetsDir(): string {\r\n return join(__dirname, \"assets\");\r\n }\r\n\r\n /** The directory where tests can write. */\r\n public static get outputDir(): string {\r\n if (ProcessDetector.isMobileAppBackend) {\r\n return join(tmpdir(), \"output\");\r\n }\r\n\r\n // Assume that we are running in nodejs\r\n return join(__dirname, \"output\");\r\n }\r\n}\r\n"]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { GuidString } from "@itwin/core-bentley";
|
|
2
|
-
import { Code, ElementProps } from "@itwin/core-common";
|
|
3
|
-
/**
|
|
4
|
-
* Test utility to push an iModel.
|
|
5
|
-
*
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export declare class IModelTestUtility {
|
|
9
|
-
iTwinId: GuidString;
|
|
10
|
-
iModelId: string;
|
|
11
|
-
outputFile: string;
|
|
12
|
-
private _iModel;
|
|
13
|
-
private _modelId;
|
|
14
|
-
createIModel(): void;
|
|
15
|
-
addPhysicalModel(): string;
|
|
16
|
-
addDrawingModel(): string;
|
|
17
|
-
addSpatialCategory(elementProps: ElementProps): string;
|
|
18
|
-
addDrawingCategory(elementProps: ElementProps): string;
|
|
19
|
-
addPhysicalObject(categoryId: string): void;
|
|
20
|
-
addDrawingGraphic(categoryId: string): void;
|
|
21
|
-
getSpatialCategoryCode(codeValue: string): Code;
|
|
22
|
-
getDrawingCategoryCode(codeValue: string): Code;
|
|
23
|
-
closeIModel(): void;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=IModelTestUtility.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IModelTestUtility.d.ts","sourceRoot":"","sources":["../../../src/presentation-testing/IModelTestUtility.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGxD;;;;GAIG;AACH,qBAAa,iBAAiB;IACrB,OAAO,EAAG,UAAU,CAAC;IACrB,QAAQ,EAAG,MAAM,CAAC;IAClB,UAAU,EAAG,MAAM,CAAC;IAC3B,OAAO,CAAC,OAAO,CAAY;IAC3B,OAAO,CAAC,QAAQ,CAAU;IAEnB,YAAY,IAAI,IAAI;IAMpB,gBAAgB,IAAI,MAAM;IAM1B,eAAe,IAAI,MAAM;IAMzB,kBAAkB,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM;IAMtD,kBAAkB,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM;IAMtD,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAK3C,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAK3C,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAI/C,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAI/C,WAAW,IAAI,IAAI;CAG3B"}
|
|
@@ -1,63 +0,0 @@
|
|
|
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
|
-
//# sourceMappingURL=IModelTestUtility.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,GAAG,6BAAa,CAAC,wCAAwC,CAAC,IAAI,CAAC,OAAO,EAAE,6BAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,OAAO,EAAE,mBAAmB,CAAC,EAAE,KAAK,CAAC,CAAC;QACrK,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;QAC7C,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAEM,eAAe;QACpB,CAAC,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AAC,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,46 +0,0 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module IModel
|
|
3
|
-
*/
|
|
4
|
-
import { Element, IModelDb } from "@itwin/core-backend";
|
|
5
|
-
import { Id64String } from "@itwin/core-bentley";
|
|
6
|
-
import { Code, CodeProps, LocalFileName, RelatedElement } from "@itwin/core-common";
|
|
7
|
-
export declare class IModelBuilder {
|
|
8
|
-
/**
|
|
9
|
-
* Create and insert a PhysicalPartition element (in the repositoryModel) and an associated PhysicalModel.
|
|
10
|
-
* @return [modeledElementId, modelId]
|
|
11
|
-
*/
|
|
12
|
-
static createAndInsertPhysicalPartitionAndModel(testImodel: IModelDb, newModelCode: CodeProps, privateModel?: boolean, parent?: Id64String): Id64String[];
|
|
13
|
-
/** Create and insert a PhysicalPartition element (in the repositoryModel) and an associated PhysicalModel. */
|
|
14
|
-
static createAndInsertPhysicalPartition(testDb: IModelDb, newModelCode: CodeProps, parentId?: Id64String): Id64String;
|
|
15
|
-
/** Create and insert a PhysicalPartition element (in the repositoryModel) and an associated PhysicalModel. */
|
|
16
|
-
static createAndInsertPhysicalModel(testDb: IModelDb, modeledElementRef: RelatedElement, privateModel?: boolean): Id64String;
|
|
17
|
-
/**
|
|
18
|
-
* Create and insert a DrawingPartition element (in the repositoryModel) and an associated DrawingModel.
|
|
19
|
-
* @return [modeledElementId, modelId]
|
|
20
|
-
*/
|
|
21
|
-
static createAndInsertDrawingPartitionAndModel(testImodel: IModelDb, newModelCode: CodeProps, privateModel?: boolean, parent?: Id64String): Id64String[];
|
|
22
|
-
/** Create and insert a DrawingPartition element (in the repositoryModel) and an associated DrawingModel. */
|
|
23
|
-
static createAndInsertDrawingPartition(testDb: IModelDb, newModelCode: CodeProps, parentId?: Id64String): Id64String;
|
|
24
|
-
/** Create and insert a DrawingPartition element (in the repositoryModel) and an associated DrawingModel. */
|
|
25
|
-
static createAndInsertDrawingModel(testDb: IModelDb, modeledElementRef: RelatedElement, privateModel?: boolean): Id64String;
|
|
26
|
-
static createDrawingGraphic(testImodel: IModelDb, modelId: Id64String, categoryId: Id64String, elemCode?: Code): Element;
|
|
27
|
-
static createPhysicalObject(testImodel: IModelDb, modelId: Id64String, categoryId: Id64String, elemCode?: Code): Element;
|
|
28
|
-
static getUniqueModelCode(testDb: IModelDb, newModelCodeBase: string): Code;
|
|
29
|
-
/** Generate a name for an iModel that's unique using the baseName provided and appending a new GUID. */
|
|
30
|
-
static generateUniqueName(baseName: string): string;
|
|
31
|
-
/** Prepare for an output file by:
|
|
32
|
-
* - Resolving the output file name under the known test output directory
|
|
33
|
-
* - Making directories as necessary
|
|
34
|
-
* - Removing a previous copy of the output file
|
|
35
|
-
* @param subDirName Sub-directory under known test output directory. Should match the name of the test file minus the .test.ts file extension.
|
|
36
|
-
* @param fileName Name of output fille
|
|
37
|
-
*/
|
|
38
|
-
static prepareOutputFile(subDirName: string, fileName: string): LocalFileName;
|
|
39
|
-
}
|
|
40
|
-
export declare class KnownTestLocations {
|
|
41
|
-
/** The directory where test assets are stored. Keep in mind that the test is playing the role of the app. */
|
|
42
|
-
static get assetsDir(): string;
|
|
43
|
-
/** The directory where tests can write. */
|
|
44
|
-
static get outputDir(): string;
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=IModelBuilder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IModelBuilder.d.ts","sourceRoot":"","sources":["../../../src/presentation-testing/IModelBuilder.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAyB,OAAO,EAAE,QAAQ,EAA2G,MAAM,qBAAqB,CAAC;AACxL,OAAO,EAAc,UAAU,EAAmB,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,SAAS,EAAiD,aAAa,EAAwB,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAKzJ,qBAAa,aAAa;IACxB;;;OAGG;WACW,wCAAwC,CAAC,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,GAAE,OAAe,EAAE,MAAM,CAAC,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