@itwin/core-backend 5.3.0-dev.9 → 5.4.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -1
- package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
- package/lib/cjs/BriefcaseManager.js +14 -0
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/CloudSqlite.d.ts +11 -0
- package/lib/cjs/CloudSqlite.d.ts.map +1 -1
- package/lib/cjs/CloudSqlite.js.map +1 -1
- package/lib/cjs/DisplayStyle.d.ts +2 -2
- package/lib/cjs/DisplayStyle.d.ts.map +1 -1
- package/lib/cjs/DisplayStyle.js +4 -4
- package/lib/cjs/DisplayStyle.js.map +1 -1
- package/lib/cjs/ECDb.js +1 -1
- package/lib/cjs/ECDb.js.map +1 -1
- package/lib/cjs/Element.d.ts +2 -2
- package/lib/cjs/Element.d.ts.map +1 -1
- package/lib/cjs/Element.js +2 -2
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/IModelDb.d.ts +15 -3
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +42 -5
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelElementCloneContext.d.ts +1 -1
- package/lib/cjs/IModelElementCloneContext.d.ts.map +1 -1
- package/lib/cjs/IModelElementCloneContext.js +2 -2
- package/lib/cjs/IModelElementCloneContext.js.map +1 -1
- package/lib/cjs/Material.d.ts +1 -1
- package/lib/cjs/Material.d.ts.map +1 -1
- package/lib/cjs/Material.js +2 -2
- package/lib/cjs/Material.js.map +1 -1
- package/lib/cjs/Relationship.d.ts +5 -0
- package/lib/cjs/Relationship.d.ts.map +1 -1
- package/lib/cjs/Relationship.js +7 -0
- package/lib/cjs/Relationship.js.map +1 -1
- package/lib/cjs/TxnManager.d.ts +8 -0
- package/lib/cjs/TxnManager.d.ts.map +1 -1
- package/lib/cjs/TxnManager.js +30 -2
- package/lib/cjs/TxnManager.js.map +1 -1
- package/lib/cjs/ViewDefinition.d.ts +1 -1
- package/lib/cjs/ViewDefinition.d.ts.map +1 -1
- package/lib/cjs/ViewDefinition.js +2 -2
- package/lib/cjs/ViewDefinition.js.map +1 -1
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +1 -1
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +4 -4
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
- package/lib/cjs/annotations/TextAnnotationElement.d.ts +5 -4
- package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -1
- package/lib/cjs/annotations/TextAnnotationElement.js +26 -11
- package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/cjs/internal/ElementLRUCache.d.ts.map +1 -1
- package/lib/cjs/internal/ElementLRUCache.js +2 -0
- package/lib/cjs/internal/ElementLRUCache.js.map +1 -1
- package/lib/esm/BriefcaseManager.d.ts.map +1 -1
- package/lib/esm/BriefcaseManager.js +14 -0
- package/lib/esm/BriefcaseManager.js.map +1 -1
- package/lib/esm/CloudSqlite.d.ts +11 -0
- package/lib/esm/CloudSqlite.d.ts.map +1 -1
- package/lib/esm/CloudSqlite.js.map +1 -1
- package/lib/esm/DisplayStyle.d.ts +2 -2
- package/lib/esm/DisplayStyle.d.ts.map +1 -1
- package/lib/esm/DisplayStyle.js +4 -4
- package/lib/esm/DisplayStyle.js.map +1 -1
- package/lib/esm/ECDb.js +1 -1
- package/lib/esm/ECDb.js.map +1 -1
- package/lib/esm/Element.d.ts +2 -2
- package/lib/esm/Element.d.ts.map +1 -1
- package/lib/esm/Element.js +2 -2
- package/lib/esm/Element.js.map +1 -1
- package/lib/esm/IModelDb.d.ts +15 -3
- package/lib/esm/IModelDb.d.ts.map +1 -1
- package/lib/esm/IModelDb.js +42 -5
- package/lib/esm/IModelDb.js.map +1 -1
- package/lib/esm/IModelElementCloneContext.d.ts +1 -1
- package/lib/esm/IModelElementCloneContext.d.ts.map +1 -1
- package/lib/esm/IModelElementCloneContext.js +2 -2
- package/lib/esm/IModelElementCloneContext.js.map +1 -1
- package/lib/esm/Material.d.ts +1 -1
- package/lib/esm/Material.d.ts.map +1 -1
- package/lib/esm/Material.js +2 -2
- package/lib/esm/Material.js.map +1 -1
- package/lib/esm/Relationship.d.ts +5 -0
- package/lib/esm/Relationship.d.ts.map +1 -1
- package/lib/esm/Relationship.js +7 -0
- package/lib/esm/Relationship.js.map +1 -1
- package/lib/esm/TxnManager.d.ts +8 -0
- package/lib/esm/TxnManager.d.ts.map +1 -1
- package/lib/esm/TxnManager.js +30 -2
- package/lib/esm/TxnManager.js.map +1 -1
- package/lib/esm/ViewDefinition.d.ts +1 -1
- package/lib/esm/ViewDefinition.d.ts.map +1 -1
- package/lib/esm/ViewDefinition.js +2 -2
- package/lib/esm/ViewDefinition.js.map +1 -1
- package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +1 -1
- package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js +4 -4
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
- package/lib/esm/annotations/TextAnnotationElement.d.ts +5 -4
- package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -1
- package/lib/esm/annotations/TextAnnotationElement.js +26 -11
- package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/esm/internal/ElementLRUCache.d.ts.map +1 -1
- package/lib/esm/internal/ElementLRUCache.js +2 -0
- package/lib/esm/internal/ElementLRUCache.js.map +1 -1
- package/lib/esm/test/ElementDrivesElement.test.d.ts +93 -0
- package/lib/esm/test/ElementDrivesElement.test.d.ts.map +1 -0
- package/lib/esm/test/ElementDrivesElement.test.js +862 -0
- package/lib/esm/test/ElementDrivesElement.test.js.map +1 -0
- package/lib/esm/test/ElementLRUCache.test.js +19 -0
- package/lib/esm/test/ElementLRUCache.test.js.map +1 -1
- package/lib/esm/test/annotations/Fields.test.js +44 -0
- package/lib/esm/test/annotations/Fields.test.js.map +1 -1
- package/lib/esm/test/annotations/TextAnnotation.test.js +71 -25
- package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
- package/lib/esm/test/ecdb/ConcurrentQuery.test.js +2 -2
- package/lib/esm/test/ecdb/ConcurrentQuery.test.js.map +1 -1
- package/lib/esm/test/ecdb/ECSqlStatement.test.js +33 -2
- package/lib/esm/test/ecdb/ECSqlStatement.test.js.map +1 -1
- package/lib/esm/test/hubaccess/Rebase.test.js +169 -2
- package/lib/esm/test/hubaccess/Rebase.test.js.map +1 -1
- package/lib/esm/test/imodel/Code.test.d.ts +2 -0
- package/lib/esm/test/imodel/Code.test.d.ts.map +1 -0
- package/lib/esm/test/imodel/Code.test.js +272 -0
- package/lib/esm/test/imodel/Code.test.js.map +1 -0
- package/lib/esm/test/imodel/IModel.test.js +144 -1
- package/lib/esm/test/imodel/IModel.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
- package/lib/esm/test/standalone/ChangesetReader.test.js +64 -55
- package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
- package/lib/esm/test/standalone/DisplayStyle.test.js +6 -6
- package/lib/esm/test/standalone/DisplayStyle.test.js.map +1 -1
- package/lib/esm/test/standalone/ElementGraphics.test.js +75 -6
- package/lib/esm/test/standalone/ElementGraphics.test.js.map +1 -1
- package/lib/esm/test/standalone/RenderMaterialElement.test.js +4 -4
- package/lib/esm/test/standalone/RenderMaterialElement.test.js.map +1 -1
- package/lib/esm/test/standalone/TxnManager.test.js +33 -5
- package/lib/esm/test/standalone/TxnManager.test.js.map +1 -1
- package/package.json +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ECSqlQueries.test.js","sourceRoot":"","sources":["../../../../src/test/incrementalSchemaLocater/ECSqlQueries.test.ts"],"names":[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AAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAErD,KAAK,MAAM,KAAK,IAAI,gBAAgB,EAAE,CAAC;YACrC,YAAY,CAAC,KAAK,CAAC,IAAK,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;QACtD,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { AnyPropertyProps, AnySchemaItemProps, ClassProps, RelationshipClassProps, Schema, SchemaItemType, SchemaKey } from \"@itwin/ecschema-metadata\";\nimport { IncrementalTestHelper } from \"./utils/IncrementalTestHelper\";\nimport { expect, use } from \"chai\";\nimport * as deepEqualInAnyOrder from \"deep-equal-in-any-order\";\nimport { TestSqlSchemaLocater } from \"./utils/TestSqlSchemaLocater\";\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\ndescribe(\"ECSql query tests\", function () {\n let schemaLocater: TestSqlSchemaLocater;\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 this.beforeEach(async () => {\n await IncrementalTestHelper.setup();\n schemaLocater = new TestSqlSchemaLocater(IncrementalTestHelper.iModel);\n });\n\n afterEach(async () => {\n await IncrementalTestHelper.close();\n });\n\n it(\"Schema query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"SchemaTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const expectedSchema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!expectedSchema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const actualSchemaProps = await schemaLocater.getSchemaJson(testKey, IncrementalTestHelper.context);\n const actualSchema = await Schema.fromJson(actualSchemaProps!, IncrementalTestHelper.context);\n\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLocater.getEntities(testKey.name, IncrementalTestHelper.context);\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\n it(\"Entity query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"EntityTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLocater.getEntities(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLocater.getStructs(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLocater.getMixins(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLocater.getRelationships(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLocater.getCustomAttributeClasses(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getKindOfQuantities(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getPropertyCategories(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getEnumerations(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getUnits(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getInvertedUnits(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getUnitSystems(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getConstants(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getPhenomenon(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getFormats(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getFormats(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getStructs(testKey.name, IncrementalTestHelper.context);\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,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAK,mBAAmB,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,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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AgB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAErD,KAAK,MAAM,KAAK,IAAI,gBAAgB,EAAE,CAAC;YACrC,YAAY,CAAC,KAAK,CAAC,IAAK,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;QACtD,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,KAAK;QACtD,MAAM,OAAO,GAAG,IAAI,SAAS,CAAC,6BAA6B,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACtE,MAAM,qBAAqB,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QAElD,MAAM,MAAM,GAAG,MAAM,qBAAqB,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACtE,IAAI,CAAC,MAAM;YACT,MAAM,IAAI,KAAK,CAAC,yBAAyB,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QAE3D,MAAM,gBAAgB,GAAG,MAAM,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC;QACrG,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAErD,KAAK,MAAM,KAAK,IAAI,gBAAgB,EAAE,CAAC;YACrC,YAAY,CAAC,KAAK,CAAC,IAAK,EAAE,gBAAgB,EAAE,MAAM,CAAC,CAAC;QACtD,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { AnyPropertyProps, AnySchemaItemProps, ClassProps, RelationshipClassProps, Schema, SchemaItemType, SchemaKey } from \"@itwin/ecschema-metadata\";\nimport { IncrementalTestHelper } from \"./utils/IncrementalTestHelper\";\nimport { expect, use } from \"chai\";\nimport * as deepEqualInAnyOrder from \"deep-equal-in-any-order\";\nimport { TestSqlSchemaLocater } from \"./utils/TestSqlSchemaLocater\";\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\ndescribe(\"ECSql query tests\", function () {\n let schemaLocater: TestSqlSchemaLocater;\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 this.beforeEach(async () => {\n await IncrementalTestHelper.setup();\n schemaLocater = new TestSqlSchemaLocater(IncrementalTestHelper.iModel);\n });\n\n afterEach(async () => {\n await IncrementalTestHelper.close();\n });\n\n it(\"Schema query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"SchemaTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const expectedSchema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!expectedSchema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const actualSchemaProps = await schemaLocater.getSchemaJson(testKey, IncrementalTestHelper.context);\n const actualSchema = await Schema.fromJson(actualSchemaProps!, IncrementalTestHelper.context);\n\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLocater.getEntities(testKey.name, IncrementalTestHelper.context);\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\n it(\"Entity query, props parsed successfully\", async function () {\n const testKey = new SchemaKey(\"EntityTest\", 1, 0, 0);\n await IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLocater.getEntities(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLocater.getStructs(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLocater.getMixins(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLocater.getRelationships(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const classPropsObjects = await schemaLocater.getCustomAttributeClasses(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getKindOfQuantities(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getPropertyCategories(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getEnumerations(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getUnits(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getInvertedUnits(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getUnitSystems(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getConstants(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getPhenomenon(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getFormats(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getFormats(testKey.name, IncrementalTestHelper.context);\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 IncrementalTestHelper.importSchema(testKey);\n\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\n if (!schema)\n throw new Error(`Could not find schema ${testKey.name}`);\n\n const itemPropsObjects = await schemaLocater.getStructs(testKey.name, IncrementalTestHelper.context);\n expect(itemPropsObjects.length).to.be.greaterThan(0);\n\n for (const props of itemPropsObjects) {\n validateItem(props.name!, itemPropsObjects, schema);\n }\n });\n});"]}
|
|
@@ -163,38 +163,25 @@ describe("Changeset Reader API", async () => {
|
|
|
163
163
|
expect(rwIModel[_nativeDb].executeSql("UPDATE ec_Table SET ExclusiveRootClassId=NULL WHERE Name='bis_GeometricElement2d_Overflow'")).to.be.eq(DbResult.BE_SQLITE_OK);
|
|
164
164
|
const adaptor = new ECChangesetAdaptor(reader);
|
|
165
165
|
let assertOnOverflowTable = false;
|
|
166
|
-
const
|
|
167
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
168
|
-
ECClassId: undefined,
|
|
169
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
170
|
-
ECInstanceId: "",
|
|
171
|
-
$meta: {
|
|
172
|
-
tables: ["bis_GeometricElement2d_Overflow"],
|
|
173
|
-
op: "Updated",
|
|
174
|
-
classFullName: "BisCore:GeometricElement2d",
|
|
175
|
-
fallbackClassId: "0x5e",
|
|
176
|
-
changeIndexes: [3],
|
|
177
|
-
stage: "New",
|
|
178
|
-
},
|
|
179
|
-
};
|
|
180
|
-
const expectedDeleted = {
|
|
181
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
182
|
-
ECClassId: undefined,
|
|
183
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
184
|
-
ECInstanceId: "",
|
|
185
|
-
$meta: {
|
|
186
|
-
tables: ["bis_GeometricElement2d_Overflow"],
|
|
187
|
-
op: "Updated",
|
|
188
|
-
classFullName: "BisCore:GeometricElement2d",
|
|
189
|
-
fallbackClassId: "0x5e",
|
|
190
|
-
changeIndexes: [3],
|
|
191
|
-
stage: "Old",
|
|
192
|
-
},
|
|
193
|
-
};
|
|
166
|
+
const classId = getClassIdByName(rwIModel, "GeometricElement2d");
|
|
194
167
|
while (adaptor.step()) {
|
|
195
168
|
if (adaptor.op === "Updated" && adaptor.inserted?.$meta?.tables[0] === "bis_GeometricElement2d_Overflow") {
|
|
196
|
-
assert.
|
|
197
|
-
assert.
|
|
169
|
+
assert.isUndefined(adaptor.inserted.ECClassId);
|
|
170
|
+
assert.equal(adaptor.inserted.ECInstanceId, "");
|
|
171
|
+
assert.deepEqual(adaptor.inserted.$meta?.tables, ["bis_GeometricElement2d_Overflow"]);
|
|
172
|
+
assert.equal(adaptor.inserted.$meta?.op, "Updated");
|
|
173
|
+
assert.equal(adaptor.inserted.$meta?.classFullName, "BisCore:GeometricElement2d");
|
|
174
|
+
assert.equal(adaptor.inserted.$meta.fallbackClassId, classId);
|
|
175
|
+
assert.deepEqual(adaptor.inserted.$meta?.changeIndexes, [3]);
|
|
176
|
+
assert.equal(adaptor.inserted.$meta?.stage, "New");
|
|
177
|
+
assert.equal(adaptor.deleted.ECInstanceId, "");
|
|
178
|
+
assert.isUndefined(adaptor.deleted.ECClassId);
|
|
179
|
+
assert.deepEqual(adaptor.deleted.$meta?.tables, ["bis_GeometricElement2d_Overflow"]);
|
|
180
|
+
assert.equal(adaptor.deleted.$meta?.op, "Updated");
|
|
181
|
+
assert.equal(adaptor.deleted.$meta?.classFullName, "BisCore:GeometricElement2d");
|
|
182
|
+
assert.equal(adaptor.deleted.$meta.fallbackClassId, classId);
|
|
183
|
+
assert.deepEqual(adaptor.deleted.$meta?.changeIndexes, [3]);
|
|
184
|
+
assert.equal(adaptor.deleted.$meta?.stage, "Old");
|
|
198
185
|
assertOnOverflowTable = true;
|
|
199
186
|
}
|
|
200
187
|
}
|
|
@@ -209,6 +196,12 @@ describe("Changeset Reader API", async () => {
|
|
|
209
196
|
return stmt.getValue(0).getId();
|
|
210
197
|
});
|
|
211
198
|
}
|
|
199
|
+
async function getClassNameById(iModel, classId) {
|
|
200
|
+
const reader = iModel.createQueryReader(`select ec_classname(${classId});`);
|
|
201
|
+
if (await reader.step())
|
|
202
|
+
return reader.current[0];
|
|
203
|
+
return undefined;
|
|
204
|
+
}
|
|
212
205
|
it("Changeset reader / EC adaptor", async () => {
|
|
213
206
|
const adminToken = "super manager token";
|
|
214
207
|
const iModelName = "test";
|
|
@@ -292,7 +285,7 @@ describe("Changeset Reader API", async () => {
|
|
|
292
285
|
};
|
|
293
286
|
rwIModel.saveChanges("user 1: data");
|
|
294
287
|
if (true || "test local changes") {
|
|
295
|
-
const testChanges = (changes) => {
|
|
288
|
+
const testChanges = async (changes) => {
|
|
296
289
|
assert.equal(changes.length, 3);
|
|
297
290
|
assert.equal(changes[0].ECInstanceId, "0x20000000001");
|
|
298
291
|
assert.equal(changes[0].$meta?.classFullName, "BisCore:DrawingModel");
|
|
@@ -319,7 +312,10 @@ describe("Changeset Reader API", async () => {
|
|
|
319
312
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
320
313
|
assert.deepEqual(el.BBoxHigh, { X: 15, Y: 15 });
|
|
321
314
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
322
|
-
assert.
|
|
315
|
+
assert.equal(el.Category.Id, "0x20000000002");
|
|
316
|
+
assert.isNotEmpty(el.Category.RelECClassId);
|
|
317
|
+
const categoryRelClass = await getClassNameById(rwIModel, el.Category.RelECClassId);
|
|
318
|
+
assert.equal("BisCore:GeometricElement2dIsInCategory", categoryRelClass);
|
|
323
319
|
assert.equal(el.s, "xxxxxxxxx");
|
|
324
320
|
assert.isNull(el.CodeValue);
|
|
325
321
|
assert.isNull(el.UserLabel);
|
|
@@ -332,11 +328,15 @@ describe("Changeset Reader API", async () => {
|
|
|
332
328
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
333
329
|
assert.deepEqual(el.TypeDefinition, { Id: null, RelECClassId: null });
|
|
334
330
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
335
|
-
assert.
|
|
336
|
-
|
|
337
|
-
|
|
331
|
+
assert.equal(el.CodeSpec.Id, "0x1");
|
|
332
|
+
assert.isNotEmpty(el.CodeSpec.RelECClassId);
|
|
333
|
+
const codeSpecRelClass = await getClassNameById(rwIModel, el.CodeSpec.RelECClassId);
|
|
334
|
+
assert.equal("BisCore:CodeSpecSpecifiesCode", codeSpecRelClass);
|
|
338
335
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
339
|
-
assert.
|
|
336
|
+
assert.equal(el.CodeScope.Id, "0x1");
|
|
337
|
+
assert.isNotEmpty(el.CodeScope.RelECClassId);
|
|
338
|
+
const codeScopeRelClass = await getClassNameById(rwIModel, el.CodeScope.RelECClassId);
|
|
339
|
+
assert.equal("BisCore:ElementScopesCode", codeScopeRelClass);
|
|
340
340
|
assert.deepEqual(el.$meta, {
|
|
341
341
|
tables: [
|
|
342
342
|
"bis_GeometricElement2d",
|
|
@@ -360,7 +360,7 @@ describe("Changeset Reader API", async () => {
|
|
|
360
360
|
while (adaptor.step()) {
|
|
361
361
|
pcu.appendFrom(adaptor);
|
|
362
362
|
}
|
|
363
|
-
testChanges(Array.from(pcu.instances));
|
|
363
|
+
await testChanges(Array.from(pcu.instances));
|
|
364
364
|
}
|
|
365
365
|
catch (e_1) {
|
|
366
366
|
env_1.error = e_1;
|
|
@@ -379,7 +379,7 @@ describe("Changeset Reader API", async () => {
|
|
|
379
379
|
while (adaptor.step()) {
|
|
380
380
|
pcu.appendFrom(adaptor);
|
|
381
381
|
}
|
|
382
|
-
testChanges(Array.from(pcu.instances));
|
|
382
|
+
await testChanges(Array.from(pcu.instances));
|
|
383
383
|
}
|
|
384
384
|
catch (e_2) {
|
|
385
385
|
env_2.error = e_2;
|
|
@@ -515,7 +515,7 @@ describe("Changeset Reader API", async () => {
|
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
517
|
if (true || "test changeset file") {
|
|
518
|
-
const testChanges = (changes) => {
|
|
518
|
+
const testChanges = async (changes) => {
|
|
519
519
|
assert.equal(changes.length, 3);
|
|
520
520
|
assert.equal(changes[0].ECInstanceId, "0x20000000001");
|
|
521
521
|
assert.equal(changes[0].$meta?.classFullName, "BisCore:DrawingModel");
|
|
@@ -542,7 +542,10 @@ describe("Changeset Reader API", async () => {
|
|
|
542
542
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
543
543
|
assert.deepEqual(el.BBoxHigh, { X: 15, Y: 15 });
|
|
544
544
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
545
|
-
assert.
|
|
545
|
+
assert.equal(el.Category.Id, "0x20000000002");
|
|
546
|
+
assert.isNotEmpty(el.Category.RelECClassId);
|
|
547
|
+
const categoryRelClass = await getClassNameById(rwIModel, el.Category.RelECClassId);
|
|
548
|
+
assert.equal("BisCore:GeometricElement2dIsInCategory", categoryRelClass);
|
|
546
549
|
assert.equal(el.s, "xxxxxxxxx");
|
|
547
550
|
assert.isNull(el.CodeValue);
|
|
548
551
|
assert.isNull(el.UserLabel);
|
|
@@ -555,11 +558,15 @@ describe("Changeset Reader API", async () => {
|
|
|
555
558
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
556
559
|
assert.deepEqual(el.TypeDefinition, { Id: null, RelECClassId: null });
|
|
557
560
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
558
|
-
assert.
|
|
561
|
+
assert.equal(el.CodeSpec.Id, "0x1");
|
|
562
|
+
assert.isNotEmpty(el.CodeSpec.RelECClassId);
|
|
563
|
+
const codeSpecRelClass = await getClassNameById(rwIModel, el.CodeSpec.RelECClassId);
|
|
564
|
+
assert.equal("BisCore:CodeSpecSpecifiesCode", codeSpecRelClass);
|
|
559
565
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
560
|
-
assert.
|
|
561
|
-
|
|
562
|
-
|
|
566
|
+
assert.equal(el.CodeScope.Id, "0x1");
|
|
567
|
+
assert.isNotEmpty(el.CodeScope.RelECClassId);
|
|
568
|
+
const codeScopeRelClass = await getClassNameById(rwIModel, el.CodeScope.RelECClassId);
|
|
569
|
+
assert.equal("BisCore:ElementScopesCode", codeScopeRelClass);
|
|
563
570
|
assert.deepEqual(el.$meta, {
|
|
564
571
|
tables: [
|
|
565
572
|
"bis_GeometricElement2d",
|
|
@@ -583,7 +590,7 @@ describe("Changeset Reader API", async () => {
|
|
|
583
590
|
while (adaptor.step()) {
|
|
584
591
|
pcu.appendFrom(adaptor);
|
|
585
592
|
}
|
|
586
|
-
testChanges(Array.from(pcu.instances));
|
|
593
|
+
await testChanges(Array.from(pcu.instances));
|
|
587
594
|
}
|
|
588
595
|
catch (e_7) {
|
|
589
596
|
env_7.error = e_7;
|
|
@@ -602,7 +609,7 @@ describe("Changeset Reader API", async () => {
|
|
|
602
609
|
while (adaptor.step()) {
|
|
603
610
|
pcu.appendFrom(adaptor);
|
|
604
611
|
}
|
|
605
|
-
testChanges(Array.from(pcu.instances));
|
|
612
|
+
await testChanges(Array.from(pcu.instances));
|
|
606
613
|
}
|
|
607
614
|
catch (e_8) {
|
|
608
615
|
env_8.error = e_8;
|
|
@@ -1202,7 +1209,7 @@ describe("Changeset Reader API", async () => {
|
|
|
1202
1209
|
// Cleanup
|
|
1203
1210
|
await Promise.all([secondBriefCase.close(), firstBriefCase.close()]);
|
|
1204
1211
|
});
|
|
1205
|
-
it("Track changeset health stats", async () => {
|
|
1212
|
+
it.skip("Track changeset health stats", async () => {
|
|
1206
1213
|
const adminToken = "super manager token";
|
|
1207
1214
|
const iModelName = "test";
|
|
1208
1215
|
const rwIModelId = await HubMock.createNewIModel({ iTwinId, iModelName, description: "TestSubject", accessToken: adminToken });
|
|
@@ -1284,15 +1291,15 @@ describe("Changeset Reader API", async () => {
|
|
|
1284
1291
|
assert.equal(secondBriefcaseChangesets.length, 2);
|
|
1285
1292
|
const [secondBriefcaseChangeset1, secondBriefcaseChangeset2] = secondBriefcaseChangesets;
|
|
1286
1293
|
expect(secondBriefcaseChangeset1.uncompressedSizeBytes).to.be.greaterThan(40000);
|
|
1287
|
-
expect(secondBriefcaseChangeset1.insertedRows).to.be.
|
|
1294
|
+
expect(secondBriefcaseChangeset1.insertedRows).to.be.eql(0);
|
|
1288
1295
|
expect(secondBriefcaseChangeset1.updatedRows).to.be.greaterThanOrEqual(921);
|
|
1289
|
-
expect(secondBriefcaseChangeset1.deletedRows).to.be.
|
|
1296
|
+
expect(secondBriefcaseChangeset1.deletedRows).to.be.greaterThanOrEqual(52);
|
|
1290
1297
|
expect(secondBriefcaseChangeset1.totalFullTableScans).to.be.eql(0);
|
|
1291
1298
|
expect(secondBriefcaseChangeset1.perStatementStats.length).to.be.eql(11);
|
|
1292
1299
|
expect(secondBriefcaseChangeset2.uncompressedSizeBytes).to.be.greaterThan(40000);
|
|
1293
|
-
expect(secondBriefcaseChangeset2.insertedRows).to.be.
|
|
1300
|
+
expect(secondBriefcaseChangeset2.insertedRows).to.be.greaterThanOrEqual(52);
|
|
1294
1301
|
expect(secondBriefcaseChangeset2.updatedRows).to.be.greaterThanOrEqual(921);
|
|
1295
|
-
expect(secondBriefcaseChangeset2.deletedRows).to.be.
|
|
1302
|
+
expect(secondBriefcaseChangeset2.deletedRows).to.be.eql(0);
|
|
1296
1303
|
expect(secondBriefcaseChangeset2.totalFullTableScans).to.be.eql(0);
|
|
1297
1304
|
expect(secondBriefcaseChangeset2.perStatementStats.length).to.be.eql(11);
|
|
1298
1305
|
// Cleanup
|
|
@@ -1347,6 +1354,7 @@ describe("Changeset Reader API", async () => {
|
|
|
1347
1354
|
await rwIModel.locks.acquireLocks({ shared: drawingModelId });
|
|
1348
1355
|
const e1id = rwIModel.elements.insertElement(e1);
|
|
1349
1356
|
assert.isTrue(Id64.isValidId64(e1id), "insert worked");
|
|
1357
|
+
const testElClassId = getClassIdByName(rwIModel, "Test2dElement");
|
|
1350
1358
|
if (true) {
|
|
1351
1359
|
const reader = SqliteChangesetReader.openInMemory({ db: rwIModel, disableSchemaCheck: true });
|
|
1352
1360
|
const adaptor = new ChangesetECAdaptor(reader);
|
|
@@ -1362,7 +1370,7 @@ describe("Changeset Reader API", async () => {
|
|
|
1362
1370
|
expect(testEl.$meta?.op).to.equals("Inserted");
|
|
1363
1371
|
expect(testEl.$meta?.classFullName).to.equals("TestDomain:Test2dElement");
|
|
1364
1372
|
expect(testEl.$meta?.stage).to.equals("New");
|
|
1365
|
-
expect(testEl.ECClassId).to.equals(
|
|
1373
|
+
expect(testEl.ECClassId).to.equals(testElClassId);
|
|
1366
1374
|
expect(testEl.ECInstanceId).to.equals(e1id);
|
|
1367
1375
|
expect(testEl.Model.Id).to.equals(drawingModelId);
|
|
1368
1376
|
expect(testEl.Category.Id).to.equals(drawingCategoryId);
|
|
@@ -1390,12 +1398,13 @@ describe("Changeset Reader API", async () => {
|
|
|
1390
1398
|
// verify the inserted element's properties
|
|
1391
1399
|
const instances = Array.from(unifier.instances);
|
|
1392
1400
|
expect(instances.length).to.equals(3);
|
|
1401
|
+
const drawingModelClassId = getClassIdByName(rwIModel, "DrawingModel");
|
|
1393
1402
|
// DrawingModel new instance
|
|
1394
1403
|
const drawingModelElNew = instances[0];
|
|
1395
1404
|
expect(drawingModelElNew.$meta?.op).to.equals("Updated");
|
|
1396
1405
|
expect(drawingModelElNew.$meta?.classFullName).to.equals("BisCore:DrawingModel");
|
|
1397
1406
|
expect(drawingModelElNew.$meta?.stage).to.equals("New");
|
|
1398
|
-
expect(drawingModelElNew.ECClassId).to.equals(
|
|
1407
|
+
expect(drawingModelElNew.ECClassId).to.equals(drawingModelClassId);
|
|
1399
1408
|
expect(drawingModelElNew.ECInstanceId).to.equals(drawingModelId);
|
|
1400
1409
|
expect(drawingModelElNew.LastMod).to.exist;
|
|
1401
1410
|
expect(drawingModelElNew.GeometryGuid).to.exist;
|
|
@@ -1404,7 +1413,7 @@ describe("Changeset Reader API", async () => {
|
|
|
1404
1413
|
expect(drawingModelElOld.$meta?.op).to.equals("Updated");
|
|
1405
1414
|
expect(drawingModelElOld.$meta?.classFullName).to.equals("BisCore:DrawingModel");
|
|
1406
1415
|
expect(drawingModelElOld.$meta?.stage).to.equals("Old");
|
|
1407
|
-
expect(drawingModelElOld.ECClassId).to.equals(
|
|
1416
|
+
expect(drawingModelElOld.ECClassId).to.equals(drawingModelClassId);
|
|
1408
1417
|
expect(drawingModelElOld.ECInstanceId).to.equals(drawingModelId);
|
|
1409
1418
|
expect(drawingModelElOld.LastMod).to.null;
|
|
1410
1419
|
expect(drawingModelElOld.GeometryGuid).to.null;
|
|
@@ -1413,7 +1422,7 @@ describe("Changeset Reader API", async () => {
|
|
|
1413
1422
|
expect(testEl.$meta?.op).to.equals("Inserted");
|
|
1414
1423
|
expect(testEl.$meta?.classFullName).to.equals("TestDomain:Test2dElement");
|
|
1415
1424
|
expect(testEl.$meta?.stage).to.equals("New");
|
|
1416
|
-
expect(testEl.ECClassId).to.equals(
|
|
1425
|
+
expect(testEl.ECClassId).to.equals(testElClassId);
|
|
1417
1426
|
expect(testEl.ECInstanceId).to.equals(e1id);
|
|
1418
1427
|
expect(testEl.Model.Id).to.equals(drawingModelId);
|
|
1419
1428
|
expect(testEl.Category.Id).to.equals(drawingCategoryId);
|