@itwin/core-backend 5.5.0-dev.1 → 5.5.0-dev.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -1
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js +5 -5
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js +432 -198
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js +272 -190
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/TestContext.d.ts +27 -0
- package/lib/esm/test/incrementalSchemaLocater/TestContext.d.ts.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/TestContext.js +136 -0
- package/lib/esm/test/incrementalSchemaLocater/TestContext.js.map +1 -0
- package/lib/esm/test/standalone/ChangesetReader.test.js +222 -3
- package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
- package/package.json +14 -14
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.d.ts +0 -11
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.d.ts.map +0 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js +0 -36
- package/lib/esm/test/incrementalSchemaLocater/utils/IModelSchemaLocater.js.map +0 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts +0 -20
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts.map +0 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js +0 -126
- package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js.map +0 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts +0 -24
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts.map +0 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js +0 -67
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js.map +0 -1
|
@@ -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,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,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,CAAC,IAAwB;IACzC,OAAO,IAAI,CAAC,cAAc,KAAK,cAAc,CAAC,WAAW,IAAI,IAAI,CAAC,cAAc,KAAK,cAAc,CAAC,KAAK,IAAI,IAAI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B,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\";\r\nimport { IncrementalTestHelper } from \"./utils/IncrementalTestHelper\";\r\nimport { expect, use } from \"chai\";\r\nimport * as deepEqualInAnyOrder from \"deep-equal-in-any-order\";\r\nimport { TestSqlSchemaLocater } from \"./utils/TestSqlSchemaLocater\";\r\n\r\nuse(deepEqualInAnyOrder);\r\n\r\nfunction findItem<T extends AnySchemaItemProps>(name: string, rowData: T[]) {\r\n const item = rowData.find((i: AnySchemaItemProps) => i.name === name);\r\n if (!item)\r\n throw new Error(`Could not find schema item '${name}'`);\r\n return item;\r\n}\r\n\r\nfunction findProperty<T extends AnyPropertyProps>(name: string, rowData: T[]) {\r\n return rowData.find((i: AnyPropertyProps) => i.name === name);\r\n}\r\n\r\nfunction isECClass(item: AnySchemaItemProps): item is ClassProps {\r\n return item.schemaItemType === SchemaItemType.EntityClass || item.schemaItemType === SchemaItemType.Mixin || item.schemaItemType === SchemaItemType.RelationshipClass ||\r\n item.schemaItemType === SchemaItemType.StructClass || item.schemaItemType === SchemaItemType.CustomAttributeClass;\r\n}\r\n\r\nfunction isRelationshipClass(item: AnySchemaItemProps): item is RelationshipClassProps {\r\n return \"source\" in item && \"target\" in item;\r\n}\r\n\r\ndescribe(\"ECSql query tests\", function () {\r\n let schemaLocater: TestSqlSchemaLocater;\r\n\r\n function validateItem(name: string, itemPropObjects: AnySchemaItemProps[], schema: Schema) {\r\n const actualJson = findItem(name, itemPropObjects);\r\n const expectedItem = schema.getItemSync(name);\r\n const expectedJson = expectedItem!.toJSON();\r\n\r\n // The following code exists because some data coming from the database will not match the\r\n // data from the context due to default values. This is OK as long as the conditions are\r\n // correct. For instance, schemaItem name will not exist in serialized JSON, but does exist\r\n // coming from the DB. RelationshipConstraint's AbstractConstraint is set when only one\r\n // constraint class exists coming from the database, but a serialized Relationship will not\r\n // contain the abstract constraint. The one constraint is 'assumed' to be the abstract constraint.\r\n\r\n expect(actualJson.name).to.equal(expectedItem?.name);\r\n delete (actualJson as any).name;\r\n\r\n if (isECClass(actualJson)) {\r\n if (expectedJson.schemaItemType === \"Mixin\") {\r\n expect(actualJson.modifier).to.be.oneOf([undefined, 'Abstract']);\r\n delete (actualJson as any).modifier;\r\n } else if ((expectedJson as ClassProps).modifier === undefined) {\r\n expect(actualJson.modifier).to.be.oneOf([undefined, 'None']);\r\n delete (actualJson as any).modifier;\r\n }\r\n }\r\n if (isRelationshipClass(actualJson)) {\r\n // abstract can be set via database, but not via context for 1 constraint class\r\n // so verify constraint and conditions are correct and delete property\r\n const expectedRelationship = expectedJson as any as RelationshipClassProps;\r\n if (actualJson.source.abstractConstraint !== expectedRelationship.source.abstractConstraint) {\r\n expect(actualJson.source.abstractConstraint).to.equal(expectedRelationship.source.constraintClasses[0]);\r\n expect(actualJson.source.constraintClasses.length).to.equal(1);\r\n delete (actualJson.source as any).abstractConstraint;\r\n }\r\n if (actualJson.target.abstractConstraint !== expectedRelationship.target.abstractConstraint) {\r\n expect(actualJson.target.abstractConstraint).to.equal(expectedRelationship.target.constraintClasses[0]);\r\n expect(actualJson.target.constraintClasses.length).to.equal(1);\r\n delete (actualJson.target as any).abstractConstraint;\r\n }\r\n }\r\n\r\n if (actualJson.schemaItemType === SchemaItemType.Format) {\r\n if (undefined !== (actualJson as any).includeZero && undefined === (expectedJson as any).includeZero) {\r\n expect((actualJson as any).includeZero).to.equal(true);\r\n delete (actualJson as any).includeZero;\r\n }\r\n if ((actualJson as any).composite && undefined !== (actualJson as any).composite.includeZero && undefined === (expectedJson as any).composite.includeZero) {\r\n expect((actualJson as any).composite.includeZero).to.equal(true);\r\n delete (actualJson as any).composite.includeZero;\r\n }\r\n if ((actualJson as any).composite && undefined !== (actualJson as any).composite.spacer && undefined === (expectedJson as any).composite.spacer) {\r\n expect((actualJson as any).composite.spacer).to.equal(\" \");\r\n delete (actualJson as any).composite.spacer;\r\n }\r\n if (undefined !== (actualJson as any).decimalSeparator && undefined === (expectedJson as any).decimalSeparator) {\r\n expect((actualJson as any).decimalSeparator).to.equal(\".\");\r\n delete (actualJson as any).decimalSeparator;\r\n }\r\n if (undefined !== (actualJson as any).roundFactor && undefined === (expectedJson as any).roundFactor) {\r\n expect((actualJson as any).roundFactor).to.equal(0);\r\n delete (actualJson as any).roundFactor;\r\n }\r\n if (undefined !== (actualJson as any).showSignOption && undefined === (expectedJson as any).showSignOption) {\r\n expect((actualJson as any).showSignOption).to.equal(\"OnlyNegative\");\r\n delete (actualJson as any).showSignOption;\r\n }\r\n if (undefined !== (actualJson as any).thousandSeparator && undefined === (expectedJson as any).thousandSeparator) {\r\n expect((actualJson as any).thousandSeparator).to.equal(\",\");\r\n delete (actualJson as any).thousandSeparator;\r\n }\r\n if (undefined !== (actualJson as any).uomSeparator && undefined === (expectedJson as any).uomSeparator) {\r\n expect((actualJson as any).uomSeparator).to.equal(\" \");\r\n delete (actualJson as any).uomSeparator;\r\n }\r\n if (undefined !== (actualJson as any).spacer && undefined === (expectedJson as any).spacer) {\r\n expect((actualJson as any).spacer).to.equal(\" \");\r\n delete (actualJson as any).spacer;\r\n }\r\n if (undefined !== (actualJson as any).formatTraits) {\r\n (actualJson as any).formatTraits = (actualJson as any).formatTraits.map((trait: string) => {\r\n return trait.charAt(0).toUpperCase() + trait.slice(1);\r\n });\r\n }\r\n }\r\n\r\n expect(actualJson).to.deep.equalInAnyOrder(expectedJson);\r\n }\r\n\r\n this.beforeEach(async () => {\r\n await IncrementalTestHelper.setup();\r\n schemaLocater = new TestSqlSchemaLocater(IncrementalTestHelper.iModel);\r\n });\r\n\r\n afterEach(async () => {\r\n await IncrementalTestHelper.close();\r\n });\r\n\r\n it(\"Schema query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"SchemaTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const expectedSchema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!expectedSchema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const actualSchemaProps = await schemaLocater.getSchemaJson(testKey, IncrementalTestHelper.context);\r\n const actualSchema = await Schema.fromJson(actualSchemaProps!, IncrementalTestHelper.context);\r\n\r\n expect(actualSchema.toJSON()).to.deep.equal(expectedSchema?.toJSON());\r\n });\r\n\r\n it(\"Property query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"PropertyTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const classPropsObjects = await schemaLocater.getEntities(testKey.name, IncrementalTestHelper.context);\r\n const entityOneProps = findItem(\"EntityOne\", classPropsObjects);\r\n const entityTwoProps = findItem(\"EntityTwo\", classPropsObjects);\r\n const expectedEntityOne = await schema.getEntityClass(\"EntityOne\");\r\n const expectedEntityTwo = await schema.getEntityClass(\"EntityTwo\");\r\n\r\n const validateProperty = (propertyName: string, actualItem = entityOneProps, expectedItem = expectedEntityOne) => {\r\n const actualProperty = findProperty(propertyName, actualItem.properties!);\r\n const expectedProperty = expectedItem?.getPropertySync(propertyName);\r\n // if maxOccurs is the maximum int value in the context Schema,\r\n // the property from the DB will not have a value\r\n if ((expectedProperty as any).maxOccurs === 2147483647) {\r\n expect((actualProperty as any).maxOccurs).to.be.undefined;\r\n // set so comparison will pass\r\n (actualProperty as any).maxOccurs = 2147483647;\r\n }\r\n\r\n expect(actualProperty).to.deep.equal(expectedProperty?.toJSON());\r\n };\r\n\r\n // All but one testable property is in EntityOne\r\n for (const property of await expectedEntityOne!.getProperties(true)) {\r\n validateProperty(property.name);\r\n }\r\n // Backward direction Navigation property is in EntityTwo\r\n validateProperty(\"EntityTwoParent\", entityTwoProps, expectedEntityTwo);\r\n\r\n });\r\n\r\n it(\"Entity query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"EntityTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const classPropsObjects = await schemaLocater.getEntities(testKey.name, IncrementalTestHelper.context);\r\n expect(classPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"EntityModifierNone\", classPropsObjects, schema);\r\n validateItem(\"EntityModifierAbstract\", classPropsObjects, schema);\r\n validateItem(\"EntityModifierSealed\", classPropsObjects, schema);\r\n });\r\n\r\n it(\"Struct query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"StructTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const classPropsObjects = await schemaLocater.getStructs(testKey.name, IncrementalTestHelper.context);\r\n expect(classPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"StructModifierNone\", classPropsObjects, schema);\r\n validateItem(\"StructModifierAbstract\", classPropsObjects, schema);\r\n validateItem(\"StructModifierSealed\", classPropsObjects, schema);\r\n });\r\n\r\n it(\"Mixin query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"MixinTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const classPropsObjects = await schemaLocater.getMixins(testKey.name, IncrementalTestHelper.context);\r\n expect(classPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"IBaseMixin\", classPropsObjects, schema);\r\n validateItem(\"ITestMixin\", classPropsObjects, schema);\r\n });\r\n\r\n it(\"Relationship query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"RelationshipTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const classPropsObjects = await schemaLocater.getRelationships(testKey.name, IncrementalTestHelper.context);\r\n expect(classPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"OwnerOwnsVehicles\", classPropsObjects, schema);\r\n validateItem(\"OwnerOwnsCars\", classPropsObjects, schema);\r\n validateItem(\"OwnerOwnsAmericanCars\", classPropsObjects, schema);\r\n validateItem(\"PhysicalModelBreaksDownCarElement\", classPropsObjects, schema);\r\n });\r\n\r\n it(\"CustomAttributeClass query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"CustomAttributeClassTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const classPropsObjects = await schemaLocater.getCustomAttributeClasses(testKey.name, IncrementalTestHelper.context);\r\n expect(classPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"CustomAttributeModifierNone\", classPropsObjects, schema);\r\n validateItem(\"CustomAttributeModifierSealed\", classPropsObjects, schema);\r\n validateItem(\"CustomAttributeModifierAbstract\", classPropsObjects, schema);\r\n });\r\n\r\n it(\"KindOfQuantity query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"KindOfQuantityTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLocater.getKindOfQuantities(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"ACCELERATION\", itemPropsObjects, schema);\r\n validateItem(\"ANGLE\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"PropertyCategory query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"PropertyCategoryTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLocater.getPropertyCategories(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"PropertyCategory1\", itemPropsObjects, schema);\r\n validateItem(\"PropertyCategory2\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"Enumeration query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"EnumerationTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLocater.getEnumerations(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"IntEnumeration\", itemPropsObjects, schema);\r\n validateItem(\"StringEnumeration\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"Unit query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"UnitTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLocater.getUnits(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"LITRE\", itemPropsObjects, schema);\r\n validateItem(\"GALLON\", itemPropsObjects, schema);\r\n validateItem(\"ACRE\", itemPropsObjects, schema);\r\n validateItem(\"FAHRENHEIT\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"InvertedUnit query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"InvertedUnitTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLocater.getInvertedUnits(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"FT_HORIZONTAL_PER_FT_VERTICAL\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"UnitSystem query, props parsed successfully\", async function () {\r\n // There's a UnitSystem in there.\r\n const testKey = new SchemaKey(\"InvertedUnitTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLocater.getUnitSystems(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"USCUSTOM\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"Constant query, props parsed successfully\", async function () {\r\n // There's a UnitSystem in there.\r\n const testKey = new SchemaKey(\"ConstantTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLocater.getConstants(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"KILO\", itemPropsObjects, schema);\r\n validateItem(\"HALF_PI\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"Phenomenon query, props parsed successfully\", async function () {\r\n // There's a Phenomenon in there.\r\n const testKey = new SchemaKey(\"ConstantTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLocater.getPhenomenon(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"NUMBER\", itemPropsObjects, schema);\r\n validateItem(\"LENGTH_RATIO\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"Format Schema parses successfully\", async function () {\r\n // Using installed Formats schema\r\n const testKey = new SchemaKey(\"Formats\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLocater.getFormats(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n for (const props of itemPropsObjects) {\r\n validateItem(props.name!, itemPropsObjects, schema);\r\n }\r\n });\r\n\r\n it(\"Comprehensive Format parses successfully\", async function () {\r\n const testKey = new SchemaKey(\"FormatTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLocater.getFormats(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n for (const props of itemPropsObjects) {\r\n validateItem(props.name!, itemPropsObjects, schema);\r\n }\r\n });\r\n\r\n it(\"CustomAttribute instances parse successfully\", async function () {\r\n const testKey = new SchemaKey(\"CustomAttributeInstanceTest\", 1, 0, 0);\r\n await IncrementalTestHelper.importSchema(testKey);\r\n\r\n const schema = await IncrementalTestHelper.context.getSchema(testKey);\r\n if (!schema)\r\n throw new Error(`Could not find schema ${testKey.name}`);\r\n\r\n const itemPropsObjects = await schemaLocater.getStructs(testKey.name, IncrementalTestHelper.context);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n for (const props of itemPropsObjects) {\r\n validateItem(props.name!, itemPropsObjects, schema);\r\n }\r\n });\r\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,GAA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M,CAAC,CAAC;YACtD,CAAC;;;;;;;;;;;KACF,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,KAAK;;;YACtD,MAAM,OAAO,GAAG,IAAI,SAAS,CAAC,6BAA6B,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YACtE,MAAY,GAAG,mCAAG,MAAM,iBAAiB,EAAE,OAAA,CAAC;YAE5C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;YACpD,MAAM,gBAAgB,GAAG,MAAM,GAAG,CAAC,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC;YAC7F,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\";\r\nimport { expect, use } from \"chai\";\r\nimport { TestContext } from \"./TestContext\";\r\nimport { IModelIncrementalSchemaLocater } from \"../../IModelIncrementalSchemaLocater\";\r\nimport * as deepEqualInAnyOrder from \"deep-equal-in-any-order\";\r\n\r\nuse(deepEqualInAnyOrder);\r\n\r\nfunction findItem<T extends AnySchemaItemProps>(name: string, rowData: T[]) {\r\n const item = rowData.find((i: AnySchemaItemProps) => i.name === name);\r\n if (!item)\r\n throw new Error(`Could not find schema item '${name}'`);\r\n return item;\r\n}\r\n\r\nfunction findProperty<T extends AnyPropertyProps>(name: string, rowData: T[]) {\r\n return rowData.find((i: AnyPropertyProps) => i.name === name);\r\n}\r\n\r\nfunction isECClass(item: AnySchemaItemProps): item is ClassProps {\r\n return item.schemaItemType === SchemaItemType.EntityClass || item.schemaItemType === SchemaItemType.Mixin || item.schemaItemType === SchemaItemType.RelationshipClass ||\r\n item.schemaItemType === SchemaItemType.StructClass || item.schemaItemType === SchemaItemType.CustomAttributeClass;\r\n}\r\n\r\nfunction isRelationshipClass(item: AnySchemaItemProps): item is RelationshipClassProps {\r\n return \"source\" in item && \"target\" in item;\r\n}\r\n\r\n/**\r\n * A test locater that exposes the protected methods of IModelIncrementalSchemaLocater for granular testing.\r\n */\r\nabstract class TestSchemaLocater extends IModelIncrementalSchemaLocater {\r\n public abstract override getSchemaJson: IModelIncrementalSchemaLocater[\"getSchemaJson\"];\r\n public abstract override getConstants: IModelIncrementalSchemaLocater[\"getConstants\"];\r\n public abstract override getCustomAttributeClasses: IModelIncrementalSchemaLocater[\"getCustomAttributeClasses\"];\r\n public abstract override getEntities: IModelIncrementalSchemaLocater[\"getEntities\"];\r\n public abstract override getEnumerations: IModelIncrementalSchemaLocater[\"getEnumerations\"];\r\n public abstract override getFormats: IModelIncrementalSchemaLocater[\"getFormats\"];\r\n public abstract override getInvertedUnits: IModelIncrementalSchemaLocater[\"getInvertedUnits\"];\r\n public abstract override getKindOfQuantities: IModelIncrementalSchemaLocater[\"getKindOfQuantities\"];\r\n public abstract override getMixins: IModelIncrementalSchemaLocater[\"getMixins\"];\r\n public abstract override getPhenomenon: IModelIncrementalSchemaLocater[\"getPhenomenon\"];\r\n public abstract override getPropertyCategories: IModelIncrementalSchemaLocater[\"getPropertyCategories\"];\r\n public abstract override getRelationships: IModelIncrementalSchemaLocater[\"getRelationships\"];\r\n public abstract override getStructs: IModelIncrementalSchemaLocater[\"getStructs\"];\r\n public abstract override getUnits: IModelIncrementalSchemaLocater[\"getUnits\"];\r\n public abstract override getUnitSystems: IModelIncrementalSchemaLocater[\"getUnitSystems\"];\r\n}\r\n\r\ndescribe(\"ECSql query tests\", function () {\r\n\r\n function validateItem(name: string, itemPropObjects: AnySchemaItemProps[], schema: Schema) {\r\n const actualJson = findItem(name, itemPropObjects);\r\n const expectedItem = schema.getItemSync(name);\r\n const expectedJson = expectedItem!.toJSON();\r\n\r\n // The following code exists because some data coming from the database will not match the\r\n // data from the context due to default values. This is OK as long as the conditions are\r\n // correct. For instance, schemaItem name will not exist in serialized JSON, but does exist\r\n // coming from the DB. RelationshipConstraint's AbstractConstraint is set when only one\r\n // constraint class exists coming from the database, but a serialized Relationship will not\r\n // contain the abstract constraint. The one constraint is 'assumed' to be the abstract constraint.\r\n\r\n expect(actualJson.name).to.equal(expectedItem?.name);\r\n delete (actualJson as any).name;\r\n\r\n if (isECClass(actualJson)) {\r\n if (expectedJson.schemaItemType === \"Mixin\") {\r\n expect(actualJson.modifier).to.be.oneOf([undefined, 'Abstract']);\r\n delete (actualJson as any).modifier;\r\n } else if ((expectedJson as ClassProps).modifier === undefined) {\r\n expect(actualJson.modifier).to.be.oneOf([undefined, 'None']);\r\n delete (actualJson as any).modifier;\r\n }\r\n }\r\n if (isRelationshipClass(actualJson)) {\r\n // abstract can be set via database, but not via context for 1 constraint class\r\n // so verify constraint and conditions are correct and delete property\r\n const expectedRelationship = expectedJson as any as RelationshipClassProps;\r\n if (actualJson.source.abstractConstraint !== expectedRelationship.source.abstractConstraint) {\r\n expect(actualJson.source.abstractConstraint).to.equal(expectedRelationship.source.constraintClasses[0]);\r\n expect(actualJson.source.constraintClasses.length).to.equal(1);\r\n delete (actualJson.source as any).abstractConstraint;\r\n }\r\n if (actualJson.target.abstractConstraint !== expectedRelationship.target.abstractConstraint) {\r\n expect(actualJson.target.abstractConstraint).to.equal(expectedRelationship.target.constraintClasses[0]);\r\n expect(actualJson.target.constraintClasses.length).to.equal(1);\r\n delete (actualJson.target as any).abstractConstraint;\r\n }\r\n }\r\n\r\n if (actualJson.schemaItemType === SchemaItemType.Format) {\r\n if (undefined !== (actualJson as any).includeZero && undefined === (expectedJson as any).includeZero) {\r\n expect((actualJson as any).includeZero).to.equal(true);\r\n delete (actualJson as any).includeZero;\r\n }\r\n if ((actualJson as any).composite && undefined !== (actualJson as any).composite.includeZero && undefined === (expectedJson as any).composite.includeZero) {\r\n expect((actualJson as any).composite.includeZero).to.equal(true);\r\n delete (actualJson as any).composite.includeZero;\r\n }\r\n if ((actualJson as any).composite && undefined !== (actualJson as any).composite.spacer && undefined === (expectedJson as any).composite.spacer) {\r\n expect((actualJson as any).composite.spacer).to.equal(\" \");\r\n delete (actualJson as any).composite.spacer;\r\n }\r\n if (undefined !== (actualJson as any).decimalSeparator && undefined === (expectedJson as any).decimalSeparator) {\r\n expect((actualJson as any).decimalSeparator).to.equal(\".\");\r\n delete (actualJson as any).decimalSeparator;\r\n }\r\n if (undefined !== (actualJson as any).roundFactor && undefined === (expectedJson as any).roundFactor) {\r\n expect((actualJson as any).roundFactor).to.equal(0);\r\n delete (actualJson as any).roundFactor;\r\n }\r\n if (undefined !== (actualJson as any).showSignOption && undefined === (expectedJson as any).showSignOption) {\r\n expect((actualJson as any).showSignOption).to.equal(\"OnlyNegative\");\r\n delete (actualJson as any).showSignOption;\r\n }\r\n if (undefined !== (actualJson as any).thousandSeparator && undefined === (expectedJson as any).thousandSeparator) {\r\n expect((actualJson as any).thousandSeparator).to.equal(\",\");\r\n delete (actualJson as any).thousandSeparator;\r\n }\r\n if (undefined !== (actualJson as any).uomSeparator && undefined === (expectedJson as any).uomSeparator) {\r\n expect((actualJson as any).uomSeparator).to.equal(\" \");\r\n delete (actualJson as any).uomSeparator;\r\n }\r\n if (undefined !== (actualJson as any).spacer && undefined === (expectedJson as any).spacer) {\r\n expect((actualJson as any).spacer).to.equal(\" \");\r\n delete (actualJson as any).spacer;\r\n }\r\n if (undefined !== (actualJson as any).formatTraits) {\r\n (actualJson as any).formatTraits = (actualJson as any).formatTraits.map((trait: string) => {\r\n return trait.charAt(0).toUpperCase() + trait.slice(1);\r\n });\r\n }\r\n }\r\n\r\n expect(actualJson).to.deep.equalInAnyOrder(expectedJson);\r\n }\r\n\r\n async function createTestContext() {\r\n const testEnv = await TestContext.create();\r\n return testEnv as TestContext<TestSchemaLocater>;\r\n }\r\n\r\n it(\"Schema query, props parsed successfully\", async function () {\r\n const testSchemaKey = new SchemaKey(\"SchemaTest\", 1, 0, 0);\r\n await using env = await createTestContext();\r\n\r\n const expectedSchema = await env.importAssetSchema(testSchemaKey);\r\n const actualSchemaProps = await env.schemaLocater.getSchemaJson(testSchemaKey, env.schemaContext);\r\n expect(actualSchemaProps).to.not.be.undefined;\r\n\r\n const actualSchema = await Schema.fromJson(actualSchemaProps!, env.schemaContext);\r\n expect(actualSchema.toJSON()).to.deep.equal(expectedSchema?.toJSON());\r\n });\r\n\r\n it(\"Property query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"PropertyTest\", 1, 0, 0);\r\n await using env = await createTestContext();\r\n\r\n const schema = await env.importAssetSchema(testKey);\r\n const classPropsObjects = await env.schemaLocater.getEntities(testKey.name, env.schemaContext);\r\n const entityOneProps = findItem(\"EntityOne\", classPropsObjects);\r\n const entityTwoProps = findItem(\"EntityTwo\", classPropsObjects);\r\n const expectedEntityOne = await schema.getEntityClass(\"EntityOne\");\r\n const expectedEntityTwo = await schema.getEntityClass(\"EntityTwo\");\r\n\r\n const validateProperty = (propertyName: string, actualItem = entityOneProps, expectedItem = expectedEntityOne) => {\r\n const actualProperty = findProperty(propertyName, actualItem.properties!);\r\n const expectedProperty = expectedItem?.getPropertySync(propertyName);\r\n // if maxOccurs is the maximum int value in the context Schema,\r\n // the property from the DB will not have a value\r\n if ((expectedProperty as any).maxOccurs === 2147483647) {\r\n expect((actualProperty as any).maxOccurs).to.be.undefined;\r\n // set so comparison will pass\r\n (actualProperty as any).maxOccurs = 2147483647;\r\n }\r\n\r\n expect(actualProperty).to.deep.equal(expectedProperty?.toJSON());\r\n };\r\n\r\n // All but one testable property is in EntityOne\r\n for (const property of await expectedEntityOne!.getProperties(true)) {\r\n validateProperty(property.name);\r\n }\r\n // Backward direction Navigation property is in EntityTwo\r\n validateProperty(\"EntityTwoParent\", entityTwoProps, expectedEntityTwo);\r\n });\r\n\r\n it(\"Entity query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"EntityTest\", 1, 0, 0);\r\n await using env = await createTestContext();\r\n\r\n const schema = await env.importAssetSchema(testKey);\r\n const classPropsObjects = await env.schemaLocater.getEntities(testKey.name, env.schemaContext);\r\n expect(classPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"EntityModifierNone\", classPropsObjects, schema);\r\n validateItem(\"EntityModifierAbstract\", classPropsObjects, schema);\r\n validateItem(\"EntityModifierSealed\", classPropsObjects, schema);\r\n });\r\n\r\n it(\"Struct query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"StructTest\", 1, 0, 0);\r\n await using env = await createTestContext();\r\n\r\n const schema = await env.importAssetSchema(testKey);\r\n const classPropsObjects = await env.schemaLocater.getStructs(testKey.name, env.schemaContext);\r\n expect(classPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"StructModifierNone\", classPropsObjects, schema);\r\n validateItem(\"StructModifierAbstract\", classPropsObjects, schema);\r\n validateItem(\"StructModifierSealed\", classPropsObjects, schema);\r\n });\r\n\r\n it(\"Mixin query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"MixinTest\", 1, 0, 0);\r\n await using env = await createTestContext();\r\n\r\n const schema = await env.importAssetSchema(testKey);\r\n const classPropsObjects = await env.schemaLocater.getMixins(testKey.name, env.schemaContext);\r\n expect(classPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"IBaseMixin\", classPropsObjects, schema);\r\n validateItem(\"ITestMixin\", classPropsObjects, schema);\r\n });\r\n\r\n it(\"Relationship query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"RelationshipTest\", 1, 0, 0);\r\n await using env = await createTestContext();\r\n\r\n const schema = await env.importAssetSchema(testKey);\r\n const classPropsObjects = await env.schemaLocater.getRelationships(testKey.name, env.schemaContext);\r\n expect(classPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"OwnerOwnsVehicles\", classPropsObjects, schema);\r\n validateItem(\"OwnerOwnsCars\", classPropsObjects, schema);\r\n validateItem(\"OwnerOwnsAmericanCars\", classPropsObjects, schema);\r\n validateItem(\"PhysicalModelBreaksDownCarElement\", classPropsObjects, schema);\r\n });\r\n\r\n it(\"CustomAttributeClass query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"CustomAttributeClassTest\", 1, 0, 0);\r\n await using env = await createTestContext();\r\n\r\n const schema = await env.importAssetSchema(testKey);\r\n const classPropsObjects = await env.schemaLocater.getCustomAttributeClasses(testKey.name, env.schemaContext);\r\n expect(classPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"CustomAttributeModifierNone\", classPropsObjects, schema);\r\n validateItem(\"CustomAttributeModifierSealed\", classPropsObjects, schema);\r\n validateItem(\"CustomAttributeModifierAbstract\", classPropsObjects, schema);\r\n });\r\n\r\n it(\"KindOfQuantity query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"KindOfQuantityTest\", 1, 0, 0);\r\n await using env = await createTestContext();\r\n\r\n const schema = await env.importAssetSchema(testKey);\r\n const itemPropsObjects = await env.schemaLocater.getKindOfQuantities(testKey.name, env.schemaContext);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"ACCELERATION\", itemPropsObjects, schema);\r\n validateItem(\"ANGLE\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"PropertyCategory query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"PropertyCategoryTest\", 1, 0, 0);\r\n await using env = await createTestContext();\r\n\r\n const schema = await env.importAssetSchema(testKey);\r\n const itemPropsObjects = await env.schemaLocater.getPropertyCategories(testKey.name, env.schemaContext);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"PropertyCategory1\", itemPropsObjects, schema);\r\n validateItem(\"PropertyCategory2\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"Enumeration query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"EnumerationTest\", 1, 0, 0);\r\n await using env = await createTestContext();\r\n\r\n const schema = await env.importAssetSchema(testKey);\r\n const itemPropsObjects = await env.schemaLocater.getEnumerations(testKey.name, env.schemaContext);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"IntEnumeration\", itemPropsObjects, schema);\r\n validateItem(\"StringEnumeration\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"Unit query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"UnitTest\", 1, 0, 0);\r\n await using env = await createTestContext();\r\n\r\n const schema = await env.importAssetSchema(testKey);\r\n const itemPropsObjects = await env.schemaLocater.getUnits(testKey.name, env.schemaContext);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"LITRE\", itemPropsObjects, schema);\r\n validateItem(\"GALLON\", itemPropsObjects, schema);\r\n validateItem(\"ACRE\", itemPropsObjects, schema);\r\n validateItem(\"FAHRENHEIT\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"InvertedUnit query, props parsed successfully\", async function () {\r\n const testKey = new SchemaKey(\"InvertedUnitTest\", 1, 0, 0);\r\n await using env = await createTestContext();\r\n\r\n const schema = await env.importAssetSchema(testKey);\r\n const itemPropsObjects = await env.schemaLocater.getInvertedUnits(testKey.name, env.schemaContext);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"FT_HORIZONTAL_PER_FT_VERTICAL\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"UnitSystem query, props parsed successfully\", async function () {\r\n // There's a UnitSystem in there.\r\n const testKey = new SchemaKey(\"InvertedUnitTest\", 1, 0, 0);\r\n await using env = await createTestContext();\r\n\r\n const schema = await env.importAssetSchema(testKey);\r\n const itemPropsObjects = await env.schemaLocater.getUnitSystems(testKey.name, env.schemaContext);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"USCUSTOM\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"Constant query, props parsed successfully\", async function () {\r\n // There's a UnitSystem in there.\r\n const testKey = new SchemaKey(\"ConstantTest\", 1, 0, 0);\r\n await using env = await createTestContext();\r\n\r\n const schema = await env.importAssetSchema(testKey);\r\n const itemPropsObjects = await env.schemaLocater.getConstants(testKey.name, env.schemaContext);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"KILO\", itemPropsObjects, schema);\r\n validateItem(\"HALF_PI\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"Phenomenon query, props parsed successfully\", async function () {\r\n // There's a Phenomenon in there.\r\n const testKey = new SchemaKey(\"ConstantTest\", 1, 0, 0);\r\n await using env = await createTestContext();\r\n\r\n const schema = await env.importAssetSchema(testKey);\r\n const itemPropsObjects = await env.schemaLocater.getPhenomenon(testKey.name, env.schemaContext);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n validateItem(\"NUMBER\", itemPropsObjects, schema);\r\n validateItem(\"LENGTH_RATIO\", itemPropsObjects, schema);\r\n });\r\n\r\n it(\"Format Schema parses successfully\", async function () {\r\n // Using installed Formats schema\r\n const testKey = new SchemaKey(\"Formats\", 1, 0, 0);\r\n await using env = await createTestContext();\r\n\r\n const schema = await env.importAssetSchema(testKey);\r\n const itemPropsObjects = await env.schemaLocater.getFormats(testKey.name, env.schemaContext);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n for (const props of itemPropsObjects) {\r\n validateItem(props.name!, itemPropsObjects, schema);\r\n }\r\n });\r\n\r\n it(\"Comprehensive Format parses successfully\", async function () {\r\n const testKey = new SchemaKey(\"FormatTest\", 1, 0, 0);\r\n await using env = await createTestContext();\r\n\r\n const schema = await env.importAssetSchema(testKey);\r\n const itemPropsObjects = await env.schemaLocater.getFormats(testKey.name, env.schemaContext);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n for (const props of itemPropsObjects) {\r\n validateItem(props.name!, itemPropsObjects, schema);\r\n }\r\n });\r\n\r\n it(\"CustomAttribute instances parse successfully\", async function () {\r\n const testKey = new SchemaKey(\"CustomAttributeInstanceTest\", 1, 0, 0);\r\n await using env = await createTestContext();\r\n\r\n const schema = await env.importAssetSchema(testKey);\r\n const itemPropsObjects = await env.schemaLocater.getStructs(testKey.name, env.schemaContext);\r\n expect(itemPropsObjects.length).to.be.greaterThan(0);\r\n\r\n for (const props of itemPropsObjects) {\r\n validateItem(props.name!, itemPropsObjects, schema);\r\n }\r\n });\r\n});"]}
|