@itwin/core-backend 5.9.0-dev.3 → 5.9.0-dev.5
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/BriefcaseManager.js +3 -3
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/Category.d.ts +37 -7
- package/lib/cjs/Category.d.ts.map +1 -1
- package/lib/cjs/Category.js +33 -42
- package/lib/cjs/Category.js.map +1 -1
- package/lib/cjs/ChangesetECAdaptor.d.ts.map +1 -1
- package/lib/cjs/ChangesetECAdaptor.js +5 -2
- package/lib/cjs/ChangesetECAdaptor.js.map +1 -1
- package/lib/cjs/ChannelControl.d.ts +29 -0
- package/lib/cjs/ChannelControl.d.ts.map +1 -1
- package/lib/cjs/ChannelControl.js.map +1 -1
- package/lib/cjs/CheckpointManager.js +1 -1
- package/lib/cjs/CheckpointManager.js.map +1 -1
- package/lib/cjs/CodeSpecs.d.ts +32 -3
- package/lib/cjs/CodeSpecs.d.ts.map +1 -1
- package/lib/cjs/CodeSpecs.js +48 -20
- package/lib/cjs/CodeSpecs.js.map +1 -1
- package/lib/cjs/DisplayStyle.d.ts +18 -3
- package/lib/cjs/DisplayStyle.d.ts.map +1 -1
- package/lib/cjs/DisplayStyle.js +10 -21
- package/lib/cjs/DisplayStyle.js.map +1 -1
- package/lib/cjs/EditTxn.d.ts +262 -0
- package/lib/cjs/EditTxn.d.ts.map +1 -0
- package/lib/cjs/EditTxn.js +548 -0
- package/lib/cjs/EditTxn.js.map +1 -0
- package/lib/cjs/Element.d.ts +74 -5
- package/lib/cjs/Element.d.ts.map +1 -1
- package/lib/cjs/Element.js +63 -75
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/ElementAspect.d.ts +10 -0
- package/lib/cjs/ElementAspect.d.ts.map +1 -1
- package/lib/cjs/ElementAspect.js +21 -12
- package/lib/cjs/ElementAspect.js.map +1 -1
- package/lib/cjs/ElementTreeWalker.d.ts +56 -3
- package/lib/cjs/ElementTreeWalker.d.ts.map +1 -1
- package/lib/cjs/ElementTreeWalker.js +53 -40
- package/lib/cjs/ElementTreeWalker.js.map +1 -1
- package/lib/cjs/ExternalSource.d.ts +11 -2
- package/lib/cjs/ExternalSource.d.ts.map +1 -1
- package/lib/cjs/ExternalSource.js +10 -8
- package/lib/cjs/ExternalSource.js.map +1 -1
- package/lib/cjs/IModelDb.d.ts +66 -22
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +174 -288
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelHost.d.ts +22 -0
- package/lib/cjs/IModelHost.d.ts.map +1 -1
- package/lib/cjs/IModelHost.js +9 -0
- package/lib/cjs/IModelHost.js.map +1 -1
- package/lib/cjs/IpcHost.js +2 -2
- package/lib/cjs/IpcHost.js.map +1 -1
- package/lib/cjs/LineStyle.d.ts +47 -7
- package/lib/cjs/LineStyle.d.ts.map +1 -1
- package/lib/cjs/LineStyle.js +38 -33
- package/lib/cjs/LineStyle.js.map +1 -1
- package/lib/cjs/Material.d.ts +8 -1
- package/lib/cjs/Material.d.ts.map +1 -1
- package/lib/cjs/Material.js +6 -12
- package/lib/cjs/Material.js.map +1 -1
- package/lib/cjs/Model.d.ts +59 -20
- package/lib/cjs/Model.d.ts.map +1 -1
- package/lib/cjs/Model.js +38 -80
- package/lib/cjs/Model.js.map +1 -1
- package/lib/cjs/Relationship.d.ts +72 -7
- package/lib/cjs/Relationship.d.ts.map +1 -1
- package/lib/cjs/Relationship.js +39 -21
- package/lib/cjs/Relationship.js.map +1 -1
- package/lib/cjs/SchemaSync.js +4 -4
- package/lib/cjs/SchemaSync.js.map +1 -1
- package/lib/cjs/SheetIndex.d.ts +9 -0
- package/lib/cjs/SheetIndex.d.ts.map +1 -1
- package/lib/cjs/SheetIndex.js +38 -35
- package/lib/cjs/SheetIndex.js.map +1 -1
- package/lib/cjs/StashManager.js +1 -1
- package/lib/cjs/StashManager.js.map +1 -1
- package/lib/cjs/Texture.d.ts +6 -0
- package/lib/cjs/Texture.d.ts.map +1 -1
- package/lib/cjs/Texture.js +6 -14
- package/lib/cjs/Texture.js.map +1 -1
- package/lib/cjs/TxnManager.d.ts +5 -5
- package/lib/cjs/TxnManager.d.ts.map +1 -1
- package/lib/cjs/TxnManager.js +23 -7
- package/lib/cjs/TxnManager.js.map +1 -1
- package/lib/cjs/ViewDefinition.d.ts +21 -1
- package/lib/cjs/ViewDefinition.d.ts.map +1 -1
- package/lib/cjs/ViewDefinition.js +27 -66
- package/lib/cjs/ViewDefinition.js.map +1 -1
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +14 -6
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +33 -27
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
- package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -1
- package/lib/cjs/annotations/TextAnnotationElement.js +6 -5
- package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/cjs/core-backend.d.ts +1 -0
- package/lib/cjs/core-backend.d.ts.map +1 -1
- package/lib/cjs/core-backend.js +1 -0
- package/lib/cjs/core-backend.js.map +1 -1
- package/lib/cjs/domains/FunctionalElements.d.ts +6 -2
- package/lib/cjs/domains/FunctionalElements.d.ts.map +1 -1
- package/lib/cjs/domains/FunctionalElements.js +8 -13
- package/lib/cjs/domains/FunctionalElements.js.map +1 -1
- package/lib/cjs/domains/GenericElements.d.ts +11 -4
- package/lib/cjs/domains/GenericElements.d.ts.map +1 -1
- package/lib/cjs/domains/GenericElements.js +13 -24
- package/lib/cjs/domains/GenericElements.js.map +1 -1
- package/lib/cjs/internal/ChannelAdmin.d.ts +15 -0
- package/lib/cjs/internal/ChannelAdmin.d.ts.map +1 -1
- package/lib/cjs/internal/ChannelAdmin.js +5 -3
- package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
- package/lib/cjs/internal/Symbols.d.ts +4 -0
- package/lib/cjs/internal/Symbols.d.ts.map +1 -1
- package/lib/cjs/internal/Symbols.js +5 -1
- package/lib/cjs/internal/Symbols.js.map +1 -1
- package/lib/cjs/internal/annotations/fields.d.ts +3 -2
- package/lib/cjs/internal/annotations/fields.d.ts.map +1 -1
- package/lib/cjs/internal/annotations/fields.js +7 -6
- package/lib/cjs/internal/annotations/fields.js.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/esm/BriefcaseManager.js +3 -3
- package/lib/esm/BriefcaseManager.js.map +1 -1
- package/lib/esm/Category.d.ts +37 -7
- package/lib/esm/Category.d.ts.map +1 -1
- package/lib/esm/Category.js +33 -42
- package/lib/esm/Category.js.map +1 -1
- package/lib/esm/ChangesetECAdaptor.d.ts.map +1 -1
- package/lib/esm/ChangesetECAdaptor.js +5 -2
- package/lib/esm/ChangesetECAdaptor.js.map +1 -1
- package/lib/esm/ChannelControl.d.ts +29 -0
- package/lib/esm/ChannelControl.d.ts.map +1 -1
- package/lib/esm/ChannelControl.js.map +1 -1
- package/lib/esm/CheckpointManager.js +1 -1
- package/lib/esm/CheckpointManager.js.map +1 -1
- package/lib/esm/CodeSpecs.d.ts +32 -3
- package/lib/esm/CodeSpecs.d.ts.map +1 -1
- package/lib/esm/CodeSpecs.js +49 -21
- package/lib/esm/CodeSpecs.js.map +1 -1
- package/lib/esm/DisplayStyle.d.ts +18 -3
- package/lib/esm/DisplayStyle.d.ts.map +1 -1
- package/lib/esm/DisplayStyle.js +10 -21
- package/lib/esm/DisplayStyle.js.map +1 -1
- package/lib/esm/EditTxn.d.ts +262 -0
- package/lib/esm/EditTxn.d.ts.map +1 -0
- package/lib/esm/EditTxn.js +543 -0
- package/lib/esm/EditTxn.js.map +1 -0
- package/lib/esm/Element.d.ts +74 -5
- package/lib/esm/Element.d.ts.map +1 -1
- package/lib/esm/Element.js +64 -76
- package/lib/esm/Element.js.map +1 -1
- package/lib/esm/ElementAspect.d.ts +10 -0
- package/lib/esm/ElementAspect.d.ts.map +1 -1
- package/lib/esm/ElementAspect.js +22 -13
- package/lib/esm/ElementAspect.js.map +1 -1
- package/lib/esm/ElementTreeWalker.d.ts +56 -3
- package/lib/esm/ElementTreeWalker.d.ts.map +1 -1
- package/lib/esm/ElementTreeWalker.js +53 -40
- package/lib/esm/ElementTreeWalker.js.map +1 -1
- package/lib/esm/ExternalSource.d.ts +11 -2
- package/lib/esm/ExternalSource.d.ts.map +1 -1
- package/lib/esm/ExternalSource.js +10 -8
- package/lib/esm/ExternalSource.js.map +1 -1
- package/lib/esm/IModelDb.d.ts +66 -22
- package/lib/esm/IModelDb.d.ts.map +1 -1
- package/lib/esm/IModelDb.js +176 -290
- package/lib/esm/IModelDb.js.map +1 -1
- package/lib/esm/IModelHost.d.ts +22 -0
- package/lib/esm/IModelHost.d.ts.map +1 -1
- package/lib/esm/IModelHost.js +9 -0
- package/lib/esm/IModelHost.js.map +1 -1
- package/lib/esm/IpcHost.js +3 -3
- package/lib/esm/IpcHost.js.map +1 -1
- package/lib/esm/LineStyle.d.ts +47 -7
- package/lib/esm/LineStyle.d.ts.map +1 -1
- package/lib/esm/LineStyle.js +38 -33
- package/lib/esm/LineStyle.js.map +1 -1
- package/lib/esm/Material.d.ts +8 -1
- package/lib/esm/Material.d.ts.map +1 -1
- package/lib/esm/Material.js +6 -12
- package/lib/esm/Material.js.map +1 -1
- package/lib/esm/Model.d.ts +59 -20
- package/lib/esm/Model.d.ts.map +1 -1
- package/lib/esm/Model.js +39 -81
- package/lib/esm/Model.js.map +1 -1
- package/lib/esm/Relationship.d.ts +72 -7
- package/lib/esm/Relationship.d.ts.map +1 -1
- package/lib/esm/Relationship.js +40 -22
- package/lib/esm/Relationship.js.map +1 -1
- package/lib/esm/SchemaSync.js +5 -5
- package/lib/esm/SchemaSync.js.map +1 -1
- package/lib/esm/SheetIndex.d.ts +9 -0
- package/lib/esm/SheetIndex.d.ts.map +1 -1
- package/lib/esm/SheetIndex.js +38 -35
- package/lib/esm/SheetIndex.js.map +1 -1
- package/lib/esm/StashManager.js +1 -1
- package/lib/esm/StashManager.js.map +1 -1
- package/lib/esm/Texture.d.ts +6 -0
- package/lib/esm/Texture.d.ts.map +1 -1
- package/lib/esm/Texture.js +6 -14
- package/lib/esm/Texture.js.map +1 -1
- package/lib/esm/TxnManager.d.ts +5 -5
- package/lib/esm/TxnManager.d.ts.map +1 -1
- package/lib/esm/TxnManager.js +23 -7
- package/lib/esm/TxnManager.js.map +1 -1
- package/lib/esm/ViewDefinition.d.ts +21 -1
- package/lib/esm/ViewDefinition.d.ts.map +1 -1
- package/lib/esm/ViewDefinition.js +27 -66
- package/lib/esm/ViewDefinition.js.map +1 -1
- package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +14 -6
- package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js +33 -27
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
- package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -1
- package/lib/esm/annotations/TextAnnotationElement.js +6 -5
- package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/esm/core-backend.d.ts +1 -0
- package/lib/esm/core-backend.d.ts.map +1 -1
- package/lib/esm/core-backend.js +1 -0
- package/lib/esm/core-backend.js.map +1 -1
- package/lib/esm/domains/FunctionalElements.d.ts +6 -2
- package/lib/esm/domains/FunctionalElements.d.ts.map +1 -1
- package/lib/esm/domains/FunctionalElements.js +8 -13
- package/lib/esm/domains/FunctionalElements.js.map +1 -1
- package/lib/esm/domains/GenericElements.d.ts +11 -4
- package/lib/esm/domains/GenericElements.d.ts.map +1 -1
- package/lib/esm/domains/GenericElements.js +13 -24
- package/lib/esm/domains/GenericElements.js.map +1 -1
- package/lib/esm/internal/ChannelAdmin.d.ts +15 -0
- package/lib/esm/internal/ChannelAdmin.d.ts.map +1 -1
- package/lib/esm/internal/ChannelAdmin.js +6 -4
- package/lib/esm/internal/ChannelAdmin.js.map +1 -1
- package/lib/esm/internal/Symbols.d.ts +4 -0
- package/lib/esm/internal/Symbols.d.ts.map +1 -1
- package/lib/esm/internal/Symbols.js +4 -0
- package/lib/esm/internal/Symbols.js.map +1 -1
- package/lib/esm/internal/annotations/fields.d.ts +3 -2
- package/lib/esm/internal/annotations/fields.d.ts.map +1 -1
- package/lib/esm/internal/annotations/fields.js +7 -6
- package/lib/esm/internal/annotations/fields.js.map +1 -1
- package/lib/esm/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -1
- package/lib/esm/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/esm/test/AnnotationTestUtils.js.map +1 -1
- package/lib/esm/test/ElementDrivesElement.test.d.ts +20 -19
- package/lib/esm/test/ElementDrivesElement.test.d.ts.map +1 -1
- package/lib/esm/test/ElementDrivesElement.test.js +111 -96
- package/lib/esm/test/ElementDrivesElement.test.js.map +1 -1
- package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
- package/lib/esm/test/IModelHost.test.js +56 -2
- package/lib/esm/test/IModelHost.test.js.map +1 -1
- package/lib/esm/test/IModelTestUtils.d.ts +23 -23
- package/lib/esm/test/IModelTestUtils.d.ts.map +1 -1
- package/lib/esm/test/IModelTestUtils.js +466 -449
- package/lib/esm/test/IModelTestUtils.js.map +1 -1
- package/lib/esm/test/PropertyDb.test.js +2 -2
- package/lib/esm/test/PropertyDb.test.js.map +1 -1
- package/lib/esm/test/SquashSchemaAndDataChanges.test.js +27 -18
- package/lib/esm/test/SquashSchemaAndDataChanges.test.js.map +1 -1
- package/lib/esm/test/TestChangeSetUtility.d.ts.map +1 -1
- package/lib/esm/test/TestChangeSetUtility.js +11 -7
- package/lib/esm/test/TestChangeSetUtility.js.map +1 -1
- package/lib/esm/test/TestEditTxn.d.ts +8 -0
- package/lib/esm/test/TestEditTxn.d.ts.map +1 -0
- package/lib/esm/test/TestEditTxn.js +34 -0
- package/lib/esm/test/TestEditTxn.js.map +1 -0
- package/lib/esm/test/TestUtils.d.ts +1 -0
- package/lib/esm/test/TestUtils.d.ts.map +1 -1
- package/lib/esm/test/TestUtils.js +8 -1
- package/lib/esm/test/TestUtils.js.map +1 -1
- package/lib/esm/test/annotations/Fields.test.js +82 -90
- package/lib/esm/test/annotations/Fields.test.js.map +1 -1
- package/lib/esm/test/annotations/FrameGeometry.test.js.map +1 -1
- package/lib/esm/test/annotations/TextAnnotation.test.js +156 -99
- package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
- package/lib/esm/test/annotations/TextBlock.test.js +5 -3
- package/lib/esm/test/annotations/TextBlock.test.js.map +1 -1
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/old.config.js.map +1 -1
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -1
- package/lib/esm/test/categories/Category.test.js +63 -3
- package/lib/esm/test/categories/Category.test.js.map +1 -1
- package/lib/esm/test/codespec/CodeSpec.test.js +88 -5
- package/lib/esm/test/codespec/CodeSpec.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlAst.test.js +3 -2
- package/lib/esm/test/ecdb/ECSqlAst.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlQuery.test.js +2 -2
- package/lib/esm/test/ecdb/ECSqlQuery.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlStatement.test.js +0 -1
- package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
- package/lib/esm/test/ecdb/QueryReaders.test.js +17 -14
- package/lib/esm/test/ecdb/QueryReaders.test.js.map +1 -1
- package/lib/esm/test/ecdb/SqliteStatement.test.js +2 -2
- package/lib/esm/test/ecdb/SqliteStatement.test.js.map +1 -1
- package/lib/esm/test/ecsql/dataset/ECSqlDatasets.d.ts.map +1 -1
- package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js +30 -28
- package/lib/esm/test/ecsql/dataset/ECSqlDatasets.js.map +1 -1
- package/lib/esm/test/ecsql/src/ECSqlTestGenerator.js.map +1 -1
- package/lib/esm/test/ecsql/src/ECSqlTestParser.js.map +1 -1
- package/lib/esm/test/ecsql/src/ECSqlTestRunner.test.js.map +1 -1
- package/lib/esm/test/element/DeleteDefinitionElements.test.js +159 -143
- package/lib/esm/test/element/DeleteDefinitionElements.test.js.map +1 -1
- package/lib/esm/test/element/ElementAspect.test.js +68 -60
- package/lib/esm/test/element/ElementAspect.test.js.map +1 -1
- package/lib/esm/test/element/ElementDependencyGraph.test.d.ts.map +1 -1
- package/lib/esm/test/element/ElementDependencyGraph.test.js +51 -43
- package/lib/esm/test/element/ElementDependencyGraph.test.js.map +1 -1
- package/lib/esm/test/element/ElementRoundTrip.test.js +37 -38
- package/lib/esm/test/element/ElementRoundTrip.test.js.map +1 -1
- package/lib/esm/test/element/ExcludedElements.test.js +2 -2
- package/lib/esm/test/element/ExcludedElements.test.js.map +1 -1
- package/lib/esm/test/element/ExternalSource.test.js +40 -38
- package/lib/esm/test/element/ExternalSource.test.js.map +1 -1
- package/lib/esm/test/element/NullStructArray.test.js +10 -9
- package/lib/esm/test/element/NullStructArray.test.js.map +1 -1
- package/lib/esm/test/element/ProjectInformationRecord.test.js +5 -2
- package/lib/esm/test/element/ProjectInformationRecord.test.js.map +1 -1
- package/lib/esm/test/element/SheetInformationAspect.test.js +43 -11
- package/lib/esm/test/element/SheetInformationAspect.test.js.map +1 -1
- package/lib/esm/test/element/UrlLink.test.js +2 -2
- package/lib/esm/test/element/UrlLink.test.js.map +1 -1
- package/lib/esm/test/font/IModelDbFonts.test.js +87 -73
- package/lib/esm/test/font/IModelDbFonts.test.js.map +1 -1
- package/lib/esm/test/hubaccess/ApplyChangeset.test.js +164 -125
- package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -1
- package/lib/esm/test/hubaccess/BriefcaseManager.test.js +2 -4
- package/lib/esm/test/hubaccess/BriefcaseManager.test.js.map +1 -1
- package/lib/esm/test/hubaccess/Rebase.test.js +313 -247
- package/lib/esm/test/hubaccess/Rebase.test.js.map +1 -1
- package/lib/esm/test/hubaccess/SemanticRebase.test.js +322 -247
- package/lib/esm/test/hubaccess/SemanticRebase.test.js.map +1 -1
- package/lib/esm/test/imodel/Code.test.js +31 -31
- package/lib/esm/test/imodel/Code.test.js.map +1 -1
- package/lib/esm/test/imodel/ElementTreeWalker.test.js +57 -48
- package/lib/esm/test/imodel/ElementTreeWalker.test.js.map +1 -1
- package/lib/esm/test/imodel/IModel.test.js +419 -344
- package/lib/esm/test/imodel/IModel.test.js.map +1 -1
- package/lib/esm/test/imodel/ProjectExtents.test.js +2 -2
- package/lib/esm/test/imodel/ProjectExtents.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/TestContext.d.ts.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/TestContext.js +2 -2
- package/lib/esm/test/incrementalSchemaLocater/TestContext.js.map +1 -1
- package/lib/esm/test/index.d.ts +1 -0
- package/lib/esm/test/index.d.ts.map +1 -1
- package/lib/esm/test/index.js +1 -0
- package/lib/esm/test/index.js.map +1 -1
- package/lib/esm/test/schema/ClassRegistry.test.js +23 -22
- package/lib/esm/test/schema/ClassRegistry.test.js.map +1 -1
- package/lib/esm/test/schema/FunctionalDomain.test.js +36 -34
- package/lib/esm/test/schema/FunctionalDomain.test.js.map +1 -1
- package/lib/esm/test/schema/GenericDomain.test.js +114 -94
- package/lib/esm/test/schema/GenericDomain.test.js.map +1 -1
- package/lib/esm/test/schema/IModelSchemaContext.test.js +2 -1
- package/lib/esm/test/schema/IModelSchemaContext.test.js.map +1 -1
- package/lib/esm/test/schema/SchemaImportCallbacks.test.js +207 -192
- package/lib/esm/test/schema/SchemaImportCallbacks.test.js.map +1 -1
- package/lib/esm/test/sheetindex/SheetIndex.test.d.ts +1 -3
- package/lib/esm/test/sheetindex/SheetIndex.test.d.ts.map +1 -1
- package/lib/esm/test/sheetindex/SheetIndex.test.js +312 -247
- package/lib/esm/test/sheetindex/SheetIndex.test.js.map +1 -1
- package/lib/esm/test/standalone/ChangeMerge.test.js +101 -82
- package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
- package/lib/esm/test/standalone/ChangesetReader.test.js +114 -85
- package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
- package/lib/esm/test/standalone/DisplayStyle.test.js +43 -40
- package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
- package/lib/esm/test/standalone/Drawing.test.js +4 -3
- package/lib/esm/test/standalone/Drawing.test.js.map +1 -1
- package/lib/esm/test/standalone/EditTxn.test.d.ts +2 -0
- package/lib/esm/test/standalone/EditTxn.test.d.ts.map +1 -0
- package/lib/esm/test/standalone/EditTxn.test.js +219 -0
- package/lib/esm/test/standalone/EditTxn.test.js.map +1 -0
- package/lib/esm/test/standalone/ElementMesh.test.js +16 -13
- package/lib/esm/test/standalone/ElementMesh.test.js.map +1 -1
- package/lib/esm/test/standalone/ExportGraphics.test.js +26 -20
- package/lib/esm/test/standalone/ExportGraphics.test.js.map +1 -1
- package/lib/esm/test/standalone/GeometryChangeEvents.test.js +11 -15
- package/lib/esm/test/standalone/GeometryChangeEvents.test.js.map +1 -1
- package/lib/esm/test/standalone/GeometryStream.test.js +212 -165
- package/lib/esm/test/standalone/GeometryStream.test.js.map +1 -1
- package/lib/esm/test/standalone/HubMock.test.js +31 -25
- package/lib/esm/test/standalone/HubMock.test.js.map +1 -1
- package/lib/esm/test/standalone/IModelLimits.test.js +11 -8
- package/lib/esm/test/standalone/IModelLimits.test.js.map +1 -1
- package/lib/esm/test/standalone/IModelWrite.test.d.ts +2 -2
- package/lib/esm/test/standalone/IModelWrite.test.d.ts.map +1 -1
- package/lib/esm/test/standalone/IModelWrite.test.js +184 -142
- package/lib/esm/test/standalone/IModelWrite.test.js.map +1 -1
- package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js +25 -22
- package/lib/esm/test/standalone/InlineGeometryPartReferences.test.js.map +1 -1
- package/lib/esm/test/standalone/IntegrityCheck.test.js +20 -18
- package/lib/esm/test/standalone/IntegrityCheck.test.js.map +1 -1
- package/lib/esm/test/standalone/MergeConflict.test.d.ts +2 -2
- package/lib/esm/test/standalone/MergeConflict.test.d.ts.map +1 -1
- package/lib/esm/test/standalone/MergeConflict.test.js +49 -33
- package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -1
- package/lib/esm/test/standalone/RenderMaterialElement.test.js +5 -5
- package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
- package/lib/esm/test/standalone/RenderTimeline.test.js +3 -2
- package/lib/esm/test/standalone/RenderTimeline.test.js.map +1 -1
- package/lib/esm/test/standalone/SectionDrawing.test.js +7 -7
- package/lib/esm/test/standalone/SectionDrawing.test.js.map +1 -1
- package/lib/esm/test/standalone/ServerBasedLocks.test.js +21 -19
- package/lib/esm/test/standalone/ServerBasedLocks.test.js.map +1 -1
- package/lib/esm/test/standalone/Settings.test.js +7 -4
- package/lib/esm/test/standalone/Settings.test.js.map +1 -1
- package/lib/esm/test/standalone/SettingsSchemas.test.js +2 -1
- package/lib/esm/test/standalone/SettingsSchemas.test.js.map +1 -1
- package/lib/esm/test/standalone/SnapshotDb.test.js +3 -1
- package/lib/esm/test/standalone/SnapshotDb.test.js.map +1 -1
- package/lib/esm/test/standalone/StandaloneDb.test.js +7 -6
- package/lib/esm/test/standalone/StandaloneDb.test.js.map +1 -1
- package/lib/esm/test/standalone/Texture.test.js +5 -4
- package/lib/esm/test/standalone/Texture.test.js.map +1 -1
- package/lib/esm/test/standalone/TileCache.test.d.ts.map +1 -1
- package/lib/esm/test/standalone/TileCache.test.js +5 -3
- package/lib/esm/test/standalone/TileCache.test.js.map +1 -1
- package/lib/esm/test/standalone/TileTree.test.js +35 -31
- package/lib/esm/test/standalone/TileTree.test.js.map +1 -1
- package/lib/esm/test/standalone/TxnManager.test.js +700 -653
- package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
- package/lib/esm/test/standalone/ViewDefinition.test.js +295 -229
- package/lib/esm/test/standalone/ViewDefinition.test.js.map +1 -1
- package/lib/esm/test/standalone/Workspace.test.js +25 -23
- package/lib/esm/test/standalone/Workspace.test.js.map +1 -1
- package/package.json +12 -12
|
@@ -7,6 +7,7 @@ import { Id64 } from "@itwin/core-bentley";
|
|
|
7
7
|
import { Placement3d } from "@itwin/core-common";
|
|
8
8
|
import { GeometricElement3d } from "../../core-backend";
|
|
9
9
|
import { IModelTestUtils } from "../index";
|
|
10
|
+
import { withEditTxn } from "../../EditTxn";
|
|
10
11
|
describe("computeProjectExtents", () => {
|
|
11
12
|
let imodel;
|
|
12
13
|
before(() => {
|
|
@@ -42,9 +43,8 @@ describe("computeProjectExtents", () => {
|
|
|
42
43
|
placement.origin.z *= mult;
|
|
43
44
|
elemProps.placement = placement;
|
|
44
45
|
elemProps.geom[2].sphere.radius = 0.000001;
|
|
45
|
-
const newId = imodel.
|
|
46
|
+
const newId = withEditTxn(imodel, (txn) => txn.insertElement(elemProps));
|
|
46
47
|
expect(Id64.isValid(newId)).to.be.true;
|
|
47
|
-
imodel.saveChanges();
|
|
48
48
|
const newElem = imodel.elements.getElement(newId);
|
|
49
49
|
expect(newElem).instanceof(GeometricElement3d);
|
|
50
50
|
expect(newElem.placement.origin.x).to.equal(originalOrigin.x * mult);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectExtents.test.js","sourceRoot":"","sources":["../../../../src/test/imodel/ProjectExtents.test.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAA2B,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,kBAAk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CAAC,qBAAqB,CAAC,EAAE,yBAAyB,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC;QACvG,MAAM,CAAC,MAAM,CAAC,QAAS,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC5C,MAAM,CAAC,MAAM,CAAC,QAAS,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC5C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QACjE,MAAM,CAAC,MAAM,CAAC,mBAAoB,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC;QAC/E,MAAM,CAAC,MAAM,CAAC,mBAAoB,CAAC,GAAG,CAAC,aAAa,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QACzF,MAAM,CAAC,MAAM,CAAC,mBAAoB,CAAC,IAAI,CAAC,aAAa,CAAC,kBAAkB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IACjG,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","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\nimport { expect } from \"chai\";\nimport { Id64 } from \"@itwin/core-bentley\";\nimport { GeometricElement3dProps, Placement3d } from \"@itwin/core-common\";\nimport { GeometricElement3d, SnapshotDb } from \"../../core-backend\";\nimport { IModelTestUtils } from \"../index\";\nimport { withEditTxn } from \"../../EditTxn\";\n\ndescribe(\"computeProjectExtents\", () => {\n let imodel: SnapshotDb;\n\n before(() => {\n imodel = IModelTestUtils.createSnapshotFromSeed(IModelTestUtils.prepareOutputFile(\"IModel\", \"test.bim\"), IModelTestUtils.resolveAssetFile(\"test.bim\"));\n });\n\n after(() => {\n imodel.close();\n });\n\n it(\"should return requested information\", () => {\n const projectExtents = imodel.projectExtents;\n const args = [undefined, false, true];\n for (const reportExtentsWithOutliers of args) {\n for (const reportOutliers of args) {\n const result = imodel.computeProjectExtents({ reportExtentsWithOutliers, reportOutliers });\n expect(result.extents.isAlmostEqual(projectExtents)).to.be.true;\n\n expect(undefined !== result.extentsWithOutliers).to.equal(true === reportExtentsWithOutliers);\n if (undefined !== result.extentsWithOutliers)\n expect(result.extentsWithOutliers.isAlmostEqual(projectExtents)).to.be.true;\n\n expect(undefined !== result.outliers).to.equal(true === reportOutliers);\n if (undefined !== result.outliers)\n expect(result.outliers.length).to.equal(0);\n }\n }\n });\n\n it(\"should report outliers\", () => {\n const elemProps = imodel.elements.getElementProps<GeometricElement3dProps>({ id: \"0x39\", wantGeometry: true });\n elemProps.id = Id64.invalid;\n const placement = Placement3d.fromJSON(elemProps.placement);\n const originalOrigin = placement.origin.clone();\n const mult = 1000000;\n placement.origin.x *= mult;\n placement.origin.y *= mult;\n placement.origin.z *= mult;\n elemProps.placement = placement;\n elemProps.geom![2].sphere!.radius = 0.000001;\n const newId = withEditTxn(imodel, (txn) => txn.insertElement(elemProps));\n expect(Id64.isValid(newId)).to.be.true;\n\n const newElem = imodel.elements.getElement<GeometricElement3d>(newId);\n expect(newElem).instanceof(GeometricElement3d);\n expect(newElem.placement.origin.x).to.equal(originalOrigin.x * mult);\n expect(newElem.placement.origin.y).to.equal(originalOrigin.y * mult);\n expect(newElem.placement.origin.z).to.equal(originalOrigin.z * mult);\n\n const outlierRange = placement.calculateRange();\n const originalExtents = imodel.projectExtents;\n const extentsWithOutlier = originalExtents.clone();\n extentsWithOutlier.extendRange(outlierRange);\n\n const result = imodel.computeProjectExtents({ reportExtentsWithOutliers: true, reportOutliers: true });\n expect(result.outliers!.length).to.equal(1);\n expect(result.outliers![0]).to.equal(newId);\n expect(result.extents.isAlmostEqual(originalExtents)).to.be.true;\n expect(result.extentsWithOutliers!.isAlmostEqual(originalExtents)).to.be.false;\n expect(result.extentsWithOutliers!.low.isAlmostEqual(extentsWithOutlier.low)).to.be.true;\n expect(result.extentsWithOutliers!.high.isAlmostEqual(extentsWithOutlier.high, 20)).to.be.true;\n });\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ECSqlQueries.test.js","sourceRoot":"","sources":["../../../../src/test/incrementalSchemaLocater/ECSqlQueries.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAA4E,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACvJ,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,KAAK,mBAAmB,MAAM,yBAAyB,CAAC;AAE/D,GAAG,CAAC,mBAAmB,CAAC,CAAC;AAEzB,SAAS,QAAQ,CAA+B,IAAY,EAAE,OAAY;IACxE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAqB,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IACtE,IAAI,CAAC,IAAI;QACP,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,GAAG,CAAC,CAAC;IAC1D,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,YAAY,CAA6B,IAAY,EAAE,OAAY;IAC1E,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAmB,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,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MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAErD,KAAK,MAAM,KAAK,IAAI,gBAAgB,EAAE,CAAC;gBACrC,YAAY,CAAC,KAAK,CAAC,IAAK,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;YACtD,CAAC;;;;;;;;;;;KACF,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { AnyPropertyProps, AnySchemaItemProps, ClassProps, RelationshipClassProps, Schema, SchemaItemType, SchemaKey } from \"@itwin/ecschema-metadata\";\nimport { expect, use } from \"chai\";\nimport { TestContext } from \"./TestContext\";\nimport { IModelIncrementalSchemaLocater } from \"../../IModelIncrementalSchemaLocater\";\nimport * as deepEqualInAnyOrder from \"deep-equal-in-any-order\";\n\nuse(deepEqualInAnyOrder);\n\nfunction findItem<T extends AnySchemaItemProps>(name: string, rowData: T[]) {\n const item = rowData.find((i: AnySchemaItemProps) => i.name === name);\n if (!item)\n throw new Error(`Could not find schema item '${name}'`);\n return item;\n}\n\nfunction findProperty<T extends AnyPropertyProps>(name: string, rowData: T[]) {\n return rowData.find((i: AnyPropertyProps) => i.name === name);\n}\n\nfunction isECClass(item: AnySchemaItemProps): item is ClassProps {\n return item.schemaItemType === SchemaItemType.EntityClass || item.schemaItemType === SchemaItemType.Mixin || item.schemaItemType === SchemaItemType.RelationshipClass ||\n item.schemaItemType === SchemaItemType.StructClass || item.schemaItemType === SchemaItemType.CustomAttributeClass;\n}\n\nfunction isRelationshipClass(item: AnySchemaItemProps): item is RelationshipClassProps {\n return \"source\" in item && \"target\" in item;\n}\n\n/**\n * A test locater that exposes the protected methods of IModelIncrementalSchemaLocater for granular testing.\n */\nabstract class TestSchemaLocater extends IModelIncrementalSchemaLocater {\n public abstract override getSchemaJson: IModelIncrementalSchemaLocater[\"getSchemaJson\"];\n public abstract override getConstants: IModelIncrementalSchemaLocater[\"getConstants\"];\n public abstract override getCustomAttributeClasses: IModelIncrementalSchemaLocater[\"getCustomAttributeClasses\"];\n public abstract override getEntities: IModelIncrementalSchemaLocater[\"getEntities\"];\n public abstract override getEnumerations: IModelIncrementalSchemaLocater[\"getEnumerations\"];\n public abstract override getFormats: IModelIncrementalSchemaLocater[\"getFormats\"];\n public abstract override getInvertedUnits: IModelIncrementalSchemaLocater[\"getInvertedUnits\"];\n public abstract override getKindOfQuantities: IModelIncrementalSchemaLocater[\"getKindOfQuantities\"];\n public abstract override getMixins: IModelIncrementalSchemaLocater[\"getMixins\"];\n public abstract override getPhenomenon: IModelIncrementalSchemaLocater[\"getPhenomenon\"];\n public abstract override getPropertyCategories: IModelIncrementalSchemaLocater[\"getPropertyCategories\"];\n public abstract override getRelationships: IModelIncrementalSchemaLocater[\"getRelationships\"];\n public abstract override getStructs: IModelIncrementalSchemaLocater[\"getStructs\"];\n public abstract override getUnits: IModelIncrementalSchemaLocater[\"getUnits\"];\n public abstract override getUnitSystems: IModelIncrementalSchemaLocater[\"getUnitSystems\"];\n}\n\ndescribe(\"ECSql query tests\", function () {\n\n function validateItem(name: string, itemPropObjects: AnySchemaItemProps[], schema: Schema) {\n const actualJson = findItem(name, itemPropObjects);\n const expectedItem = schema.getItemSync(name);\n const expectedJson = expectedItem!.toJSON();\n\n // The following code exists because some data coming from the database will not match the\n // data from the context due to default values. This is OK as long as the conditions are\n // correct. For instance, schemaItem name will not exist in serialized JSON, but does exist\n // coming from the DB. RelationshipConstraint's AbstractConstraint is set when only one\n // constraint class exists coming from the database, but a serialized Relationship will not\n // contain the abstract constraint. The one constraint is 'assumed' to be the abstract constraint.\n\n expect(actualJson.name).to.equal(expectedItem?.name);\n delete (actualJson as any).name;\n\n if (isECClass(actualJson)) {\n if (expectedJson.schemaItemType === \"Mixin\") {\n expect(actualJson.modifier).to.be.oneOf([undefined, 'Abstract']);\n delete (actualJson as any).modifier;\n } else if ((expectedJson as ClassProps).modifier === undefined) {\n expect(actualJson.modifier).to.be.oneOf([undefined, 'None']);\n delete (actualJson as any).modifier;\n }\n }\n if (isRelationshipClass(actualJson)) {\n // abstract can be set via database, but not via context for 1 constraint class\n // so verify constraint and conditions are correct and delete property\n const expectedRelationship = expectedJson as any as RelationshipClassProps;\n if (actualJson.source.abstractConstraint !== expectedRelationship.source.abstractConstraint) {\n expect(actualJson.source.abstractConstraint).to.equal(expectedRelationship.source.constraintClasses[0]);\n expect(actualJson.source.constraintClasses.length).to.equal(1);\n delete (actualJson.source as any).abstractConstraint;\n }\n if (actualJson.target.abstractConstraint !== expectedRelationship.target.abstractConstraint) {\n expect(actualJson.target.abstractConstraint).to.equal(expectedRelationship.target.constraintClasses[0]);\n expect(actualJson.target.constraintClasses.length).to.equal(1);\n delete (actualJson.target as any).abstractConstraint;\n }\n }\n\n if (actualJson.schemaItemType === SchemaItemType.Format) {\n if (undefined !== (actualJson as any).includeZero && undefined === (expectedJson as any).includeZero) {\n expect((actualJson as any).includeZero).to.equal(true);\n delete (actualJson as any).includeZero;\n }\n if ((actualJson as any).composite && undefined !== (actualJson as any).composite.includeZero && undefined === (expectedJson as any).composite.includeZero) {\n expect((actualJson as any).composite.includeZero).to.equal(true);\n delete (actualJson as any).composite.includeZero;\n }\n if ((actualJson as any).composite && undefined !== (actualJson as any).composite.spacer && undefined === (expectedJson as any).composite.spacer) {\n expect((actualJson as any).composite.spacer).to.equal(\" \");\n delete (actualJson as any).composite.spacer;\n }\n if (undefined !== (actualJson as any).decimalSeparator && undefined === (expectedJson as any).decimalSeparator) {\n expect((actualJson as any).decimalSeparator).to.equal(\".\");\n delete (actualJson as any).decimalSeparator;\n }\n if (undefined !== (actualJson as any).roundFactor && undefined === (expectedJson as any).roundFactor) {\n expect((actualJson as any).roundFactor).to.equal(0);\n delete (actualJson as any).roundFactor;\n }\n if (undefined !== (actualJson as any).showSignOption && undefined === (expectedJson as any).showSignOption) {\n expect((actualJson as any).showSignOption).to.equal(\"OnlyNegative\");\n delete (actualJson as any).showSignOption;\n }\n if (undefined !== (actualJson as any).thousandSeparator && undefined === (expectedJson as any).thousandSeparator) {\n expect((actualJson as any).thousandSeparator).to.equal(\",\");\n delete (actualJson as any).thousandSeparator;\n }\n if (undefined !== (actualJson as any).uomSeparator && undefined === (expectedJson as any).uomSeparator) {\n expect((actualJson as any).uomSeparator).to.equal(\" \");\n delete (actualJson as any).uomSeparator;\n }\n if (undefined !== (actualJson as any).spacer && undefined === (expectedJson as any).spacer) {\n expect((actualJson as any).spacer).to.equal(\" \");\n delete (actualJson as any).spacer;\n }\n if (undefined !== (actualJson as any).formatTraits) {\n (actualJson as any).formatTraits = (actualJson as any).formatTraits.map((trait: string) => {\n return trait.charAt(0).toUpperCase() + trait.slice(1);\n });\n }\n }\n\n expect(actualJson).to.deep.equalInAnyOrder(expectedJson);\n }\n\n async function createTestContext() {\n const testEnv = await TestContext.create();\n return testEnv as TestContext<TestSchemaLocater>;\n }\n\n it(\"Schema query, props parsed successfully\", async function () {\n const testSchemaKey = new SchemaKey(\"SchemaTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const expectedSchema = await env.importAssetSchema(testSchemaKey);\n const actualSchemaProps = await env.schemaLocater.getSchemaJson(testSchemaKey, env.schemaContext);\n expect(actualSchemaProps).to.not.be.undefined;\n\n const actualSchema = await Schema.fromJson(actualSchemaProps!, env.schemaContext);\n expect(actualSchema.toJSON()).to.deep.equal(expectedSchema?.toJSON());\n });\n\n it(\"Property query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"PropertyTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const classPropsObjects = await env.schemaLocater.getEntities(testKey.name, env.schemaContext);\n const entityOneProps = findItem(\"EntityOne\", classPropsObjects);\n const entityTwoProps = findItem(\"EntityTwo\", classPropsObjects);\n const expectedEntityOne = await schema.getEntityClass(\"EntityOne\");\n const expectedEntityTwo = await schema.getEntityClass(\"EntityTwo\");\n\n const validateProperty = (propertyName: string, actualItem = entityOneProps, expectedItem = expectedEntityOne) => {\n const actualProperty = findProperty(propertyName, actualItem.properties!);\n const expectedProperty = expectedItem?.getPropertySync(propertyName);\n // if maxOccurs is the maximum int value in the context Schema,\n // the property from the DB will not have a value\n if ((expectedProperty as any).maxOccurs === 2147483647) {\n expect((actualProperty as any).maxOccurs).to.be.undefined;\n // set so comparison will pass\n (actualProperty as any).maxOccurs = 2147483647;\n }\n\n expect(actualProperty).to.deep.equal(expectedProperty?.toJSON());\n };\n\n // All but one testable property is in EntityOne\n for (const property of await expectedEntityOne!.getProperties(true)) {\n validateProperty(property.name);\n }\n // Backward direction Navigation property is in EntityTwo\n validateProperty(\"EntityTwoParent\", entityTwoProps, expectedEntityTwo);\n });\n\n it(\"Entity query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"EntityTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const classPropsObjects = await env.schemaLocater.getEntities(testKey.name, env.schemaContext);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"EntityModifierNone\", classPropsObjects, schema);\n validateItem(\"EntityModifierAbstract\", classPropsObjects, schema);\n validateItem(\"EntityModifierSealed\", classPropsObjects, schema);\n });\n\n it(\"Struct query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"StructTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const classPropsObjects = await env.schemaLocater.getStructs(testKey.name, env.schemaContext);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"StructModifierNone\", classPropsObjects, schema);\n validateItem(\"StructModifierAbstract\", classPropsObjects, schema);\n validateItem(\"StructModifierSealed\", classPropsObjects, schema);\n });\n\n it(\"Mixin query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"MixinTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const classPropsObjects = await env.schemaLocater.getMixins(testKey.name, env.schemaContext);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"IBaseMixin\", classPropsObjects, schema);\n validateItem(\"ITestMixin\", classPropsObjects, schema);\n });\n\n it(\"Relationship query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"RelationshipTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const classPropsObjects = await env.schemaLocater.getRelationships(testKey.name, env.schemaContext);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"OwnerOwnsVehicles\", classPropsObjects, schema);\n validateItem(\"OwnerOwnsCars\", classPropsObjects, schema);\n validateItem(\"OwnerOwnsAmericanCars\", classPropsObjects, schema);\n validateItem(\"PhysicalModelBreaksDownCarElement\", classPropsObjects, schema);\n });\n\n it(\"CustomAttributeClass query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"CustomAttributeClassTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const classPropsObjects = await env.schemaLocater.getCustomAttributeClasses(testKey.name, env.schemaContext);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"CustomAttributeModifierNone\", classPropsObjects, schema);\n validateItem(\"CustomAttributeModifierSealed\", classPropsObjects, schema);\n validateItem(\"CustomAttributeModifierAbstract\", classPropsObjects, schema);\n });\n\n it(\"KindOfQuantity query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"KindOfQuantityTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getKindOfQuantities(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"ACCELERATION\", itemPropsObjects, schema);\n validateItem(\"ANGLE\", itemPropsObjects, schema);\n });\n\n it(\"PropertyCategory query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"PropertyCategoryTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getPropertyCategories(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"PropertyCategory1\", itemPropsObjects, schema);\n validateItem(\"PropertyCategory2\", itemPropsObjects, schema);\n });\n\n it(\"Enumeration query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"EnumerationTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getEnumerations(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"IntEnumeration\", itemPropsObjects, schema);\n validateItem(\"StringEnumeration\", itemPropsObjects, schema);\n });\n\n it(\"Unit query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"UnitTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getUnits(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"LITRE\", itemPropsObjects, schema);\n validateItem(\"GALLON\", itemPropsObjects, schema);\n validateItem(\"ACRE\", itemPropsObjects, schema);\n validateItem(\"FAHRENHEIT\", itemPropsObjects, schema);\n });\n\n it(\"InvertedUnit query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"InvertedUnitTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getInvertedUnits(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"FT_HORIZONTAL_PER_FT_VERTICAL\", itemPropsObjects, schema);\n });\n\n it(\"UnitSystem query, props parsed successfully\", async function () {\n // There's a UnitSystem in there.\n const testKey = new SchemaKey(\"InvertedUnitTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getUnitSystems(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"USCUSTOM\", itemPropsObjects, schema);\n });\n\n it(\"Constant query, props parsed successfully\", async function () {\n // There's a UnitSystem in there.\n const testKey = new SchemaKey(\"ConstantTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getConstants(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"KILO\", itemPropsObjects, schema);\n validateItem(\"HALF_PI\", itemPropsObjects, schema);\n });\n\n it(\"Phenomenon query, props parsed successfully\", async function () {\n // There's a Phenomenon in there.\n const testKey = new SchemaKey(\"ConstantTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getPhenomenon(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"NUMBER\", itemPropsObjects, schema);\n validateItem(\"LENGTH_RATIO\", itemPropsObjects, schema);\n });\n\n it(\"Format Schema parses successfully\", async function () {\n // Using installed Formats schema\n const testKey = new SchemaKey(\"Formats\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getFormats(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n for (const props of itemPropsObjects) {\n validateItem(props.name!, itemPropsObjects, schema);\n }\n });\n\n it(\"Comprehensive Format parses successfully\", async function () {\n const testKey = new SchemaKey(\"FormatTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getFormats(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n for (const props of itemPropsObjects) {\n validateItem(props.name!, itemPropsObjects, schema);\n }\n });\n\n it(\"CustomAttribute instances parse successfully\", async function () {\n const testKey = new SchemaKey(\"CustomAttributeInstanceTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getStructs(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n for (const props of itemPropsObjects) {\n validateItem(props.name!, itemPropsObjects, schema);\n }\n });\n});"]}
|
|
1
|
+
{"version":3,"file":"ECSqlQueries.test.js","sourceRoot":"","sources":["../../../../src/test/incrementalSchemaLocater/ECSqlQueries.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAA4E,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACvJ,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,KAAK,mBAAmB,MAAM,yBAAyB,CAAC;AAE/D,GAAG,CAAC,mBAAmB,CAAC,CAAC;AAEzB,SAAS,QAAQ,CAA+B,IAAY,EAAE,OAAY;IACxE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAqB,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IACtE,IAAI,CAAC,IAAI;QACP,MAAM,IAAI,KAAK,CAAC,+BAA+B,IAAI,GAAG,CAAC,CAAC;IAC1D,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,YAAY,CAA6B,IAAY,EAAE,OAAY;IAC1E,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAmB,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAChE,CAAC;AAED,SAAS,SAAS,C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C,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;YAErD,KAAK,MAAM,KAAK,IAAI,gBAAgB,EAAE,CAAC;gBACrC,YAAY,CAAC,KAAK,CAAC,IAAK,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;YACtD,CAAC;;;;;;;;;;;KACF,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { AnyPropertyProps, AnySchemaItemProps, ClassProps, RelationshipClassProps, Schema, SchemaItemType, SchemaKey } from \"@itwin/ecschema-metadata\";\nimport { expect, use } from \"chai\";\nimport { TestContext } from \"./TestContext\";\nimport { IModelIncrementalSchemaLocater } from \"../../IModelIncrementalSchemaLocater\";\nimport * as deepEqualInAnyOrder from \"deep-equal-in-any-order\";\n\nuse(deepEqualInAnyOrder);\n\nfunction findItem<T extends AnySchemaItemProps>(name: string, rowData: T[]) {\n const item = rowData.find((i: AnySchemaItemProps) => i.name === name);\n if (!item)\n throw new Error(`Could not find schema item '${name}'`);\n return item;\n}\n\nfunction findProperty<T extends AnyPropertyProps>(name: string, rowData: T[]) {\n return rowData.find((i: AnyPropertyProps) => i.name === name);\n}\n\nfunction isECClass(item: AnySchemaItemProps): item is ClassProps {\n return item.schemaItemType === SchemaItemType.EntityClass || item.schemaItemType === SchemaItemType.Mixin || item.schemaItemType === SchemaItemType.RelationshipClass ||\n item.schemaItemType === SchemaItemType.StructClass || item.schemaItemType === SchemaItemType.CustomAttributeClass;\n}\n\nfunction isRelationshipClass(item: AnySchemaItemProps): item is RelationshipClassProps {\n return \"source\" in item && \"target\" in item;\n}\n\n/**\n * A test locater that exposes the protected methods of IModelIncrementalSchemaLocater for granular testing.\n */\nabstract class TestSchemaLocater extends IModelIncrementalSchemaLocater {\n public abstract override getSchemaJson: IModelIncrementalSchemaLocater[\"getSchemaJson\"];\n public abstract override getConstants: IModelIncrementalSchemaLocater[\"getConstants\"];\n public abstract override getCustomAttributeClasses: IModelIncrementalSchemaLocater[\"getCustomAttributeClasses\"];\n public abstract override getEntities: IModelIncrementalSchemaLocater[\"getEntities\"];\n public abstract override getEnumerations: IModelIncrementalSchemaLocater[\"getEnumerations\"];\n public abstract override getFormats: IModelIncrementalSchemaLocater[\"getFormats\"];\n public abstract override getInvertedUnits: IModelIncrementalSchemaLocater[\"getInvertedUnits\"];\n public abstract override getKindOfQuantities: IModelIncrementalSchemaLocater[\"getKindOfQuantities\"];\n public abstract override getMixins: IModelIncrementalSchemaLocater[\"getMixins\"];\n public abstract override getPhenomenon: IModelIncrementalSchemaLocater[\"getPhenomenon\"];\n public abstract override getPropertyCategories: IModelIncrementalSchemaLocater[\"getPropertyCategories\"];\n public abstract override getRelationships: IModelIncrementalSchemaLocater[\"getRelationships\"];\n public abstract override getStructs: IModelIncrementalSchemaLocater[\"getStructs\"];\n public abstract override getUnits: IModelIncrementalSchemaLocater[\"getUnits\"];\n public abstract override getUnitSystems: IModelIncrementalSchemaLocater[\"getUnitSystems\"];\n}\n\ndescribe(\"ECSql query tests\", function () {\n\n function validateItem(name: string, itemPropObjects: AnySchemaItemProps[], schema: Schema) {\n const actualJson = findItem(name, itemPropObjects);\n const expectedItem = schema.getItemSync(name);\n const expectedJson = expectedItem!.toJSON();\n\n // The following code exists because some data coming from the database will not match the\n // data from the context due to default values. This is OK as long as the conditions are\n // correct. For instance, schemaItem name will not exist in serialized JSON, but does exist\n // coming from the DB. RelationshipConstraint's AbstractConstraint is set when only one\n // constraint class exists coming from the database, but a serialized Relationship will not\n // contain the abstract constraint. The one constraint is 'assumed' to be the abstract constraint.\n\n expect(actualJson.name).to.equal(expectedItem?.name);\n delete (actualJson as any).name;\n\n if (isECClass(actualJson)) {\n if (expectedJson.schemaItemType === \"Mixin\") {\n expect(actualJson.modifier).to.be.oneOf([undefined, 'Abstract']);\n delete (actualJson as any).modifier;\n } else if ((expectedJson as ClassProps).modifier === undefined) {\n expect(actualJson.modifier).to.be.oneOf([undefined, 'None']);\n delete (actualJson as any).modifier;\n }\n }\n if (isRelationshipClass(actualJson)) {\n // abstract can be set via database, but not via context for 1 constraint class\n // so verify constraint and conditions are correct and delete property\n const expectedRelationship = expectedJson as any as RelationshipClassProps;\n if (actualJson.source.abstractConstraint !== expectedRelationship.source.abstractConstraint) {\n expect(actualJson.source.abstractConstraint).to.equal(expectedRelationship.source.constraintClasses[0]);\n expect(actualJson.source.constraintClasses.length).to.equal(1);\n delete (actualJson.source as any).abstractConstraint;\n }\n if (actualJson.target.abstractConstraint !== expectedRelationship.target.abstractConstraint) {\n expect(actualJson.target.abstractConstraint).to.equal(expectedRelationship.target.constraintClasses[0]);\n expect(actualJson.target.constraintClasses.length).to.equal(1);\n delete (actualJson.target as any).abstractConstraint;\n }\n }\n\n if (actualJson.schemaItemType === SchemaItemType.Format) {\n if (undefined !== (actualJson as any).includeZero && undefined === (expectedJson as any).includeZero) {\n expect((actualJson as any).includeZero).to.equal(true);\n delete (actualJson as any).includeZero;\n }\n if ((actualJson as any).composite && undefined !== (actualJson as any).composite.includeZero && undefined === (expectedJson as any).composite.includeZero) {\n expect((actualJson as any).composite.includeZero).to.equal(true);\n delete (actualJson as any).composite.includeZero;\n }\n if ((actualJson as any).composite && undefined !== (actualJson as any).composite.spacer && undefined === (expectedJson as any).composite.spacer) {\n expect((actualJson as any).composite.spacer).to.equal(\" \");\n delete (actualJson as any).composite.spacer;\n }\n if (undefined !== (actualJson as any).decimalSeparator && undefined === (expectedJson as any).decimalSeparator) {\n expect((actualJson as any).decimalSeparator).to.equal(\".\");\n delete (actualJson as any).decimalSeparator;\n }\n if (undefined !== (actualJson as any).roundFactor && undefined === (expectedJson as any).roundFactor) {\n expect((actualJson as any).roundFactor).to.equal(0);\n delete (actualJson as any).roundFactor;\n }\n if (undefined !== (actualJson as any).showSignOption && undefined === (expectedJson as any).showSignOption) {\n expect((actualJson as any).showSignOption).to.equal(\"OnlyNegative\");\n delete (actualJson as any).showSignOption;\n }\n if (undefined !== (actualJson as any).thousandSeparator && undefined === (expectedJson as any).thousandSeparator) {\n expect((actualJson as any).thousandSeparator).to.equal(\",\");\n delete (actualJson as any).thousandSeparator;\n }\n if (undefined !== (actualJson as any).uomSeparator && undefined === (expectedJson as any).uomSeparator) {\n expect((actualJson as any).uomSeparator).to.equal(\" \");\n delete (actualJson as any).uomSeparator;\n }\n if (undefined !== (actualJson as any).spacer && undefined === (expectedJson as any).spacer) {\n expect((actualJson as any).spacer).to.equal(\" \");\n delete (actualJson as any).spacer;\n }\n if (undefined !== (actualJson as any).formatTraits) {\n (actualJson as any).formatTraits = (actualJson as any).formatTraits.map((trait: string) => {\n return trait.charAt(0).toUpperCase() + trait.slice(1);\n });\n }\n }\n\n expect(actualJson).to.deep.equalInAnyOrder(expectedJson);\n }\n\n async function createTestContext() {\n const testEnv = await TestContext.create();\n return testEnv as TestContext<TestSchemaLocater>;\n }\n\n it(\"Schema query, props parsed successfully\", async function () {\n const testSchemaKey = new SchemaKey(\"SchemaTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const expectedSchema = await env.importAssetSchema(testSchemaKey);\n const actualSchemaProps = await env.schemaLocater.getSchemaJson(testSchemaKey, env.schemaContext);\n expect(actualSchemaProps).to.not.be.undefined;\n\n const actualSchema = await Schema.fromJson(actualSchemaProps!, env.schemaContext);\n expect(actualSchema.toJSON()).to.deep.equal(expectedSchema?.toJSON());\n });\n\n it(\"Property query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"PropertyTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const classPropsObjects = await env.schemaLocater.getEntities(testKey.name, env.schemaContext);\n const entityOneProps = findItem(\"EntityOne\", classPropsObjects);\n const entityTwoProps = findItem(\"EntityTwo\", classPropsObjects);\n const expectedEntityOne = await schema.getEntityClass(\"EntityOne\");\n const expectedEntityTwo = await schema.getEntityClass(\"EntityTwo\");\n\n const validateProperty = (propertyName: string, actualItem = entityOneProps, expectedItem = expectedEntityOne) => {\n const actualProperty = findProperty(propertyName, actualItem.properties!);\n const expectedProperty = expectedItem?.getPropertySync(propertyName);\n // if maxOccurs is the maximum int value in the context Schema,\n // the property from the DB will not have a value\n if ((expectedProperty as any).maxOccurs === 2147483647) {\n expect((actualProperty as any).maxOccurs).to.be.undefined;\n // set so comparison will pass\n (actualProperty as any).maxOccurs = 2147483647;\n }\n\n expect(actualProperty).to.deep.equal(expectedProperty?.toJSON());\n };\n\n // All but one testable property is in EntityOne\n for (const property of await expectedEntityOne!.getProperties(true)) {\n validateProperty(property.name);\n }\n // Backward direction Navigation property is in EntityTwo\n validateProperty(\"EntityTwoParent\", entityTwoProps, expectedEntityTwo);\n });\n\n it(\"Entity query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"EntityTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const classPropsObjects = await env.schemaLocater.getEntities(testKey.name, env.schemaContext);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"EntityModifierNone\", classPropsObjects, schema);\n validateItem(\"EntityModifierAbstract\", classPropsObjects, schema);\n validateItem(\"EntityModifierSealed\", classPropsObjects, schema);\n });\n\n it(\"Struct query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"StructTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const classPropsObjects = await env.schemaLocater.getStructs(testKey.name, env.schemaContext);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"StructModifierNone\", classPropsObjects, schema);\n validateItem(\"StructModifierAbstract\", classPropsObjects, schema);\n validateItem(\"StructModifierSealed\", classPropsObjects, schema);\n });\n\n it(\"Mixin query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"MixinTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const classPropsObjects = await env.schemaLocater.getMixins(testKey.name, env.schemaContext);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"IBaseMixin\", classPropsObjects, schema);\n validateItem(\"ITestMixin\", classPropsObjects, schema);\n });\n\n it(\"Relationship query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"RelationshipTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const classPropsObjects = await env.schemaLocater.getRelationships(testKey.name, env.schemaContext);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"OwnerOwnsVehicles\", classPropsObjects, schema);\n validateItem(\"OwnerOwnsCars\", classPropsObjects, schema);\n validateItem(\"OwnerOwnsAmericanCars\", classPropsObjects, schema);\n validateItem(\"PhysicalModelBreaksDownCarElement\", classPropsObjects, schema);\n });\n\n it(\"CustomAttributeClass query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"CustomAttributeClassTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const classPropsObjects = await env.schemaLocater.getCustomAttributeClasses(testKey.name, env.schemaContext);\n expect(classPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"CustomAttributeModifierNone\", classPropsObjects, schema);\n validateItem(\"CustomAttributeModifierSealed\", classPropsObjects, schema);\n validateItem(\"CustomAttributeModifierAbstract\", classPropsObjects, schema);\n });\n\n it(\"KindOfQuantity query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"KindOfQuantityTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getKindOfQuantities(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"ACCELERATION\", itemPropsObjects, schema);\n validateItem(\"ANGLE\", itemPropsObjects, schema);\n });\n\n it(\"PropertyCategory query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"PropertyCategoryTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getPropertyCategories(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"PropertyCategory1\", itemPropsObjects, schema);\n validateItem(\"PropertyCategory2\", itemPropsObjects, schema);\n });\n\n it(\"Enumeration query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"EnumerationTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getEnumerations(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"IntEnumeration\", itemPropsObjects, schema);\n validateItem(\"StringEnumeration\", itemPropsObjects, schema);\n });\n\n it(\"Unit query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"UnitTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getUnits(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"LITRE\", itemPropsObjects, schema);\n validateItem(\"GALLON\", itemPropsObjects, schema);\n validateItem(\"ACRE\", itemPropsObjects, schema);\n validateItem(\"FAHRENHEIT\", itemPropsObjects, schema);\n });\n\n it(\"InvertedUnit query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"InvertedUnitTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getInvertedUnits(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"FT_HORIZONTAL_PER_FT_VERTICAL\", itemPropsObjects, schema);\n });\n\n it(\"UnitSystem query, props parsed successfully\", async function () {\n // There's a UnitSystem in there.\n const testKey = new SchemaKey(\"InvertedUnitTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getUnitSystems(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"USCUSTOM\", itemPropsObjects, schema);\n });\n\n it(\"Constant query, props parsed successfully\", async function () {\n // There's a UnitSystem in there.\n const testKey = new SchemaKey(\"ConstantTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getConstants(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"KILO\", itemPropsObjects, schema);\n validateItem(\"HALF_PI\", itemPropsObjects, schema);\n });\n\n it(\"Phenomenon query, props parsed successfully\", async function () {\n // There's a Phenomenon in there.\n const testKey = new SchemaKey(\"ConstantTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getPhenomenon(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n validateItem(\"NUMBER\", itemPropsObjects, schema);\n validateItem(\"LENGTH_RATIO\", itemPropsObjects, schema);\n });\n\n it(\"Format Schema parses successfully\", async function () {\n // Using installed Formats schema\n const testKey = new SchemaKey(\"Formats\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getFormats(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n for (const props of itemPropsObjects) {\n validateItem(props.name!, itemPropsObjects, schema);\n }\n });\n\n it(\"Comprehensive Format parses successfully\", async function () {\n const testKey = new SchemaKey(\"FormatTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getFormats(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n for (const props of itemPropsObjects) {\n validateItem(props.name!, itemPropsObjects, schema);\n }\n });\n\n it(\"CustomAttribute instances parse successfully\", async function () {\n const testKey = new SchemaKey(\"CustomAttributeInstanceTest\", 1, 0, 0);\n await using env = await createTestContext();\n\n const schema = await env.importAssetSchema(testKey);\n const itemPropsObjects = await env.schemaLocater.getStructs(testKey.name, env.schemaContext);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n for (const props of itemPropsObjects) {\n validateItem(props.name!, itemPropsObjects, schema);\n }\n });\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestContext.d.ts","sourceRoot":"","sources":["../../../../src/test/incrementalSchemaLocater/TestContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAsC,SAAS,EAAmB,MAAM,0BAA0B,CAAC;AACjI,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAe,QAAQ,EAAgB,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"TestContext.d.ts","sourceRoot":"","sources":["../../../../src/test/incrementalSchemaLocater/TestContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAsC,SAAS,EAAmB,MAAM,0BAA0B,CAAC;AACjI,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAe,QAAQ,EAAgB,MAAM,gBAAgB,CAAC;AAWrE,UAAU,OAAO;IACf,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,wBAAwB,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;CACxE;AAED,KAAK,iBAAiB,CAAC,QAAQ,IAAI,QAAQ,SAAS;IAAE,wBAAwB,EAAE,UAAU,CAAA;CAAE,GAAG,KAAK,GAAG,8BAA8B,CAAC;AAEtI,qBAAa,WAAW,CAAC,QAAQ,GAAG,KAAK,CAAE,YAAW,eAAe;IACnE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAW;IACnC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAW;IAC1C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAE9C,OAAO;IAoBP,IAAW,MAAM,IAAI,QAAQ,CAE5B;IAED,IAAW,aAAa,IAAI,QAAQ,CAEnC;IAED,IAAW,aAAa,IAAI,aAAa,CAExC;WAEmB,MAAM,CAAC,QAAQ,SAAS,OAAO,EAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,CAAC;mBAqBtG,cAAc;mBASd,YAAY;IAwBpB,cAAc,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAenC,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;IA4BxD,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC;CAGpD"}
|
|
@@ -9,6 +9,7 @@ import { ProfileOptions } from "@itwin/core-common";
|
|
|
9
9
|
import { SchemaXmlFileLocater } from "@itwin/ecschema-locaters";
|
|
10
10
|
import { DOMParser, XMLSerializer } from "@xmldom/xmldom";
|
|
11
11
|
import * as path from "path";
|
|
12
|
+
import { TestUtils } from "../TestUtils";
|
|
12
13
|
export class TestContext {
|
|
13
14
|
_iModel;
|
|
14
15
|
_schemaLocater;
|
|
@@ -41,7 +42,7 @@ export class TestContext {
|
|
|
41
42
|
}
|
|
42
43
|
static async create(options) {
|
|
43
44
|
if (!IModelHost.isValid) {
|
|
44
|
-
await
|
|
45
|
+
await TestUtils.startBackend();
|
|
45
46
|
}
|
|
46
47
|
const iModel = options?.bimFile ?
|
|
47
48
|
await this.loadIModelFile(options.bimFile) :
|
|
@@ -104,7 +105,6 @@ export class TestContext {
|
|
|
104
105
|
throw new Error(`The schema '${schemaKey.name}' could not be found in the assets folder.`);
|
|
105
106
|
const schemaXml = await getOrderedSchemaStrings(testSchema);
|
|
106
107
|
await this._iModel.importSchemaStrings(schemaXml);
|
|
107
|
-
this._iModel.saveChanges();
|
|
108
108
|
if (this.iModel.isBriefcaseDb() && !this.iModel.isReadonly) {
|
|
109
109
|
await this.iModel.pushChanges({ description: "import test schema" });
|
|
110
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestContext.js","sourceRoot":"","sources":["../../../../src/test/incrementalSchemaLocater/TestContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAa,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACjI,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAS7B,MAAM,OAAO,WAAW;IACL,OAAO,CAAW;IAClB,cAAc,CAAW;IACzB,aAAa,CAAgB;IAE9C,YAAoB,MAAgB;QAClC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;YACzE,OAAO,OAAO,YAAY,8BAA8B,CAAC;QAC3D,CAAC,CAAa,CAAC;QAEf,kGAAkG;QAClG,uGAAuG;QACvG,+CAA+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C;IAC1C,MAAM,WAAW,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,wCAAwC,EAAE,iBAAiB,CAAC,CAAC;IACjH,MAAM,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAEhC,MAAM,UAAU,GAAG,IAAI,aAAa,EAAE,CAAC;IACvC,MAAM,GAAG,GAAG,UAAU,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAEtD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import { Schema, SchemaContext, SchemaGraphUtil, SchemaJsonLocater, SchemaKey, SchemaMatchType } from \"@itwin/ecschema-metadata\";\nimport { IModelIncrementalSchemaLocater } from \"../../IModelIncrementalSchemaLocater\";\nimport { BriefcaseDb, IModelDb, StandaloneDb } from \"../../IModelDb\";\nimport { IModelHost } from \"../../IModelHost\";\nimport { KnownTestLocations } from \"../KnownTestLocations\";\nimport { OpenMode } from \"@itwin/core-bentley\";\nimport { IModelJsFs } from \"../../IModelJsFs\";\nimport { ProfileOptions } from \"@itwin/core-common\";\nimport { SchemaXmlFileLocater } from \"@itwin/ecschema-locaters\";\nimport { DOMParser, XMLSerializer } from \"@xmldom/xmldom\";\nimport * as path from \"path\";\n\ninterface Options {\n readonly bimFile?: string;\n readonly incrementalSchemaLoading?: \"enabled\" | \"disabled\" | undefined;\n}\n\ntype SchemaLocaterType<TOptions> = TOptions extends { incrementalSchemaLoading: \"disabled\" } ? never : IModelIncrementalSchemaLocater;\n\nexport class TestContext<TLocater = never> implements AsyncDisposable {\n private readonly _iModel: IModelDb;\n private readonly _schemaLocater: TLocater;\n private readonly _assetContext: SchemaContext;\n\n private constructor(iModel: IModelDb) {\n this._iModel = iModel;\n this._schemaLocater = this._iModel.schemaContext.locaters.find((locater) => {\n return locater instanceof IModelIncrementalSchemaLocater;\n }) as TLocater;\n\n // Ideally we should not need a seperate context here to locate and locate the bisschemas from the\n // parent imodel context, but due to a bug in the incremental schema logic, we have to do this for now.\n // TODO: remove this when issue #1763 is fixed.\n this._assetContext = new SchemaContext();\n this._assetContext.addLocater(new SchemaJsonLocater((schemaName) => {\n return iModel.getSchemaProps(schemaName);\n }))\n const xmlAssetSchemaLocater = new SchemaXmlFileLocater();\n xmlAssetSchemaLocater.addSchemaSearchPath(path.join(KnownTestLocations.assetsDir, \"IncrementalSchemaLocater\"));\n this._assetContext.addLocater(xmlAssetSchemaLocater);\n\n iModel.schemaContext.addLocater(this._assetContext);\n }\n\n public get iModel(): IModelDb {\n return this._iModel;\n }\n\n public get schemaLocater(): TLocater {\n return this._schemaLocater;\n }\n\n public get schemaContext(): SchemaContext {\n return this._iModel.schemaContext;\n }\n\n public static async create<TOptions extends Options>(options?: TOptions): Promise<TestContext<SchemaLocaterType<TOptions>>> {\n if (!IModelHost.isValid) {\n await IModelHost.startup()\n }\n\n const iModel = options?.bimFile ?\n await this.loadIModelFile(options.bimFile) :\n await this.createIModel();\n\n const configuration = IModelHost.configuration;\n if (configuration) {\n const previousSetting = configuration.incrementalSchemaLoading;\n configuration.incrementalSchemaLoading = options ? options.incrementalSchemaLoading : \"enabled\";\n iModel.onBeforeClose.addOnce(() => {\n configuration.incrementalSchemaLoading = previousSetting;\n });\n }\n\n return new TestContext(iModel);\n }\n\n private static async loadIModelFile(bimFile: string): Promise<IModelDb> {\n const pathToBriefCase = path.join(KnownTestLocations.assetsDir, bimFile);\n return BriefcaseDb.open({\n fileName: pathToBriefCase,\n readonly: true,\n key: \"test-iModel\",\n });\n }\n\n private static async createIModel(): Promise<IModelDb> {\n const testBimPath = path.join(KnownTestLocations.assetsDir, \"IncrementalSchemaLocater\", \"test-bim.bim\");\n\n if (IModelJsFs.existsSync(testBimPath)) {\n ~\n IModelJsFs.removeSync(testBimPath);\n }\n\n const localBim = StandaloneDb.createEmpty(testBimPath, {\n enableTransactions: true,\n rootSubject: {\n name: \"IncrementalSchemaTestingDb\"\n },\n });\n\n localBim.close();\n\n const nativeDb = IModelDb.openDgnDb({ path: testBimPath }, OpenMode.ReadWrite, { profile: ProfileOptions.Upgrade });\n nativeDb.saveChanges();\n nativeDb.closeFile();\n\n return StandaloneDb.openFile(testBimPath, OpenMode.ReadWrite);\n }\n\n public async getSchemaNames(): Promise<string[]> {\n const result = new Array<string>();\n const sqlQuery = \"SELECT Name, VersionMajor, VersionWrite, VersionMinor FROM meta.ECSchemaDef ORDER BY Name\";\n const reader = this._iModel.createQueryReader(sqlQuery);\n while (await reader.step()) {\n const name = reader.current[0];\n const versionMajor = reader.current[1];\n const versionWrite = reader.current[2];\n const versionMinor = reader.current[3];\n\n result.push(`${name}.${versionMajor}.${versionWrite}.${versionMinor}`);\n }\n return result;\n }\n\n public async importAssetSchema(schemaKey: SchemaKey): Promise<Schema> {\n // If schema is already in the iModel, return it.\n if (undefined !== this.iModel.querySchemaVersion(schemaKey.name))\n return await this.schemaContext.getSchema(schemaKey) as Schema;\n\n // Locate the schema from the assets using the schema contexts asset locaters.\n const testSchema = await this._assetContext.getSchema(schemaKey, SchemaMatchType.Exact);\n if (undefined === testSchema)\n throw new Error(`The schema '${schemaKey.name}' could not be found in the assets folder.`);\n\n const schemaXml = await getOrderedSchemaStrings(testSchema);\n await this._iModel.importSchemaStrings(schemaXml);\n this._iModel.saveChanges();\n\n if (this.iModel.isBriefcaseDb() && !this.iModel.isReadonly) {\n await this.iModel.pushChanges({ description: \"import test schema\" });\n }\n\n const schema = await this.schemaContext.getSchema(schemaKey);\n if (undefined === schema)\n throw new Error(`The schema '${schemaKey.name}' could not be found after import.`);\n\n if (schema.loadingController && !schema.loadingController.isComplete) {\n await schema.loadingController.wait();\n }\n\n return schema;\n }\n\n public async [Symbol.asyncDispose](): Promise<void> {\n return this._iModel.close();\n }\n}\n\nasync function getOrderedSchemaStrings(insertSchema: Schema): Promise<string[]> {\n const schemas = SchemaGraphUtil.buildDependencyOrderedSchemaList(insertSchema);\n const schemaStrings = await Promise.all(schemas.map(async (schema) => getSchemaString(schema)));\n return schemaStrings;\n}\n\nasync function getSchemaString(schema: Schema): Promise<string> {\n // Serialize schema to the document object\n const xmlDocument = new DOMParser().parseFromString(`<?xml version=\"1.0\" encoding=\"UTF-8\"?>`, \"application/xml\");\n await schema.toXml(xmlDocument);\n\n const serializer = new XMLSerializer();\n const xml = serializer.serializeToString(xmlDocument);\n\n return xml;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TestContext.js","sourceRoot":"","sources":["../../../../src/test/incrementalSchemaLocater/TestContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAa,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACjI,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AASzC,MAAM,OAAO,WAAW;IACL,OAAO,CAAW;IAClB,cAAc,CAAW;IACzB,aAAa,CAAgB;IAE9C,YAAoB,MAAgB;QAClC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE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,CAAC;AAED,KAAK,UAAU,eAAe,CAAC,MAAc;IAC3C,0CAA0C;IAC1C,MAAM,WAAW,GAAG,IAAI,SAAS,EAAE,CAAC,eAAe,CAAC,wCAAwC,EAAE,iBAAiB,CAAC,CAAC;IACjH,MAAM,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAEhC,MAAM,UAAU,GAAG,IAAI,aAAa,EAAE,CAAC;IACvC,MAAM,GAAG,GAAG,UAAU,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAEtD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["import { Schema, SchemaContext, SchemaGraphUtil, SchemaJsonLocater, SchemaKey, SchemaMatchType } from \"@itwin/ecschema-metadata\";\nimport { IModelIncrementalSchemaLocater } from \"../../IModelIncrementalSchemaLocater\";\nimport { BriefcaseDb, IModelDb, StandaloneDb } from \"../../IModelDb\";\nimport { IModelHost } from \"../../IModelHost\";\nimport { KnownTestLocations } from \"../KnownTestLocations\";\nimport { OpenMode } from \"@itwin/core-bentley\";\nimport { IModelJsFs } from \"../../IModelJsFs\";\nimport { ProfileOptions } from \"@itwin/core-common\";\nimport { SchemaXmlFileLocater } from \"@itwin/ecschema-locaters\";\nimport { DOMParser, XMLSerializer } from \"@xmldom/xmldom\";\nimport * as path from \"path\";\nimport { TestUtils } from \"../TestUtils\";\n\ninterface Options {\n readonly bimFile?: string;\n readonly incrementalSchemaLoading?: \"enabled\" | \"disabled\" | undefined;\n}\n\ntype SchemaLocaterType<TOptions> = TOptions extends { incrementalSchemaLoading: \"disabled\" } ? never : IModelIncrementalSchemaLocater;\n\nexport class TestContext<TLocater = never> implements AsyncDisposable {\n private readonly _iModel: IModelDb;\n private readonly _schemaLocater: TLocater;\n private readonly _assetContext: SchemaContext;\n\n private constructor(iModel: IModelDb) {\n this._iModel = iModel;\n this._schemaLocater = this._iModel.schemaContext.locaters.find((locater) => {\n return locater instanceof IModelIncrementalSchemaLocater;\n }) as TLocater;\n\n // Ideally we should not need a seperate context here to locate and locate the bisschemas from the\n // parent imodel context, but due to a bug in the incremental schema logic, we have to do this for now.\n // TODO: remove this when issue #1763 is fixed.\n this._assetContext = new SchemaContext();\n this._assetContext.addLocater(new SchemaJsonLocater((schemaName) => {\n return iModel.getSchemaProps(schemaName);\n }))\n const xmlAssetSchemaLocater = new SchemaXmlFileLocater();\n xmlAssetSchemaLocater.addSchemaSearchPath(path.join(KnownTestLocations.assetsDir, \"IncrementalSchemaLocater\"));\n this._assetContext.addLocater(xmlAssetSchemaLocater);\n\n iModel.schemaContext.addLocater(this._assetContext);\n }\n\n public get iModel(): IModelDb {\n return this._iModel;\n }\n\n public get schemaLocater(): TLocater {\n return this._schemaLocater;\n }\n\n public get schemaContext(): SchemaContext {\n return this._iModel.schemaContext;\n }\n\n public static async create<TOptions extends Options>(options?: TOptions): Promise<TestContext<SchemaLocaterType<TOptions>>> {\n if (!IModelHost.isValid) {\n await TestUtils.startBackend();\n }\n\n const iModel = options?.bimFile ?\n await this.loadIModelFile(options.bimFile) :\n await this.createIModel();\n\n const configuration = IModelHost.configuration;\n if (configuration) {\n const previousSetting = configuration.incrementalSchemaLoading;\n configuration.incrementalSchemaLoading = options ? options.incrementalSchemaLoading : \"enabled\";\n iModel.onBeforeClose.addOnce(() => {\n configuration.incrementalSchemaLoading = previousSetting;\n });\n }\n\n return new TestContext(iModel);\n }\n\n private static async loadIModelFile(bimFile: string): Promise<IModelDb> {\n const pathToBriefCase = path.join(KnownTestLocations.assetsDir, bimFile);\n return BriefcaseDb.open({\n fileName: pathToBriefCase,\n readonly: true,\n key: \"test-iModel\",\n });\n }\n\n private static async createIModel(): Promise<IModelDb> {\n const testBimPath = path.join(KnownTestLocations.assetsDir, \"IncrementalSchemaLocater\", \"test-bim.bim\");\n\n if (IModelJsFs.existsSync(testBimPath)) {\n ~\n IModelJsFs.removeSync(testBimPath);\n }\n\n const localBim = StandaloneDb.createEmpty(testBimPath, {\n enableTransactions: true,\n rootSubject: {\n name: \"IncrementalSchemaTestingDb\"\n },\n });\n\n localBim.close();\n\n const nativeDb = IModelDb.openDgnDb({ path: testBimPath }, OpenMode.ReadWrite, { profile: ProfileOptions.Upgrade });\n nativeDb.saveChanges();\n nativeDb.closeFile();\n\n return StandaloneDb.openFile(testBimPath, OpenMode.ReadWrite);\n }\n\n public async getSchemaNames(): Promise<string[]> {\n const result = new Array<string>();\n const sqlQuery = \"SELECT Name, VersionMajor, VersionWrite, VersionMinor FROM meta.ECSchemaDef ORDER BY Name\";\n const reader = this._iModel.createQueryReader(sqlQuery);\n while (await reader.step()) {\n const name = reader.current[0];\n const versionMajor = reader.current[1];\n const versionWrite = reader.current[2];\n const versionMinor = reader.current[3];\n\n result.push(`${name}.${versionMajor}.${versionWrite}.${versionMinor}`);\n }\n return result;\n }\n\n public async importAssetSchema(schemaKey: SchemaKey): Promise<Schema> {\n // If schema is already in the iModel, return it.\n if (undefined !== this.iModel.querySchemaVersion(schemaKey.name))\n return await this.schemaContext.getSchema(schemaKey) as Schema;\n\n // Locate the schema from the assets using the schema contexts asset locaters.\n const testSchema = await this._assetContext.getSchema(schemaKey, SchemaMatchType.Exact);\n if (undefined === testSchema)\n throw new Error(`The schema '${schemaKey.name}' could not be found in the assets folder.`);\n\n const schemaXml = await getOrderedSchemaStrings(testSchema);\n await this._iModel.importSchemaStrings(schemaXml);\n\n if (this.iModel.isBriefcaseDb() && !this.iModel.isReadonly) {\n await this.iModel.pushChanges({ description: \"import test schema\" });\n }\n\n const schema = await this.schemaContext.getSchema(schemaKey);\n if (undefined === schema)\n throw new Error(`The schema '${schemaKey.name}' could not be found after import.`);\n\n if (schema.loadingController && !schema.loadingController.isComplete) {\n await schema.loadingController.wait();\n }\n\n return schema;\n }\n\n public async [Symbol.asyncDispose](): Promise<void> {\n return this._iModel.close();\n }\n}\n\nasync function getOrderedSchemaStrings(insertSchema: Schema): Promise<string[]> {\n const schemas = SchemaGraphUtil.buildDependencyOrderedSchemaList(insertSchema);\n const schemaStrings = await Promise.all(schemas.map(async (schema) => getSchemaString(schema)));\n return schemaStrings;\n}\n\nasync function getSchemaString(schema: Schema): Promise<string> {\n // Serialize schema to the document object\n const xmlDocument = new DOMParser().parseFromString(`<?xml version=\"1.0\" encoding=\"UTF-8\"?>`, \"application/xml\");\n await schema.toXml(xmlDocument);\n\n const serializer = new XMLSerializer();\n const xml = serializer.serializeToString(xmlDocument);\n\n return xml;\n}\n\n"]}
|
package/lib/esm/test/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/test/index.ts"],"names":[],"mappings":"AAIA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
|
package/lib/esm/test/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/test/index.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC","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*--------------------------------------------------------------------------------------------*/\nexport * from \"./AdvancedEqual\";\nexport * from \"./IModelTestUtils\";\nexport * from \"./KnownTestLocations\";\nexport * from \"./RevisionUtility\";\nexport * from \"./TestChangeSetUtility\";\nexport * from \"./imageData\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/test/index.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC","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*--------------------------------------------------------------------------------------------*/\nexport * from \"./AdvancedEqual\";\nexport * from \"./IModelTestUtils\";\nexport * from \"./KnownTestLocations\";\nexport * from \"./RevisionUtility\";\nexport * from \"./TestChangeSetUtility\";\nexport * from \"./TestEditTxn\";\nexport * from \"./imageData\";\n"]}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { assert, expect } from "chai";
|
|
6
6
|
import * as sinon from "sinon";
|
|
7
7
|
import * as path from "path";
|
|
8
|
+
import { withEditTxn } from "../../EditTxn";
|
|
8
9
|
import { BisCodeSpec, Code, ConcreteEntityTypes, ECJsNames, RelatedElement, SchemaState, } from "@itwin/core-common";
|
|
9
10
|
import { DefinitionElement, DefinitionModel, ElementRefersToElements, Entity, EntityReferences, IModelDb, IModelJsFs, RepositoryLink, Schema, SpatialViewDefinition, StandaloneDb, UrlLink, ViewDefinition3d, } from "../../core-backend";
|
|
10
11
|
import { IModelTestUtils } from "../IModelTestUtils";
|
|
@@ -360,12 +361,12 @@ describe("Class Registry - generated classes", () => {
|
|
|
360
361
|
super(props, imodel);
|
|
361
362
|
}
|
|
362
363
|
}
|
|
363
|
-
const testEntityId = imodel.
|
|
364
|
+
const testEntityId = withEditTxn(imodel, (txn) => txn.insertElement({
|
|
364
365
|
classFullName: "TestGeneratedClasses:TestEntity",
|
|
365
366
|
prop: "sample-value",
|
|
366
367
|
model: IModelDb.dictionaryId,
|
|
367
368
|
code: Code.createEmpty(),
|
|
368
|
-
});
|
|
369
|
+
}));
|
|
369
370
|
const elemWithNavProp = new GeneratedTestElementWithNavProp({
|
|
370
371
|
classFullName: "TestGeneratedClasses:TestElementWithNavProp",
|
|
371
372
|
navProp: {
|
|
@@ -395,12 +396,12 @@ describe("Class Registry - generated classes", () => {
|
|
|
395
396
|
super(props, imodel);
|
|
396
397
|
}
|
|
397
398
|
}
|
|
398
|
-
const testEntityId = imodel.
|
|
399
|
+
const testEntityId = withEditTxn(imodel, (txn) => txn.insertElement({
|
|
399
400
|
classFullName: "TestGeneratedClasses:TestEntity",
|
|
400
401
|
prop: "sample-value",
|
|
401
402
|
model: IModelDb.dictionaryId,
|
|
402
403
|
code: Code.createEmpty(),
|
|
403
|
-
});
|
|
404
|
+
}));
|
|
404
405
|
const elemWithNavProp = new GeneratedTestElementWithNavProp({
|
|
405
406
|
classFullName: "TestGeneratedClasses:TestElementWithNavProp",
|
|
406
407
|
navProp: new RelatedElement({
|
|
@@ -426,19 +427,19 @@ describe("Class Registry - generated classes", () => {
|
|
|
426
427
|
elemWithNavProp.parent && EntityReferences.fromEntityType(elemWithNavProp.parent?.id, ConcreteEntityTypes.Element),
|
|
427
428
|
EntityReferences.fromEntityType(testEntityId, ConcreteEntityTypes.Element),
|
|
428
429
|
].filter((x) => x !== undefined));
|
|
429
|
-
const modelTestEntityIds = new Array(2).fill(undefined).map((_, index) => imodel.
|
|
430
|
+
const modelTestEntityIds = new Array(2).fill(undefined).map((_, index) => withEditTxn(imodel, (txn) => txn.insertElement({
|
|
430
431
|
classFullName: "TestGeneratedClasses:TestEntity",
|
|
431
432
|
prop: `model-value-${index}`,
|
|
432
433
|
model: IModelDb.dictionaryId,
|
|
433
434
|
code: Code.createEmpty(),
|
|
434
|
-
}));
|
|
435
|
+
})));
|
|
435
436
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
436
437
|
const GeneratedTestAspectWithNavProp = imodel.getJsClass("TestGeneratedClasses:TestAspectWithNavProp");
|
|
437
|
-
const aspectWithNavPropId = imodel.
|
|
438
|
+
const aspectWithNavPropId = withEditTxn(imodel, (txn) => txn.insertAspect({
|
|
438
439
|
classFullName: GeneratedTestAspectWithNavProp.classFullName,
|
|
439
440
|
navProp: { id: modelTestEntityIds[0], relClassName: "TestGeneratedClasses:NonElemRel" },
|
|
440
441
|
element: { id: modelTestEntityIds[1] },
|
|
441
|
-
});
|
|
442
|
+
}));
|
|
442
443
|
class GeneratedTestModelWithNavProp extends imodel.getJsClass("TestGeneratedClasses:TestModelWithNavProp") {
|
|
443
444
|
constructor(props) {
|
|
444
445
|
super(props, imodel);
|
|
@@ -453,7 +454,7 @@ describe("Class Registry - generated classes", () => {
|
|
|
453
454
|
// removed due to a bug
|
|
454
455
|
// relNavProp: { id: relWithNavPropId, relClassName: "TestGeneratedClasses:ModelToRelNavRel" },
|
|
455
456
|
});
|
|
456
|
-
const modelWithNavPropId = modelWithNavProp.insert();
|
|
457
|
+
const modelWithNavPropId = withEditTxn(imodel, (txn) => modelWithNavProp.insert(txn));
|
|
457
458
|
expect([...modelWithNavProp.getReferenceIds()]).to.have.members([
|
|
458
459
|
EntityReferences.fromEntityType(modelTestEntityIds[1], ConcreteEntityTypes.Element),
|
|
459
460
|
EntityReferences.fromEntityType(IModelDb.dictionaryId, ConcreteEntityTypes.Model),
|
|
@@ -462,12 +463,12 @@ describe("Class Registry - generated classes", () => {
|
|
|
462
463
|
// ignoring this one, because there seems to be a bug when specifying a relationship instance as a nav prop
|
|
463
464
|
// EntityReferences.fromEntityType(relWithNavPropId, ConcreteEntityTypes.Relationship),
|
|
464
465
|
].filter((x) => x !== undefined));
|
|
465
|
-
const relTestEntityIds = new Array(3).fill(undefined).map((_, index) => imodel.
|
|
466
|
+
const relTestEntityIds = new Array(3).fill(undefined).map((_, index) => withEditTxn(imodel, (txn) => txn.insertElement({
|
|
466
467
|
classFullName: "TestGeneratedClasses:TestEntity",
|
|
467
468
|
prop: `rel-value-${index}`,
|
|
468
469
|
model: IModelDb.dictionaryId,
|
|
469
470
|
code: Code.createEmpty(),
|
|
470
|
-
}));
|
|
471
|
+
})));
|
|
471
472
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
472
473
|
const GeneratedLinkTableRelWithNavProp = imodel.getJsClass("TestGeneratedClasses:LinkTableRelWithNavProp");
|
|
473
474
|
const relWithNavProp = new GeneratedLinkTableRelWithNavProp({
|
|
@@ -487,7 +488,7 @@ describe("Class Registry - generated classes", () => {
|
|
|
487
488
|
relClassName: "TestGeneratedClasses:LinkTableRelToAspectNavRel",
|
|
488
489
|
},
|
|
489
490
|
}, imodel);
|
|
490
|
-
const _relWithNavPropId = relWithNavProp.insert();
|
|
491
|
+
const _relWithNavPropId = withEditTxn(imodel, (txn) => relWithNavProp.insert(txn));
|
|
491
492
|
expect([...relWithNavProp.getReferenceIds()]).to.have.members([
|
|
492
493
|
...relTestEntityIds.map((id) => EntityReferences.fromEntityType(id, ConcreteEntityTypes.Element)),
|
|
493
494
|
EntityReferences.fromEntityType(modelWithNavPropId, ConcreteEntityTypes.Model),
|
|
@@ -517,18 +518,18 @@ describe("Class Registry - generated classes", () => {
|
|
|
517
518
|
super(props, imodel);
|
|
518
519
|
}
|
|
519
520
|
}
|
|
520
|
-
const testEntity1Id = imodel.
|
|
521
|
+
const testEntity1Id = withEditTxn(imodel, (txn) => txn.insertElement({
|
|
521
522
|
classFullName: "TestGeneratedClasses:TestEntity",
|
|
522
523
|
prop: "sample-value-1",
|
|
523
524
|
model: IModelDb.dictionaryId,
|
|
524
525
|
code: Code.createEmpty(),
|
|
525
|
-
});
|
|
526
|
-
const testEntity2Id = imodel.
|
|
526
|
+
}));
|
|
527
|
+
const testEntity2Id = withEditTxn(imodel, (txn) => txn.insertElement({
|
|
527
528
|
classFullName: "TestGeneratedClasses:TestEntity",
|
|
528
529
|
prop: "sample-value-2",
|
|
529
530
|
model: IModelDb.dictionaryId,
|
|
530
531
|
code: Code.createEmpty(),
|
|
531
|
-
});
|
|
532
|
+
}));
|
|
532
533
|
const elemWithNavProp = new ActualTestElementWithNavProp({
|
|
533
534
|
classFullName: TestElementWithNavProp.classFullName,
|
|
534
535
|
navProp: {
|
|
@@ -615,19 +616,19 @@ describe("Class Registry - generated classes", () => {
|
|
|
615
616
|
assert.isTrue(ActualDerived4.prototype.hasOwnProperty("collectReferenceIds")); // manually implements so it should have the method
|
|
616
617
|
assert.isFalse(ActualDerived5.prototype.hasOwnProperty("collectReferenceIds")); // ancestor is non-generated so it shouldn't get the automatic impl
|
|
617
618
|
assert.isFalse(ActualDerived6.prototype.hasOwnProperty("collectReferenceIds")); // ancestor is non-generated so it shouldn't get the automatic impl
|
|
618
|
-
const testEntity1Id = imodel.
|
|
619
|
+
const testEntity1Id = withEditTxn(imodel, (txn) => txn.insertElement({
|
|
619
620
|
classFullName: "TestGeneratedClasses:Derived6",
|
|
620
621
|
prop: "sample-value-1",
|
|
621
622
|
model: IModelDb.dictionaryId,
|
|
622
623
|
code: Code.createEmpty(),
|
|
623
|
-
});
|
|
624
|
-
const testEntity2Id = imodel.
|
|
624
|
+
}));
|
|
625
|
+
const testEntity2Id = withEditTxn(imodel, (txn) => txn.insertElement({
|
|
625
626
|
classFullName: "TestGeneratedClasses:TestEntity",
|
|
626
627
|
prop: "sample-value-2",
|
|
627
628
|
model: IModelDb.dictionaryId,
|
|
628
629
|
code: Code.createEmpty(),
|
|
629
|
-
});
|
|
630
|
-
const derived6Id = imodel.
|
|
630
|
+
}));
|
|
631
|
+
const derived6Id = withEditTxn(imodel, (txn) => txn.insertElement({
|
|
631
632
|
classFullName: Derived6.classFullName,
|
|
632
633
|
model: IModelDb.dictionaryId,
|
|
633
634
|
code: Code.createEmpty(),
|
|
@@ -639,7 +640,7 @@ describe("Class Registry - generated classes", () => {
|
|
|
639
640
|
id: testEntity2Id,
|
|
640
641
|
relClassName: "TestGeneratedClasses:DerivedElemRel",
|
|
641
642
|
},
|
|
642
|
-
});
|
|
643
|
+
}));
|
|
643
644
|
const derived6 = imodel.elements.getElement(derived6Id);
|
|
644
645
|
/** it is not possible to make a spy of an already existing spy, so lazy try making one
|
|
645
646
|
* this is necessary since due to prototypes, some "methods" we listen to are actually the same
|