@fluid-experimental/property-properties 2.0.0-internal.3.0.2 → 2.0.0-internal.3.2.0
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/README.md +1 -0
- package/dist/containerSerializer.d.ts.map +1 -1
- package/dist/containerSerializer.js +5 -5
- package/dist/containerSerializer.js.map +1 -1
- package/dist/enableValidations.js.map +1 -1
- package/dist/index.d.ts +19 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/properties/abstractStaticCollectionProperty.d.ts +10 -10
- package/dist/properties/abstractStaticCollectionProperty.d.ts.map +1 -1
- package/dist/properties/abstractStaticCollectionProperty.js +70 -53
- package/dist/properties/abstractStaticCollectionProperty.js.map +1 -1
- package/dist/properties/arrayProperty.d.ts.map +1 -1
- package/dist/properties/arrayProperty.js +152 -103
- package/dist/properties/arrayProperty.js.map +1 -1
- package/dist/properties/baseProperty.d.ts +4 -4
- package/dist/properties/baseProperty.d.ts.map +1 -1
- package/dist/properties/baseProperty.js +69 -47
- package/dist/properties/baseProperty.js.map +1 -1
- package/dist/properties/boolProperty.d.ts.map +1 -1
- package/dist/properties/boolProperty.js +3 -3
- package/dist/properties/boolProperty.js.map +1 -1
- package/dist/properties/containerProperty.d.ts +8 -8
- package/dist/properties/containerProperty.d.ts.map +1 -1
- package/dist/properties/containerProperty.js +33 -26
- package/dist/properties/containerProperty.js.map +1 -1
- package/dist/properties/enumArrayProperty.d.ts.map +1 -1
- package/dist/properties/enumArrayProperty.js +14 -14
- package/dist/properties/enumArrayProperty.js.map +1 -1
- package/dist/properties/enumProperty.d.ts.map +1 -1
- package/dist/properties/enumProperty.js +17 -17
- package/dist/properties/enumProperty.js.map +1 -1
- package/dist/properties/floatProperties.js +4 -4
- package/dist/properties/floatProperties.js.map +1 -1
- package/dist/properties/index.d.ts +23 -23
- package/dist/properties/index.d.ts.map +1 -1
- package/dist/properties/index.js.map +1 -1
- package/dist/properties/indexedCollectionBaseProperty.d.ts.map +1 -1
- package/dist/properties/indexedCollectionBaseProperty.js +47 -37
- package/dist/properties/indexedCollectionBaseProperty.js.map +1 -1
- package/dist/properties/intProperties.d.ts.map +1 -1
- package/dist/properties/intProperties.js +10 -10
- package/dist/properties/intProperties.js.map +1 -1
- package/dist/properties/lazyLoadedProperties.js.map +1 -1
- package/dist/properties/mapProperty.d.ts.map +1 -1
- package/dist/properties/mapProperty.js +21 -17
- package/dist/properties/mapProperty.js.map +1 -1
- package/dist/properties/namedNodeProperty.d.ts.map +1 -1
- package/dist/properties/namedNodeProperty.js +3 -3
- package/dist/properties/namedNodeProperty.js.map +1 -1
- package/dist/properties/namedProperty.d.ts.map +1 -1
- package/dist/properties/namedProperty.js +7 -5
- package/dist/properties/namedProperty.js.map +1 -1
- package/dist/properties/nodeProperty.d.ts.map +1 -1
- package/dist/properties/nodeProperty.js +5 -3
- package/dist/properties/nodeProperty.js.map +1 -1
- package/dist/properties/primitiveTypeCasts.d.ts.map +1 -1
- package/dist/properties/primitiveTypeCasts.js +9 -9
- package/dist/properties/primitiveTypeCasts.js.map +1 -1
- package/dist/properties/referenceArrayProperty.d.ts.map +1 -1
- package/dist/properties/referenceArrayProperty.js +31 -25
- package/dist/properties/referenceArrayProperty.js.map +1 -1
- package/dist/properties/referenceMapProperty.d.ts.map +1 -1
- package/dist/properties/referenceMapProperty.js +18 -18
- package/dist/properties/referenceMapProperty.js.map +1 -1
- package/dist/properties/referenceProperty.d.ts.map +1 -1
- package/dist/properties/referenceProperty.js +33 -29
- package/dist/properties/referenceProperty.js.map +1 -1
- package/dist/properties/setProperty.d.ts.map +1 -1
- package/dist/properties/setProperty.js +31 -29
- package/dist/properties/setProperty.js.map +1 -1
- package/dist/properties/stringProperty.d.ts.map +1 -1
- package/dist/properties/stringProperty.js +56 -40
- package/dist/properties/stringProperty.js.map +1 -1
- package/dist/properties/uintProperties.js +5 -5
- package/dist/properties/uintProperties.js.map +1 -1
- package/dist/properties/valueArrayProperty.d.ts +1 -1
- package/dist/properties/valueArrayProperty.d.ts.map +1 -1
- package/dist/properties/valueArrayProperty.js +30 -29
- package/dist/properties/valueArrayProperty.js.map +1 -1
- package/dist/properties/valueMapProperty.d.ts.map +1 -1
- package/dist/properties/valueMapProperty.js +31 -29
- package/dist/properties/valueMapProperty.js.map +1 -1
- package/dist/properties/valueProperty.d.ts.map +1 -1
- package/dist/properties/valueProperty.js +11 -9
- package/dist/properties/valueProperty.js.map +1 -1
- package/dist/propertyFactory.d.ts.map +1 -1
- package/dist/propertyFactory.js +309 -252
- package/dist/propertyFactory.js.map +1 -1
- package/dist/propertyTemplate.d.ts +17 -17
- package/dist/propertyTemplate.d.ts.map +1 -1
- package/dist/propertyTemplate.js +64 -45
- package/dist/propertyTemplate.js.map +1 -1
- package/dist/propertyTemplateWrapper.d.ts.map +1 -1
- package/dist/propertyTemplateWrapper.js +40 -25
- package/dist/propertyTemplateWrapper.js.map +1 -1
- package/dist/propertyUtils.d.ts.map +1 -1
- package/dist/propertyUtils.js.map +1 -1
- package/dist/test/properties/arrayProperty.spec.js +566 -490
- package/dist/test/properties/arrayProperty.spec.js.map +1 -1
- package/dist/test/properties/baseProperty.spec.js +293 -280
- package/dist/test/properties/baseProperty.spec.js.map +1 -1
- package/dist/test/properties/containerProperty.spec.js +100 -94
- package/dist/test/properties/containerProperty.spec.js.map +1 -1
- package/dist/test/properties/customArrayProperty.spec.js +174 -147
- package/dist/test/properties/customArrayProperty.spec.js.map +1 -1
- package/dist/test/properties/enumArrayProperty.spec.js +67 -63
- package/dist/test/properties/enumArrayProperty.spec.js.map +1 -1
- package/dist/test/properties/enumProperty.spec.js +115 -97
- package/dist/test/properties/enumProperty.spec.js.map +1 -1
- package/dist/test/properties/float32.spec.js +5 -5
- package/dist/test/properties/float32.spec.js.map +1 -1
- package/dist/test/properties/int64ArrayProperty.spec.js +157 -93
- package/dist/test/properties/int64ArrayProperty.spec.js.map +1 -1
- package/dist/test/properties/int64MapProperty.spec.js +185 -166
- package/dist/test/properties/int64MapProperty.spec.js.map +1 -1
- package/dist/test/properties/int64Property.spec.js +109 -109
- package/dist/test/properties/int64Property.spec.js.map +1 -1
- package/dist/test/properties/isLeafNode.spec.js +75 -76
- package/dist/test/properties/isLeafNode.spec.js.map +1 -1
- package/dist/test/properties/mapProperty.spec.js +571 -531
- package/dist/test/properties/mapProperty.spec.js.map +1 -1
- package/dist/test/properties/namedNodeProperty.spec.js +31 -31
- package/dist/test/properties/namedNodeProperty.spec.js.map +1 -1
- package/dist/test/properties/nodeProperty.spec.js +805 -795
- package/dist/test/properties/nodeProperty.spec.js.map +1 -1
- package/dist/test/properties/referenceProperty.spec.js +729 -679
- package/dist/test/properties/referenceProperty.spec.js.map +1 -1
- package/dist/test/properties/relationshipProperty.spec.js +16 -16
- package/dist/test/properties/relationshipProperty.spec.js.map +1 -1
- package/dist/test/properties/setProperty.spec.js +288 -227
- package/dist/test/properties/setProperty.spec.js.map +1 -1
- package/dist/test/properties/stringProperty.spec.js +326 -318
- package/dist/test/properties/stringProperty.spec.js.map +1 -1
- package/dist/test/properties/uint64Property.spec.js +46 -36
- package/dist/test/properties/uint64Property.spec.js.map +1 -1
- package/dist/test/properties/valueMapProperty.spec.js +259 -246
- package/dist/test/properties/valueMapProperty.spec.js.map +1 -1
- package/dist/test/properties/valueProperty.spec.js +49 -43
- package/dist/test/properties/valueProperty.spec.js.map +1 -1
- package/dist/test/propertyFactory.spec.js +2038 -1631
- package/dist/test/propertyFactory.spec.js.map +1 -1
- package/dist/test/propertyTemplateWrapper.spec.js +72 -102
- package/dist/test/propertyTemplateWrapper.spec.js.map +1 -1
- package/dist/test/propertyUtils.spec.js +22 -21
- package/dist/test/propertyUtils.spec.js.map +1 -1
- package/dist/test/reversibleChangeset.spec.js +857 -703
- package/dist/test/reversibleChangeset.spec.js.map +1 -1
- package/dist/test/setup.js +5 -5
- package/dist/test/setup.js.map +1 -1
- package/dist/test/tsconfig.tsbuildinfo +1 -1
- package/dist/test/utils.spec.js +1334 -1144
- package/dist/test/utils.spec.js.map +1 -1
- package/dist/test/validation/badMissingSemverInTypeid.js +20 -20
- package/dist/test/validation/badMissingSemverInTypeid.js.map +1 -1
- package/dist/test/validation/badPrimitiveTypeid.js +12 -12
- package/dist/test/validation/badPrimitiveTypeid.js.map +1 -1
- package/dist/test/validation/goodColorId.js +91 -91
- package/dist/test/validation/goodColorId.js.map +1 -1
- package/dist/test/validation/goodColorPalette.js +4 -4
- package/dist/test/validation/goodColorPalette.js.map +1 -1
- package/dist/test/validation/goodPointId.js +20 -20
- package/dist/test/validation/goodPointId.js.map +1 -1
- package/dist/test/validation/reversibleChangeSetTestData.js +23841 -2
- package/dist/test/validation/reversibleChangeSetTestData.js.map +1 -1
- package/lib/containerSerializer.d.ts.map +1 -1
- package/lib/containerSerializer.js +5 -5
- package/lib/containerSerializer.js.map +1 -1
- package/lib/enableValidations.js.map +1 -1
- package/lib/index.d.ts +19 -19
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +19 -19
- package/lib/index.js.map +1 -1
- package/lib/properties/abstractStaticCollectionProperty.d.ts +10 -10
- package/lib/properties/abstractStaticCollectionProperty.d.ts.map +1 -1
- package/lib/properties/abstractStaticCollectionProperty.js +70 -53
- package/lib/properties/abstractStaticCollectionProperty.js.map +1 -1
- package/lib/properties/arrayProperty.d.ts.map +1 -1
- package/lib/properties/arrayProperty.js +152 -103
- package/lib/properties/arrayProperty.js.map +1 -1
- package/lib/properties/baseProperty.d.ts +4 -4
- package/lib/properties/baseProperty.d.ts.map +1 -1
- package/lib/properties/baseProperty.js +73 -51
- package/lib/properties/baseProperty.js.map +1 -1
- package/lib/properties/boolProperty.d.ts.map +1 -1
- package/lib/properties/boolProperty.js +3 -3
- package/lib/properties/boolProperty.js.map +1 -1
- package/lib/properties/containerProperty.d.ts +8 -8
- package/lib/properties/containerProperty.d.ts.map +1 -1
- package/lib/properties/containerProperty.js +33 -26
- package/lib/properties/containerProperty.js.map +1 -1
- package/lib/properties/enumArrayProperty.d.ts.map +1 -1
- package/lib/properties/enumArrayProperty.js +14 -14
- package/lib/properties/enumArrayProperty.js.map +1 -1
- package/lib/properties/enumProperty.d.ts.map +1 -1
- package/lib/properties/enumProperty.js +17 -17
- package/lib/properties/enumProperty.js.map +1 -1
- package/lib/properties/floatProperties.js +4 -4
- package/lib/properties/floatProperties.js.map +1 -1
- package/lib/properties/index.d.ts +23 -23
- package/lib/properties/index.d.ts.map +1 -1
- package/lib/properties/index.js +23 -23
- package/lib/properties/index.js.map +1 -1
- package/lib/properties/indexedCollectionBaseProperty.d.ts.map +1 -1
- package/lib/properties/indexedCollectionBaseProperty.js +47 -37
- package/lib/properties/indexedCollectionBaseProperty.js.map +1 -1
- package/lib/properties/intProperties.d.ts.map +1 -1
- package/lib/properties/intProperties.js +10 -10
- package/lib/properties/intProperties.js.map +1 -1
- package/lib/properties/lazyLoadedProperties.js.map +1 -1
- package/lib/properties/mapProperty.d.ts.map +1 -1
- package/lib/properties/mapProperty.js +21 -17
- package/lib/properties/mapProperty.js.map +1 -1
- package/lib/properties/namedNodeProperty.d.ts.map +1 -1
- package/lib/properties/namedNodeProperty.js +3 -3
- package/lib/properties/namedNodeProperty.js.map +1 -1
- package/lib/properties/namedProperty.d.ts.map +1 -1
- package/lib/properties/namedProperty.js +7 -5
- package/lib/properties/namedProperty.js.map +1 -1
- package/lib/properties/nodeProperty.d.ts.map +1 -1
- package/lib/properties/nodeProperty.js +5 -3
- package/lib/properties/nodeProperty.js.map +1 -1
- package/lib/properties/primitiveTypeCasts.d.ts.map +1 -1
- package/lib/properties/primitiveTypeCasts.js +9 -9
- package/lib/properties/primitiveTypeCasts.js.map +1 -1
- package/lib/properties/referenceArrayProperty.d.ts.map +1 -1
- package/lib/properties/referenceArrayProperty.js +31 -25
- package/lib/properties/referenceArrayProperty.js.map +1 -1
- package/lib/properties/referenceMapProperty.d.ts.map +1 -1
- package/lib/properties/referenceMapProperty.js +18 -18
- package/lib/properties/referenceMapProperty.js.map +1 -1
- package/lib/properties/referenceProperty.d.ts.map +1 -1
- package/lib/properties/referenceProperty.js +33 -29
- package/lib/properties/referenceProperty.js.map +1 -1
- package/lib/properties/setProperty.d.ts.map +1 -1
- package/lib/properties/setProperty.js +31 -29
- package/lib/properties/setProperty.js.map +1 -1
- package/lib/properties/stringProperty.d.ts.map +1 -1
- package/lib/properties/stringProperty.js +56 -40
- package/lib/properties/stringProperty.js.map +1 -1
- package/lib/properties/uintProperties.js +5 -5
- package/lib/properties/uintProperties.js.map +1 -1
- package/lib/properties/valueArrayProperty.d.ts +1 -1
- package/lib/properties/valueArrayProperty.d.ts.map +1 -1
- package/lib/properties/valueArrayProperty.js +30 -29
- package/lib/properties/valueArrayProperty.js.map +1 -1
- package/lib/properties/valueMapProperty.d.ts.map +1 -1
- package/lib/properties/valueMapProperty.js +31 -29
- package/lib/properties/valueMapProperty.js.map +1 -1
- package/lib/properties/valueProperty.d.ts.map +1 -1
- package/lib/properties/valueProperty.js +11 -9
- package/lib/properties/valueProperty.js.map +1 -1
- package/lib/propertyFactory.d.ts.map +1 -1
- package/lib/propertyFactory.js +309 -252
- package/lib/propertyFactory.js.map +1 -1
- package/lib/propertyTemplate.d.ts +17 -17
- package/lib/propertyTemplate.d.ts.map +1 -1
- package/lib/propertyTemplate.js +64 -45
- package/lib/propertyTemplate.js.map +1 -1
- package/lib/propertyTemplateWrapper.d.ts.map +1 -1
- package/lib/propertyTemplateWrapper.js +40 -25
- package/lib/propertyTemplateWrapper.js.map +1 -1
- package/lib/propertyUtils.d.ts.map +1 -1
- package/lib/propertyUtils.js.map +1 -1
- package/package.json +28 -28
- package/src/index.d.ts +2750 -2681
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customArrayProperty.spec.js","sourceRoot":"","sources":["../../../src/test/properties/customArrayProperty.spec.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AAEH,IAAI,eAAe,EAAE,YAAY,EAAE,eAAe,EAAE,qBAAqB,EAAE,KAA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AC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview In this file, we will test the functions of a BaseProperty object\n * described in /src/properties/baseProperty.js\n */\n\nvar PropertyFactory, BaseProperty, OurTestTemplate, OurArrayTestTemplate2, error,\n DeterministicRandomGenerator, _, ChangeSet, deepCopy;\n\nvar possibleChanges = {\n 0: 'insert',\n 1: 'modify',\n 2: 'remove',\n 3: 'set',\n};\n\nvar createTestArrayProp = function() {\n return PropertyFactory.create('autodesk.tests:CustomArrayTestID-1.0.0')._properties.MyCustomArray;\n};\n\nvar createRandomProperty = function() {\n var node1 = PropertyFactory.create('autodesk.tests:TestID-1.0.0');\n node1._properties.MyFloatProp.value = Math.random() * 100;\n node1._properties.MyIntProp.value = Math.random() * 100;\n return node1;\n};\n\ndescribe('CustomArrayProperty', function() {\n /**\n * Get all the objects we need in this test here.\n */\n before(function() {\n PropertyFactory = require('../..').PropertyFactory;\n BaseProperty = require('../..').BaseProperty;\n DeterministicRandomGenerator = require('@fluid-experimental/property-common').DeterministicRandomGenerator;\n ChangeSet = require('@fluid-experimental/property-changeset').ChangeSet;\n _ = require('lodash');\n deepCopy = _.cloneDeep;\n\n OurTestTemplate = {\n typeid: 'autodesk.tests:TestID-1.0.0',\n properties: [{\n id: 'MyFloatProp', typeid: 'Float32',\n }, {\n id: 'MyIntProp', typeid: 'Int32',\n },\n ],\n };\n PropertyFactory._reregister(OurTestTemplate);\n\n OurArrayTestTemplate2 = {\n typeid: 'autodesk.tests:CustomArrayTestID-1.0.0',\n properties: [\n { id: 'MyCustomArray', typeid: 'autodesk.tests:TestID-1.0.0', context: 'array' },\n { id: 'SomeOtherProperty', typeid: 'String' },\n ],\n };\n PropertyFactory._reregister(OurArrayTestTemplate2);\n\n var NamedPropertyWithStringTemplate = {\n typeid: 'autodesk.tests:Array.NamedPropertyWithString-1.0.0',\n inherits: 'NamedProperty',\n properties: [{\n id: 'stringProperty', typeid: 'String',\n }],\n };\n PropertyFactory._reregister(NamedPropertyWithStringTemplate);\n });\n\n describe('Checking the generalized squash function of a CustomPropertyArrayProperty', function() {\n it('[random number test] should be squashed to the expected changeset', function(done) {\n try {\n var arrayProp = createTestArrayProp();\n\n var currentArrayLength = 0;\n\n arrayProp.insertRange(0, [createRandomProperty(), createRandomProperty(),\n createRandomProperty(), createRandomProperty()]);\n arrayProp.cleanDirty();\n\n // Create a copy of this state\n var arrayPropCopy = createTestArrayProp();\n arrayPropCopy.deserialize(arrayProp.serialize({ 'dirtyOnly': false }));\n arrayPropCopy.cleanDirty();\n\n for (var i = 0; i < 500; ++i) {\n currentArrayLength = arrayProp.length;\n var nextOpType = 'insert';\n var opOffset = 0;\n\n if (currentArrayLength > 0) {\n nextOpType = possibleChanges[Math.floor(Math.random() * 4)];\n opOffset = Math.min(Math.floor(Math.random() * currentArrayLength), currentArrayLength - 1);\n }\n var opLength = 1 + Math.min(Math.floor(Math.random() * (currentArrayLength - opOffset)),\n currentArrayLength - opOffset - 1);\n\n switch (nextOpType) {\n case 'remove': {\n arrayProp.removeRange(opOffset, opLength);\n break;\n }\n case 'insert': {\n arrayProp.insertRange(opOffset, [createRandomProperty()]);\n break;\n }\n case 'modify': {\n var childProperty = arrayProp.get(opOffset);\n childProperty._properties.MyFloatProp.value = Math.random() * 100;\n childProperty._properties.MyIntProp.value = Math.random() * 100;\n break;\n }\n case 'set': {\n arrayProp.set(opOffset, createRandomProperty());\n break;\n }\n // no default\n }\n\n var serializedDirtyChanges = arrayProp.serialize({\n 'dirtyOnly': true,\n 'includeRootTypeid': false,\n 'dirtinessType': BaseProperty.MODIFIED_STATE_FLAGS.DIRTY,\n });\n var arrayPropTest = createTestArrayProp();\n arrayPropTest.deserialize(arrayPropCopy.serialize({ 'dirtyOnly': false }));\n arrayPropTest.cleanDirty();\n arrayPropTest.applyChangeSet(serializedDirtyChanges);\n }\n } catch (e) {\n error = e;\n } finally {\n expect(error).to.equal(undefined);\n expect(arrayProp).to.not.equal(null);\n expect(arrayProp.serialize({ 'dirtyOnly': false })).to.deep.equal(\n arrayPropTest.serialize({ 'dirtyOnly': false }));\n done();\n }\n });\n });\n\n describe('Path resolution', function() {\n it('should work for array properties', function() {\n var arrayParent = PropertyFactory.create('autodesk.tests:CustomArrayTestID-1.0.0');\n var arrayProp = arrayParent._properties.MyCustomArray;\n\n // prepare initial state\n var entries = [];\n for (var i = 0; i < 10; i++) {\n var entry = PropertyFactory.create('autodesk.tests:TestID-1.0.0');\n entry._properties.MyIntProp.value = i;\n entries.push(entry);\n }\n\n arrayParent._properties.MyCustomArray.insertRange(0, entries);\n\n // Make sure that arrray access works\n expect(arrayParent.resolvePath('MyCustomArray[0]')._properties.MyIntProp.value).to.equal(0);\n expect(arrayProp.resolvePath('[2]')._properties.MyIntProp.value).to.equal(2);\n\n // Test out of bounds access\n expect(arrayParent.resolvePath('MyCustomArray[-1]')).to.be.undefined;\n expect(arrayParent.resolvePath('MyCustomArray[10]')).to.be.undefined;\n\n var myTestArrayProp = arrayProp.get(5);\n expect(myTestArrayProp.getAbsolutePath()).to.equal('/MyCustomArray[5]');\n expect(myTestArrayProp.getRelativePath(arrayProp)).to.equal('[5]');\n\n // Test exception on parsing error\n expect(function() { arrayParent.resolvePath('MyCustomArray[\"abcd\"]'); }).to.throw();\n\n // Test path resolution after insertion\n var newEntry = PropertyFactory.create('autodesk.tests:TestID-1.0.0');\n newEntry._properties.MyIntProp.value = -1;\n arrayParent._properties.MyCustomArray.insertRange(0, [newEntry]);\n expect(arrayParent.resolvePath('MyCustomArray[0]')._properties.MyIntProp.value).to.equal(-1);\n expect(myTestArrayProp.getAbsolutePath()).to.equal('/MyCustomArray[6]');\n\n // Test path resolution after setting\n // TODO: set currently broken\n var newEntry2 = PropertyFactory.create('autodesk.tests:TestID-1.0.0');\n newEntry2._properties.MyIntProp.value = -2;\n arrayParent._properties.MyCustomArray.set(0, newEntry2);\n expect(arrayParent.resolvePath('MyCustomArray[0]')._properties.MyIntProp.value).to.equal(-2);\n\n // Test path resolution after removal\n arrayParent._properties.MyCustomArray.removeRange(0, 1);\n expect(arrayParent.resolvePath('MyCustomArray[0]')._properties.MyIntProp.value).to.equal(0);\n expect(myTestArrayProp.getAbsolutePath()).to.equal('/MyCustomArray[5]');\n\n // Test path resolution after insertion via applyChangeSet\n arrayParent._properties.MyCustomArray.applyChangeSet({\n insert: [[0, [{\n typeid: 'autodesk.tests:TestID-1.0.0',\n Float32: {\n MyFloatProp: 16,\n },\n Int32: {\n MyIntProp: 17,\n },\n }, {\n typeid: 'autodesk.tests:TestID-1.0.0',\n Float32: {\n MyFloatProp: 18,\n },\n Int32: {\n MyIntProp: 19,\n },\n }]],\n ],\n });\n expect(arrayParent.resolvePath('MyCustomArray[0]')._properties.MyIntProp.value).to.equal(17);\n expect(myTestArrayProp.getAbsolutePath()).to.equal('/MyCustomArray[7]');\n\n var serialied = arrayParent._properties.MyCustomArray.serialize({ 'dirtyOnly': false });\n\n // Test path resolution after removal\n arrayParent._properties.MyCustomArray.applyChangeSet({\n remove: [[0, 1]],\n });\n expect(arrayParent.resolvePath('MyCustomArray[0]')._properties.MyIntProp.value).to.equal(19);\n expect(myTestArrayProp.getAbsolutePath()).to.equal('/MyCustomArray[6]');\n expect(arrayParent.resolvePath('MyCustomArray[11]')).to.be.undefined;\n\n // Test Path resolution after deserialize\n arrayParent._properties.MyCustomArray.deserialize(serialied);\n expect(arrayParent.resolvePath('MyCustomArray[0]')._properties.MyIntProp.value).to.equal(17);\n expect(arrayParent.resolvePath('MyCustomArray[11]')).not.to.be.undefined;\n\n arrayParent._properties.MyCustomArray.deserialize({});\n expect(arrayParent.resolvePath('MyCustomArray[0]')).to.be.undefined;\n expect(arrayParent.resolvePath('MyCustomArray[11]')).to.be.undefined;\n\n // Try multiple levels\n var leaf = PropertyFactory.create('NodeProperty');\n expect(leaf.resolvePath('/')).to.equal(leaf);\n var array1 = PropertyFactory.create('NodeProperty', 'array');\n array1.push(leaf);\n expect(leaf.resolvePath('/')).to.equal(array1);\n\n var array2 = PropertyFactory.create(undefined, 'array');\n array2.push(array1);\n expect(leaf.resolvePath('/')).to.equal(array2);\n\n var array3 = PropertyFactory.create(undefined, 'array');\n array3.push(array2);\n expect(leaf.resolvePath('/')).to.equal(array3);\n });\n });\n\n describe('Sized arrays', function() {\n // Test fix for an issue where custom array templates with non-zero sizes\n // resulted in the array initially containing objects without a parent.\n it('should work for custom array property templates with size specified', function() {\n var TestString = {\n typeid: 'autodesk.test:test.string-1.0.0',\n properties: [\n { id: 'data', typeid: 'String' },\n ],\n };\n\n var TestCustomArray = {\n typeid: 'autodesk.test:test.customarray-1.0.0',\n properties: [\n { id: 'data', typeid: 'autodesk.test:test.string-1.0.0', context: 'array', length: 3 },\n ],\n };\n PropertyFactory._reregister(TestString);\n PropertyFactory._reregister(TestCustomArray);\n\n var sizedArray = PropertyFactory.create('autodesk.test:test.customarray-1.0.0');\n // Prior to the fix to properly parent initial elements, clear() would result in an exception with\n // the message 'Trying to remove a property from an array that has not the array as parent.'\n var clearArrayFn = function() {\n sizedArray.resolvePath('data').clear();\n };\n expect(clearArrayFn).to.not.throw();\n });\n });\n\n describe('Commit', function() {\n /* it('should not appear in the changeset when committing a change on its sibling', function() {\n // TODO: This test cannot be implemented in Fluid\n let cm = new HFDM();\n let workspace = cm.createWorkspace();\n let checkoutView = workspace._getCheckoutView();\n let pset = PropertyFactory.create('autodesk.tests:CustomArrayTestID-1.0.0');\n\n return cm._createRepository({local: true}).then(function(params) {\n return cm._checkoutAttempt(params.branch.getUrn(), checkoutView);\n }).then(function() {\n checkoutView.getRoot().insert('pset', pset);\n return cm._commit(null, checkoutView);\n }).then(function(commitNode) {\n\n checkoutView.register('modified', function(cv, changeSet) {\n expect(changeSet).to.not.be.undefined;\n expect(\n changeSet.getSerializedChangeSet()\n .modify['autodesk.tests:CustomArrayTestID-1.0.0']['array<autodesk.tests:TestID-1.0.0>']\n ).to.not.exist;\n });\n checkoutView.getRoot().resolvePath('pset.SomeOtherProperty').setValue('foobar');\n return cm._commit(null, checkoutView);\n });\n }); */\n\n describe('Nested collections', function() {\n it('should support squashing of nested maps', function() {\n var nodeProp = PropertyFactory.create('NodeProperty');\n var arrayProp = PropertyFactory.create('array<BaseProperty>');\n var testMap = PropertyFactory.create('map<Bool>');\n\n nodeProp.insert('array', arrayProp);\n testMap.set('test', true);\n arrayProp.push(testMap);\n var CS1 = nodeProp.serialize({ 'dirtyOnly': false });\n\n nodeProp.cleanDirty();\n testMap.set('test', false);\n var CS2 = nodeProp.serialize({ 'dirtyOnly': true });\n\n var CS = new ChangeSet(CS1);\n CS.applyChangeSet(new ChangeSet(CS2));\n var arrayChanges = CS.getSerializedChangeSet().insert['array<>'].array;\n expect(arrayChanges.insert[0][1][0]).to.have.all.keys('insert', 'typeid');\n expect(arrayChanges.insert[0][1][0].insert['test']).to.equal(false);\n });\n\n it('should support basic rebasing of nested maps', function() {\n var nodeProp = PropertyFactory.create('NodeProperty');\n var arrayProp = PropertyFactory.create('array<BaseProperty>');\n var testMap = PropertyFactory.create('map<Bool>');\n\n nodeProp.insert('array', arrayProp);\n testMap.set('test', true);\n arrayProp.push(testMap);\n\n nodeProp.cleanDirty();\n testMap.set('test', false);\n var CS1 = nodeProp.serialize({ 'dirtyOnly': true });\n var CS2 = deepCopy(CS1);\n\n var CS = new ChangeSet(CS1);\n var conflicts = [];\n CS._rebaseChangeSet(CS2, conflicts);\n expect(conflicts.length).to.equal(1);\n expect(conflicts[0].type).to.be.equal(ChangeSet.ConflictType.COLLIDING_SET);\n expect(conflicts[0].path).to.be.equal('array[0][test]');\n });\n\n it('should be deserializable', function() {\n var testArray = PropertyFactory.create('array<>');\n testArray.push(PropertyFactory.create('array<>'));\n var serialized = testArray.serialize({ 'dirtyOnly': false });\n\n var testArray2 = PropertyFactory.create('array<>');\n testArray2.deserialize(serialized);\n expect(testArray2.serialize({ 'dirtyOnly': false })).to.deep.equal(testArray.serialize({ 'dirtyOnly': false }));\n });\n });\n\n describe('deserialize', function() {\n // Returns a sequence of random NamedProperties\n var createRandomEntries = function(in_count) {\n return _.map(_.range(in_count), function() {\n var property = PropertyFactory.create('autodesk.tests:Array.NamedPropertyWithString-1.0.0');\n property._properties.stringProperty.value = 'initial';\n return property;\n });\n };\n\n // Manually copy the array (we don't use deserialize for the copy\n // here since we want to test that function below and don't want\n // an error here to affect the comparison)\n var manuallyCopyArray = function(arrayProperty) {\n var copiedArray = PropertyFactory.create('autodesk.tests:Array.NamedPropertyWithString-1.0.0',\n 'array');\n var copiedEntries = _.map(arrayProperty.getEntriesReadOnly(), function(entry) {\n // Create a named property with the same guid\n var newNode = PropertyFactory.create('autodesk.tests:Array.NamedPropertyWithString-1.0.0');\n newNode._properties.guid.value = entry.getGuid();\n newNode._properties.stringProperty.value = entry._properties.stringProperty.value;\n return newNode;\n });\n copiedArray.insertRange(0, copiedEntries);\n\n return copiedArray;\n };\n\n // Prepare the initial state\n var initializeArrayForComparison = function(in_count) {\n // Create an array with named properties\n var arrayProperty = PropertyFactory.create('NamedProperty', 'array');\n var entries = createRandomEntries(in_count);\n arrayProperty.insertRange(0, entries);\n\n var copiedArray = manuallyCopyArray(arrayProperty);\n\n return {\n original: arrayProperty,\n copy: copiedArray,\n };\n };\n\n // Counts the changes in the array\n var countChanges = function(in_testArray) {\n // First create a copy of the copy to check afterwards whether the changeset is correct\n var copy2 = manuallyCopyArray(in_testArray.copy);\n\n // deserialize the changes into the copied array property\n in_testArray.copy.cleanDirty();\n var deserialized = in_testArray.copy.deserialize(in_testArray.original.serialize({ 'dirtyOnly': false }));\n\n expect(in_testArray.copy.serialize({ 'dirtyOnly': false })).to.deep.equal(\n in_testArray.original.serialize({ 'dirtyOnly': false }));\n expect(deserialized).to.deep.equal(in_testArray.copy.serialize({ 'dirtyOnly': true }));\n\n // Make sure the returned ChangeSet is correct\n copy2.applyChangeSet(deserialized);\n expect(copy2.serialize({ 'dirtyOnly': false })).to.deep.equal(\n in_testArray.original.serialize({ 'dirtyOnly': false }));\n\n // Count insert, modify and remove operations\n var insertedCount = _.reduce(deserialized.insert, function(last, insertedRange) {\n return last + insertedRange[1].length;\n }, 0);\n var removedCount = _.reduce(deserialized.remove, function(last, removedRange) {\n return last + removedRange[1];\n }, 0);\n var modifiedCount = _.reduce(deserialized.modify, function(last, modifiedRange) {\n return last + modifiedRange[1].length;\n }, 0);\n\n return {\n insertedCount: insertedCount,\n removedCount: removedCount,\n modifiedCount: modifiedCount,\n totalCount: insertedCount + removedCount + modifiedCount,\n insertedRanges: deserialized.insert ? deserialized.insert.length : 0,\n removedRanges: deserialized.remove ? deserialized.remove.length : 0,\n modifiedRanges: deserialized.modify ? deserialized.modify.length : 0,\n };\n };\n\n it('should report an empty ChangeSet for deserialize without changes', function() {\n var testArray = initializeArrayForComparison(50);\n\n // Check the returned ChangeSet\n var changed = countChanges(testArray);\n expect(changed).to.deep.equal({\n insertedCount: 0,\n removedCount: 0,\n modifiedCount: 0,\n totalCount: 0,\n insertedRanges: 0,\n removedRanges: 0,\n modifiedRanges: 0,\n });\n });\n\n it('should report an empty ChangeSet for a length 0 array', function() {\n var testArray = initializeArrayForComparison(0);\n\n // Check the returned ChangeSet\n var changed = countChanges(testArray);\n expect(changed).to.deep.equal({\n insertedCount: 0,\n removedCount: 0,\n modifiedCount: 0,\n totalCount: 0,\n insertedRanges: 0,\n removedRanges: 0,\n modifiedRanges: 0,\n });\n });\n\n it('should report a compact ChangeSet for simple move in an array of NamedProperties', function() {\n var testArray = initializeArrayForComparison(50);\n\n // Move a segment in the array\n var entries = [\n testArray.original.get(45),\n testArray.original.get(46),\n testArray.original.get(47),\n ];\n testArray.original.removeRange(45, 3);\n testArray.original.insertRange(3, entries);\n\n // Check the returned ChangeSet\n var changed = countChanges(testArray);\n expect(changed).to.deep.equal({\n insertedCount: 3,\n removedCount: 3,\n modifiedCount: 0,\n totalCount: 6,\n insertedRanges: 1,\n removedRanges: 1,\n modifiedRanges: 0,\n });\n });\n\n it('should report a compact ChangeSet for simple inserts in an array of NamedProperties', function() {\n var testArray = initializeArrayForComparison(50);\n\n testArray.original.insertRange(0, createRandomEntries(5));\n testArray.original.insertRange(25, createRandomEntries(5));\n testArray.original.insertRange(testArray.original.length, createRandomEntries(5));\n\n var changed = countChanges(testArray);\n expect(changed).to.deep.equal({\n insertedCount: 15,\n removedCount: 0,\n modifiedCount: 0,\n totalCount: 15,\n insertedRanges: 3,\n removedRanges: 0,\n modifiedRanges: 0,\n });\n });\n\n it('should report a compact ChangeSet for simple removes in an array of NamedProperties', function() {\n var testArray = initializeArrayForComparison(50);\n\n testArray.original.removeRange(0, 5);\n testArray.original.removeRange(15, 5);\n testArray.original.removeRange(testArray.original.length - 5, 5);\n\n var changed = countChanges(testArray);\n expect(changed).to.deep.equal({\n insertedCount: 0,\n removedCount: 15,\n modifiedCount: 0,\n totalCount: 15,\n insertedRanges: 0,\n removedRanges: 3,\n modifiedRanges: 0,\n });\n });\n\n it('should report a compact ChangeSet for simple replaces in an array of NamedProperties', function() {\n var testArray = initializeArrayForComparison(50);\n\n testArray.original.removeRange(0, 5);\n testArray.original.insertRange(0, createRandomEntries(5));\n\n testArray.original.removeRange(15, 5);\n testArray.original.insertRange(15, createRandomEntries(5));\n\n testArray.original.removeRange(testArray.original.length - 5, 5);\n testArray.original.insertRange(testArray.original.length, createRandomEntries(5));\n\n var changed = countChanges(testArray);\n expect(changed).to.deep.equal({\n insertedCount: 15,\n removedCount: 15,\n modifiedCount: 0,\n totalCount: 30,\n insertedRanges: 3,\n removedRanges: 3,\n modifiedRanges: 0,\n });\n });\n\n it('should report a compact ChangeSet for modifies after inserts and removes', function() {\n var testArray = initializeArrayForComparison(50);\n\n testArray.original.removeRange(5, 5);\n testArray.original.get(7)._properties.stringProperty.value = 'NewValue1';\n testArray.original.insertRange(10, createRandomEntries(5));\n testArray.original.get(20)._properties.stringProperty.value = 'NewValue2';\n testArray.original.get(21)._properties.stringProperty.value = 'NewValue3';\n testArray.original.get(22)._properties.stringProperty.value = 'NewValue4';\n\n var changed = countChanges(testArray);\n expect(changed).to.deep.equal({\n insertedCount: 5,\n removedCount: 5,\n modifiedCount: 4,\n totalCount: 14,\n insertedRanges: 1,\n removedRanges: 1,\n modifiedRanges: 2,\n });\n });\n\n it('should report a compact ChangeSet for a randomized array of NamedProperties', function() {\n var generator = new DeterministicRandomGenerator('931cff4d-392f-2f41-5c52-2e17965270dc');\n this.timeout(90000);\n\n for (var i = 0; i < 20; i++) {\n var numInitialEntries = generator.irandom(300);\n var testArray = initializeArrayForComparison(numInitialEntries);\n\n // Perform modifications to the array\n var numModification = generator.irandom(10);\n var modifiedEntries = 0;\n for (var j = 0; j < numModification; j++) {\n switch (generator.irandom(3)) {\n case 0:\n // Remove entries from the array\n if (testArray.original.length > 0) {\n var rangeStart = generator.irandom(testArray.original.length);\n var rangeLength = generator.irandom(testArray.original.length - rangeStart - 1) + 1;\n testArray.original.removeRange(rangeStart, rangeLength);\n\n modifiedEntries += rangeLength;\n }\n break;\n case 1:\n // Insert entries into the array\n var rangeStart = generator.irandom(testArray.original.length + 1);\n var rangeLength = generator.irandom(50);\n testArray.original.insertRange(rangeStart, createRandomEntries(rangeLength));\n\n modifiedEntries += rangeLength;\n break;\n case 2:\n if (testArray.original.length > 0) {\n // Modify entries in the array\n var rangeStart = generator.irandom(testArray.original.length);\n var rangeLength = generator.irandom(testArray.original.length - rangeStart);\n for (var j = rangeStart; j < rangeStart + rangeLength; j++) {\n testArray.original.get(j)._properties.stringProperty.value += 'modified';\n }\n\n modifiedEntries += rangeLength;\n }\n break;\n default:\n throw new Error('Should never happen');\n }\n }\n\n // Check whether the reported changes are as compact as the modifications\n var changed = countChanges(testArray);\n\n // Make sure the reported ChangeSet is not longer than the acutally performed modifications\n expect(changed.totalCount).to.be.at.most(modifiedEntries);\n }\n });\n });\n });\n});\n"]}
|
|
1
|
+
{"version":3,"file":"customArrayProperty.spec.js","sourceRoot":"","sources":["../../../src/test/properties/customArrayProperty.spec.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AC;iBAC1D;YACF,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview In this file, we will test the functions of a BaseProperty object\n * described in /src/properties/baseProperty.js\n */\n\nvar PropertyFactory,\n\tBaseProperty,\n\tOurTestTemplate,\n\tOurArrayTestTemplate2,\n\terror,\n\tDeterministicRandomGenerator,\n\t_,\n\tChangeSet,\n\tdeepCopy;\n\nvar possibleChanges = {\n\t0: \"insert\",\n\t1: \"modify\",\n\t2: \"remove\",\n\t3: \"set\",\n};\n\nvar createTestArrayProp = function () {\n\treturn PropertyFactory.create(\"autodesk.tests:CustomArrayTestID-1.0.0\")._properties\n\t\t.MyCustomArray;\n};\n\nvar createRandomProperty = function () {\n\tvar node1 = PropertyFactory.create(\"autodesk.tests:TestID-1.0.0\");\n\tnode1._properties.MyFloatProp.value = Math.random() * 100;\n\tnode1._properties.MyIntProp.value = Math.random() * 100;\n\treturn node1;\n};\n\ndescribe(\"CustomArrayProperty\", function () {\n\t/**\n\t * Get all the objects we need in this test here.\n\t */\n\tbefore(function () {\n\t\tPropertyFactory = require(\"../..\").PropertyFactory;\n\t\tBaseProperty = require(\"../..\").BaseProperty;\n\t\tDeterministicRandomGenerator =\n\t\t\trequire(\"@fluid-experimental/property-common\").DeterministicRandomGenerator;\n\t\tChangeSet = require(\"@fluid-experimental/property-changeset\").ChangeSet;\n\t\t_ = require(\"lodash\");\n\t\tdeepCopy = _.cloneDeep;\n\n\t\tOurTestTemplate = {\n\t\t\ttypeid: \"autodesk.tests:TestID-1.0.0\",\n\t\t\tproperties: [\n\t\t\t\t{\n\t\t\t\t\tid: \"MyFloatProp\",\n\t\t\t\t\ttypeid: \"Float32\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tid: \"MyIntProp\",\n\t\t\t\t\ttypeid: \"Int32\",\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\t\tPropertyFactory._reregister(OurTestTemplate);\n\n\t\tOurArrayTestTemplate2 = {\n\t\t\ttypeid: \"autodesk.tests:CustomArrayTestID-1.0.0\",\n\t\t\tproperties: [\n\t\t\t\t{ id: \"MyCustomArray\", typeid: \"autodesk.tests:TestID-1.0.0\", context: \"array\" },\n\t\t\t\t{ id: \"SomeOtherProperty\", typeid: \"String\" },\n\t\t\t],\n\t\t};\n\t\tPropertyFactory._reregister(OurArrayTestTemplate2);\n\n\t\tvar NamedPropertyWithStringTemplate = {\n\t\t\ttypeid: \"autodesk.tests:Array.NamedPropertyWithString-1.0.0\",\n\t\t\tinherits: \"NamedProperty\",\n\t\t\tproperties: [\n\t\t\t\t{\n\t\t\t\t\tid: \"stringProperty\",\n\t\t\t\t\ttypeid: \"String\",\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\t\tPropertyFactory._reregister(NamedPropertyWithStringTemplate);\n\t});\n\n\tdescribe(\"Checking the generalized squash function of a CustomPropertyArrayProperty\", function () {\n\t\tit(\"[random number test] should be squashed to the expected changeset\", function (done) {\n\t\t\ttry {\n\t\t\t\tvar arrayProp = createTestArrayProp();\n\n\t\t\t\tvar currentArrayLength = 0;\n\n\t\t\t\tarrayProp.insertRange(0, [\n\t\t\t\t\tcreateRandomProperty(),\n\t\t\t\t\tcreateRandomProperty(),\n\t\t\t\t\tcreateRandomProperty(),\n\t\t\t\t\tcreateRandomProperty(),\n\t\t\t\t]);\n\t\t\t\tarrayProp.cleanDirty();\n\n\t\t\t\t// Create a copy of this state\n\t\t\t\tvar arrayPropCopy = createTestArrayProp();\n\t\t\t\tarrayPropCopy.deserialize(arrayProp.serialize({ dirtyOnly: false }));\n\t\t\t\tarrayPropCopy.cleanDirty();\n\n\t\t\t\tfor (var i = 0; i < 500; ++i) {\n\t\t\t\t\tcurrentArrayLength = arrayProp.length;\n\t\t\t\t\tvar nextOpType = \"insert\";\n\t\t\t\t\tvar opOffset = 0;\n\n\t\t\t\t\tif (currentArrayLength > 0) {\n\t\t\t\t\t\tnextOpType = possibleChanges[Math.floor(Math.random() * 4)];\n\t\t\t\t\t\topOffset = Math.min(\n\t\t\t\t\t\t\tMath.floor(Math.random() * currentArrayLength),\n\t\t\t\t\t\t\tcurrentArrayLength - 1,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tvar opLength =\n\t\t\t\t\t\t1 +\n\t\t\t\t\t\tMath.min(\n\t\t\t\t\t\t\tMath.floor(Math.random() * (currentArrayLength - opOffset)),\n\t\t\t\t\t\t\tcurrentArrayLength - opOffset - 1,\n\t\t\t\t\t\t);\n\n\t\t\t\t\tswitch (nextOpType) {\n\t\t\t\t\t\tcase \"remove\": {\n\t\t\t\t\t\t\tarrayProp.removeRange(opOffset, opLength);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase \"insert\": {\n\t\t\t\t\t\t\tarrayProp.insertRange(opOffset, [createRandomProperty()]);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase \"modify\": {\n\t\t\t\t\t\t\tvar childProperty = arrayProp.get(opOffset);\n\t\t\t\t\t\t\tchildProperty._properties.MyFloatProp.value = Math.random() * 100;\n\t\t\t\t\t\t\tchildProperty._properties.MyIntProp.value = Math.random() * 100;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase \"set\": {\n\t\t\t\t\t\t\tarrayProp.set(opOffset, createRandomProperty());\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// no default\n\t\t\t\t\t}\n\n\t\t\t\t\tvar serializedDirtyChanges = arrayProp.serialize({\n\t\t\t\t\t\tdirtyOnly: true,\n\t\t\t\t\t\tincludeRootTypeid: false,\n\t\t\t\t\t\tdirtinessType: BaseProperty.MODIFIED_STATE_FLAGS.DIRTY,\n\t\t\t\t\t});\n\t\t\t\t\tvar arrayPropTest = createTestArrayProp();\n\t\t\t\t\tarrayPropTest.deserialize(arrayPropCopy.serialize({ dirtyOnly: false }));\n\t\t\t\t\tarrayPropTest.cleanDirty();\n\t\t\t\t\tarrayPropTest.applyChangeSet(serializedDirtyChanges);\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\terror = e;\n\t\t\t} finally {\n\t\t\t\texpect(error).to.equal(undefined);\n\t\t\t\texpect(arrayProp).to.not.equal(null);\n\t\t\t\texpect(arrayProp.serialize({ dirtyOnly: false })).to.deep.equal(\n\t\t\t\t\tarrayPropTest.serialize({ dirtyOnly: false }),\n\t\t\t\t);\n\t\t\t\tdone();\n\t\t\t}\n\t\t});\n\t});\n\n\tdescribe(\"Path resolution\", function () {\n\t\tit(\"should work for array properties\", function () {\n\t\t\tvar arrayParent = PropertyFactory.create(\"autodesk.tests:CustomArrayTestID-1.0.0\");\n\t\t\tvar arrayProp = arrayParent._properties.MyCustomArray;\n\n\t\t\t// prepare initial state\n\t\t\tvar entries = [];\n\t\t\tfor (var i = 0; i < 10; i++) {\n\t\t\t\tvar entry = PropertyFactory.create(\"autodesk.tests:TestID-1.0.0\");\n\t\t\t\tentry._properties.MyIntProp.value = i;\n\t\t\t\tentries.push(entry);\n\t\t\t}\n\n\t\t\tarrayParent._properties.MyCustomArray.insertRange(0, entries);\n\n\t\t\t// Make sure that arrray access works\n\t\t\texpect(\n\t\t\t\tarrayParent.resolvePath(\"MyCustomArray[0]\")._properties.MyIntProp.value,\n\t\t\t).to.equal(0);\n\t\t\texpect(arrayProp.resolvePath(\"[2]\")._properties.MyIntProp.value).to.equal(2);\n\n\t\t\t// Test out of bounds access\n\t\t\texpect(arrayParent.resolvePath(\"MyCustomArray[-1]\")).to.be.undefined;\n\t\t\texpect(arrayParent.resolvePath(\"MyCustomArray[10]\")).to.be.undefined;\n\n\t\t\tvar myTestArrayProp = arrayProp.get(5);\n\t\t\texpect(myTestArrayProp.getAbsolutePath()).to.equal(\"/MyCustomArray[5]\");\n\t\t\texpect(myTestArrayProp.getRelativePath(arrayProp)).to.equal(\"[5]\");\n\n\t\t\t// Test exception on parsing error\n\t\t\texpect(function () {\n\t\t\t\tarrayParent.resolvePath('MyCustomArray[\"abcd\"]');\n\t\t\t}).to.throw();\n\n\t\t\t// Test path resolution after insertion\n\t\t\tvar newEntry = PropertyFactory.create(\"autodesk.tests:TestID-1.0.0\");\n\t\t\tnewEntry._properties.MyIntProp.value = -1;\n\t\t\tarrayParent._properties.MyCustomArray.insertRange(0, [newEntry]);\n\t\t\texpect(\n\t\t\t\tarrayParent.resolvePath(\"MyCustomArray[0]\")._properties.MyIntProp.value,\n\t\t\t).to.equal(-1);\n\t\t\texpect(myTestArrayProp.getAbsolutePath()).to.equal(\"/MyCustomArray[6]\");\n\n\t\t\t// Test path resolution after setting\n\t\t\t// TODO: set currently broken\n\t\t\tvar newEntry2 = PropertyFactory.create(\"autodesk.tests:TestID-1.0.0\");\n\t\t\tnewEntry2._properties.MyIntProp.value = -2;\n\t\t\tarrayParent._properties.MyCustomArray.set(0, newEntry2);\n\t\t\texpect(\n\t\t\t\tarrayParent.resolvePath(\"MyCustomArray[0]\")._properties.MyIntProp.value,\n\t\t\t).to.equal(-2);\n\n\t\t\t// Test path resolution after removal\n\t\t\tarrayParent._properties.MyCustomArray.removeRange(0, 1);\n\t\t\texpect(\n\t\t\t\tarrayParent.resolvePath(\"MyCustomArray[0]\")._properties.MyIntProp.value,\n\t\t\t).to.equal(0);\n\t\t\texpect(myTestArrayProp.getAbsolutePath()).to.equal(\"/MyCustomArray[5]\");\n\n\t\t\t// Test path resolution after insertion via applyChangeSet\n\t\t\tarrayParent._properties.MyCustomArray.applyChangeSet({\n\t\t\t\tinsert: [\n\t\t\t\t\t[\n\t\t\t\t\t\t0,\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttypeid: \"autodesk.tests:TestID-1.0.0\",\n\t\t\t\t\t\t\t\tFloat32: {\n\t\t\t\t\t\t\t\t\tMyFloatProp: 16,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tInt32: {\n\t\t\t\t\t\t\t\t\tMyIntProp: 17,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttypeid: \"autodesk.tests:TestID-1.0.0\",\n\t\t\t\t\t\t\t\tFloat32: {\n\t\t\t\t\t\t\t\t\tMyFloatProp: 18,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tInt32: {\n\t\t\t\t\t\t\t\t\tMyIntProp: 19,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t});\n\t\t\texpect(\n\t\t\t\tarrayParent.resolvePath(\"MyCustomArray[0]\")._properties.MyIntProp.value,\n\t\t\t).to.equal(17);\n\t\t\texpect(myTestArrayProp.getAbsolutePath()).to.equal(\"/MyCustomArray[7]\");\n\n\t\t\tvar serialied = arrayParent._properties.MyCustomArray.serialize({ dirtyOnly: false });\n\n\t\t\t// Test path resolution after removal\n\t\t\tarrayParent._properties.MyCustomArray.applyChangeSet({\n\t\t\t\tremove: [[0, 1]],\n\t\t\t});\n\t\t\texpect(\n\t\t\t\tarrayParent.resolvePath(\"MyCustomArray[0]\")._properties.MyIntProp.value,\n\t\t\t).to.equal(19);\n\t\t\texpect(myTestArrayProp.getAbsolutePath()).to.equal(\"/MyCustomArray[6]\");\n\t\t\texpect(arrayParent.resolvePath(\"MyCustomArray[11]\")).to.be.undefined;\n\n\t\t\t// Test Path resolution after deserialize\n\t\t\tarrayParent._properties.MyCustomArray.deserialize(serialied);\n\t\t\texpect(\n\t\t\t\tarrayParent.resolvePath(\"MyCustomArray[0]\")._properties.MyIntProp.value,\n\t\t\t).to.equal(17);\n\t\t\texpect(arrayParent.resolvePath(\"MyCustomArray[11]\")).not.to.be.undefined;\n\n\t\t\tarrayParent._properties.MyCustomArray.deserialize({});\n\t\t\texpect(arrayParent.resolvePath(\"MyCustomArray[0]\")).to.be.undefined;\n\t\t\texpect(arrayParent.resolvePath(\"MyCustomArray[11]\")).to.be.undefined;\n\n\t\t\t// Try multiple levels\n\t\t\tvar leaf = PropertyFactory.create(\"NodeProperty\");\n\t\t\texpect(leaf.resolvePath(\"/\")).to.equal(leaf);\n\t\t\tvar array1 = PropertyFactory.create(\"NodeProperty\", \"array\");\n\t\t\tarray1.push(leaf);\n\t\t\texpect(leaf.resolvePath(\"/\")).to.equal(array1);\n\n\t\t\tvar array2 = PropertyFactory.create(undefined, \"array\");\n\t\t\tarray2.push(array1);\n\t\t\texpect(leaf.resolvePath(\"/\")).to.equal(array2);\n\n\t\t\tvar array3 = PropertyFactory.create(undefined, \"array\");\n\t\t\tarray3.push(array2);\n\t\t\texpect(leaf.resolvePath(\"/\")).to.equal(array3);\n\t\t});\n\t});\n\n\tdescribe(\"Sized arrays\", function () {\n\t\t// Test fix for an issue where custom array templates with non-zero sizes\n\t\t// resulted in the array initially containing objects without a parent.\n\t\tit(\"should work for custom array property templates with size specified\", function () {\n\t\t\tvar TestString = {\n\t\t\t\ttypeid: \"autodesk.test:test.string-1.0.0\",\n\t\t\t\tproperties: [{ id: \"data\", typeid: \"String\" }],\n\t\t\t};\n\n\t\t\tvar TestCustomArray = {\n\t\t\t\ttypeid: \"autodesk.test:test.customarray-1.0.0\",\n\t\t\t\tproperties: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: \"data\",\n\t\t\t\t\t\ttypeid: \"autodesk.test:test.string-1.0.0\",\n\t\t\t\t\t\tcontext: \"array\",\n\t\t\t\t\t\tlength: 3,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t};\n\t\t\tPropertyFactory._reregister(TestString);\n\t\t\tPropertyFactory._reregister(TestCustomArray);\n\n\t\t\tvar sizedArray = PropertyFactory.create(\"autodesk.test:test.customarray-1.0.0\");\n\t\t\t// Prior to the fix to properly parent initial elements, clear() would result in an exception with\n\t\t\t// the message 'Trying to remove a property from an array that has not the array as parent.'\n\t\t\tvar clearArrayFn = function () {\n\t\t\t\tsizedArray.resolvePath(\"data\").clear();\n\t\t\t};\n\t\t\texpect(clearArrayFn).to.not.throw();\n\t\t});\n\t});\n\n\tdescribe(\"Commit\", function () {\n\t\t/* it('should not appear in the changeset when committing a change on its sibling', function() {\n // TODO: This test cannot be implemented in Fluid\n let cm = new HFDM();\n let workspace = cm.createWorkspace();\n let checkoutView = workspace._getCheckoutView();\n let pset = PropertyFactory.create('autodesk.tests:CustomArrayTestID-1.0.0');\n\n return cm._createRepository({local: true}).then(function(params) {\n return cm._checkoutAttempt(params.branch.getUrn(), checkoutView);\n }).then(function() {\n checkoutView.getRoot().insert('pset', pset);\n return cm._commit(null, checkoutView);\n }).then(function(commitNode) {\n\n checkoutView.register('modified', function(cv, changeSet) {\n expect(changeSet).to.not.be.undefined;\n expect(\n changeSet.getSerializedChangeSet()\n .modify['autodesk.tests:CustomArrayTestID-1.0.0']['array<autodesk.tests:TestID-1.0.0>']\n ).to.not.exist;\n });\n checkoutView.getRoot().resolvePath('pset.SomeOtherProperty').setValue('foobar');\n return cm._commit(null, checkoutView);\n });\n }); */\n\n\t\tdescribe(\"Nested collections\", function () {\n\t\t\tit(\"should support squashing of nested maps\", function () {\n\t\t\t\tvar nodeProp = PropertyFactory.create(\"NodeProperty\");\n\t\t\t\tvar arrayProp = PropertyFactory.create(\"array<BaseProperty>\");\n\t\t\t\tvar testMap = PropertyFactory.create(\"map<Bool>\");\n\n\t\t\t\tnodeProp.insert(\"array\", arrayProp);\n\t\t\t\ttestMap.set(\"test\", true);\n\t\t\t\tarrayProp.push(testMap);\n\t\t\t\tvar CS1 = nodeProp.serialize({ dirtyOnly: false });\n\n\t\t\t\tnodeProp.cleanDirty();\n\t\t\t\ttestMap.set(\"test\", false);\n\t\t\t\tvar CS2 = nodeProp.serialize({ dirtyOnly: true });\n\n\t\t\t\tvar CS = new ChangeSet(CS1);\n\t\t\t\tCS.applyChangeSet(new ChangeSet(CS2));\n\t\t\t\tvar arrayChanges = CS.getSerializedChangeSet().insert[\"array<>\"].array;\n\t\t\t\texpect(arrayChanges.insert[0][1][0]).to.have.all.keys(\"insert\", \"typeid\");\n\t\t\t\texpect(arrayChanges.insert[0][1][0].insert[\"test\"]).to.equal(false);\n\t\t\t});\n\n\t\t\tit(\"should support basic rebasing of nested maps\", function () {\n\t\t\t\tvar nodeProp = PropertyFactory.create(\"NodeProperty\");\n\t\t\t\tvar arrayProp = PropertyFactory.create(\"array<BaseProperty>\");\n\t\t\t\tvar testMap = PropertyFactory.create(\"map<Bool>\");\n\n\t\t\t\tnodeProp.insert(\"array\", arrayProp);\n\t\t\t\ttestMap.set(\"test\", true);\n\t\t\t\tarrayProp.push(testMap);\n\n\t\t\t\tnodeProp.cleanDirty();\n\t\t\t\ttestMap.set(\"test\", false);\n\t\t\t\tvar CS1 = nodeProp.serialize({ dirtyOnly: true });\n\t\t\t\tvar CS2 = deepCopy(CS1);\n\n\t\t\t\tvar CS = new ChangeSet(CS1);\n\t\t\t\tvar conflicts = [];\n\t\t\t\tCS._rebaseChangeSet(CS2, conflicts);\n\t\t\t\texpect(conflicts.length).to.equal(1);\n\t\t\t\texpect(conflicts[0].type).to.be.equal(ChangeSet.ConflictType.COLLIDING_SET);\n\t\t\t\texpect(conflicts[0].path).to.be.equal(\"array[0][test]\");\n\t\t\t});\n\n\t\t\tit(\"should be deserializable\", function () {\n\t\t\t\tvar testArray = PropertyFactory.create(\"array<>\");\n\t\t\t\ttestArray.push(PropertyFactory.create(\"array<>\"));\n\t\t\t\tvar serialized = testArray.serialize({ dirtyOnly: false });\n\n\t\t\t\tvar testArray2 = PropertyFactory.create(\"array<>\");\n\t\t\t\ttestArray2.deserialize(serialized);\n\t\t\t\texpect(testArray2.serialize({ dirtyOnly: false })).to.deep.equal(\n\t\t\t\t\ttestArray.serialize({ dirtyOnly: false }),\n\t\t\t\t);\n\t\t\t});\n\t\t});\n\n\t\tdescribe(\"deserialize\", function () {\n\t\t\t// Returns a sequence of random NamedProperties\n\t\t\tvar createRandomEntries = function (in_count) {\n\t\t\t\treturn _.map(_.range(in_count), function () {\n\t\t\t\t\tvar property = PropertyFactory.create(\n\t\t\t\t\t\t\"autodesk.tests:Array.NamedPropertyWithString-1.0.0\",\n\t\t\t\t\t);\n\t\t\t\t\tproperty._properties.stringProperty.value = \"initial\";\n\t\t\t\t\treturn property;\n\t\t\t\t});\n\t\t\t};\n\n\t\t\t// Manually copy the array (we don't use deserialize for the copy\n\t\t\t// here since we want to test that function below and don't want\n\t\t\t// an error here to affect the comparison)\n\t\t\tvar manuallyCopyArray = function (arrayProperty) {\n\t\t\t\tvar copiedArray = PropertyFactory.create(\n\t\t\t\t\t\"autodesk.tests:Array.NamedPropertyWithString-1.0.0\",\n\t\t\t\t\t\"array\",\n\t\t\t\t);\n\t\t\t\tvar copiedEntries = _.map(arrayProperty.getEntriesReadOnly(), function (entry) {\n\t\t\t\t\t// Create a named property with the same guid\n\t\t\t\t\tvar newNode = PropertyFactory.create(\n\t\t\t\t\t\t\"autodesk.tests:Array.NamedPropertyWithString-1.0.0\",\n\t\t\t\t\t);\n\t\t\t\t\tnewNode._properties.guid.value = entry.getGuid();\n\t\t\t\t\tnewNode._properties.stringProperty.value =\n\t\t\t\t\t\tentry._properties.stringProperty.value;\n\t\t\t\t\treturn newNode;\n\t\t\t\t});\n\t\t\t\tcopiedArray.insertRange(0, copiedEntries);\n\n\t\t\t\treturn copiedArray;\n\t\t\t};\n\n\t\t\t// Prepare the initial state\n\t\t\tvar initializeArrayForComparison = function (in_count) {\n\t\t\t\t// Create an array with named properties\n\t\t\t\tvar arrayProperty = PropertyFactory.create(\"NamedProperty\", \"array\");\n\t\t\t\tvar entries = createRandomEntries(in_count);\n\t\t\t\tarrayProperty.insertRange(0, entries);\n\n\t\t\t\tvar copiedArray = manuallyCopyArray(arrayProperty);\n\n\t\t\t\treturn {\n\t\t\t\t\toriginal: arrayProperty,\n\t\t\t\t\tcopy: copiedArray,\n\t\t\t\t};\n\t\t\t};\n\n\t\t\t// Counts the changes in the array\n\t\t\tvar countChanges = function (in_testArray) {\n\t\t\t\t// First create a copy of the copy to check afterwards whether the changeset is correct\n\t\t\t\tvar copy2 = manuallyCopyArray(in_testArray.copy);\n\n\t\t\t\t// deserialize the changes into the copied array property\n\t\t\t\tin_testArray.copy.cleanDirty();\n\t\t\t\tvar deserialized = in_testArray.copy.deserialize(\n\t\t\t\t\tin_testArray.original.serialize({ dirtyOnly: false }),\n\t\t\t\t);\n\n\t\t\t\texpect(in_testArray.copy.serialize({ dirtyOnly: false })).to.deep.equal(\n\t\t\t\t\tin_testArray.original.serialize({ dirtyOnly: false }),\n\t\t\t\t);\n\t\t\t\texpect(deserialized).to.deep.equal(\n\t\t\t\t\tin_testArray.copy.serialize({ dirtyOnly: true }),\n\t\t\t\t);\n\n\t\t\t\t// Make sure the returned ChangeSet is correct\n\t\t\t\tcopy2.applyChangeSet(deserialized);\n\t\t\t\texpect(copy2.serialize({ dirtyOnly: false })).to.deep.equal(\n\t\t\t\t\tin_testArray.original.serialize({ dirtyOnly: false }),\n\t\t\t\t);\n\n\t\t\t\t// Count insert, modify and remove operations\n\t\t\t\tvar insertedCount = _.reduce(\n\t\t\t\t\tdeserialized.insert,\n\t\t\t\t\tfunction (last, insertedRange) {\n\t\t\t\t\t\treturn last + insertedRange[1].length;\n\t\t\t\t\t},\n\t\t\t\t\t0,\n\t\t\t\t);\n\t\t\t\tvar removedCount = _.reduce(\n\t\t\t\t\tdeserialized.remove,\n\t\t\t\t\tfunction (last, removedRange) {\n\t\t\t\t\t\treturn last + removedRange[1];\n\t\t\t\t\t},\n\t\t\t\t\t0,\n\t\t\t\t);\n\t\t\t\tvar modifiedCount = _.reduce(\n\t\t\t\t\tdeserialized.modify,\n\t\t\t\t\tfunction (last, modifiedRange) {\n\t\t\t\t\t\treturn last + modifiedRange[1].length;\n\t\t\t\t\t},\n\t\t\t\t\t0,\n\t\t\t\t);\n\n\t\t\t\treturn {\n\t\t\t\t\tinsertedCount: insertedCount,\n\t\t\t\t\tremovedCount: removedCount,\n\t\t\t\t\tmodifiedCount: modifiedCount,\n\t\t\t\t\ttotalCount: insertedCount + removedCount + modifiedCount,\n\t\t\t\t\tinsertedRanges: deserialized.insert ? deserialized.insert.length : 0,\n\t\t\t\t\tremovedRanges: deserialized.remove ? deserialized.remove.length : 0,\n\t\t\t\t\tmodifiedRanges: deserialized.modify ? deserialized.modify.length : 0,\n\t\t\t\t};\n\t\t\t};\n\n\t\t\tit(\"should report an empty ChangeSet for deserialize without changes\", function () {\n\t\t\t\tvar testArray = initializeArrayForComparison(50);\n\n\t\t\t\t// Check the returned ChangeSet\n\t\t\t\tvar changed = countChanges(testArray);\n\t\t\t\texpect(changed).to.deep.equal({\n\t\t\t\t\tinsertedCount: 0,\n\t\t\t\t\tremovedCount: 0,\n\t\t\t\t\tmodifiedCount: 0,\n\t\t\t\t\ttotalCount: 0,\n\t\t\t\t\tinsertedRanges: 0,\n\t\t\t\t\tremovedRanges: 0,\n\t\t\t\t\tmodifiedRanges: 0,\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tit(\"should report an empty ChangeSet for a length 0 array\", function () {\n\t\t\t\tvar testArray = initializeArrayForComparison(0);\n\n\t\t\t\t// Check the returned ChangeSet\n\t\t\t\tvar changed = countChanges(testArray);\n\t\t\t\texpect(changed).to.deep.equal({\n\t\t\t\t\tinsertedCount: 0,\n\t\t\t\t\tremovedCount: 0,\n\t\t\t\t\tmodifiedCount: 0,\n\t\t\t\t\ttotalCount: 0,\n\t\t\t\t\tinsertedRanges: 0,\n\t\t\t\t\tremovedRanges: 0,\n\t\t\t\t\tmodifiedRanges: 0,\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tit(\"should report a compact ChangeSet for simple move in an array of NamedProperties\", function () {\n\t\t\t\tvar testArray = initializeArrayForComparison(50);\n\n\t\t\t\t// Move a segment in the array\n\t\t\t\tvar entries = [\n\t\t\t\t\ttestArray.original.get(45),\n\t\t\t\t\ttestArray.original.get(46),\n\t\t\t\t\ttestArray.original.get(47),\n\t\t\t\t];\n\t\t\t\ttestArray.original.removeRange(45, 3);\n\t\t\t\ttestArray.original.insertRange(3, entries);\n\n\t\t\t\t// Check the returned ChangeSet\n\t\t\t\tvar changed = countChanges(testArray);\n\t\t\t\texpect(changed).to.deep.equal({\n\t\t\t\t\tinsertedCount: 3,\n\t\t\t\t\tremovedCount: 3,\n\t\t\t\t\tmodifiedCount: 0,\n\t\t\t\t\ttotalCount: 6,\n\t\t\t\t\tinsertedRanges: 1,\n\t\t\t\t\tremovedRanges: 1,\n\t\t\t\t\tmodifiedRanges: 0,\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tit(\"should report a compact ChangeSet for simple inserts in an array of NamedProperties\", function () {\n\t\t\t\tvar testArray = initializeArrayForComparison(50);\n\n\t\t\t\ttestArray.original.insertRange(0, createRandomEntries(5));\n\t\t\t\ttestArray.original.insertRange(25, createRandomEntries(5));\n\t\t\t\ttestArray.original.insertRange(testArray.original.length, createRandomEntries(5));\n\n\t\t\t\tvar changed = countChanges(testArray);\n\t\t\t\texpect(changed).to.deep.equal({\n\t\t\t\t\tinsertedCount: 15,\n\t\t\t\t\tremovedCount: 0,\n\t\t\t\t\tmodifiedCount: 0,\n\t\t\t\t\ttotalCount: 15,\n\t\t\t\t\tinsertedRanges: 3,\n\t\t\t\t\tremovedRanges: 0,\n\t\t\t\t\tmodifiedRanges: 0,\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tit(\"should report a compact ChangeSet for simple removes in an array of NamedProperties\", function () {\n\t\t\t\tvar testArray = initializeArrayForComparison(50);\n\n\t\t\t\ttestArray.original.removeRange(0, 5);\n\t\t\t\ttestArray.original.removeRange(15, 5);\n\t\t\t\ttestArray.original.removeRange(testArray.original.length - 5, 5);\n\n\t\t\t\tvar changed = countChanges(testArray);\n\t\t\t\texpect(changed).to.deep.equal({\n\t\t\t\t\tinsertedCount: 0,\n\t\t\t\t\tremovedCount: 15,\n\t\t\t\t\tmodifiedCount: 0,\n\t\t\t\t\ttotalCount: 15,\n\t\t\t\t\tinsertedRanges: 0,\n\t\t\t\t\tremovedRanges: 3,\n\t\t\t\t\tmodifiedRanges: 0,\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tit(\"should report a compact ChangeSet for simple replaces in an array of NamedProperties\", function () {\n\t\t\t\tvar testArray = initializeArrayForComparison(50);\n\n\t\t\t\ttestArray.original.removeRange(0, 5);\n\t\t\t\ttestArray.original.insertRange(0, createRandomEntries(5));\n\n\t\t\t\ttestArray.original.removeRange(15, 5);\n\t\t\t\ttestArray.original.insertRange(15, createRandomEntries(5));\n\n\t\t\t\ttestArray.original.removeRange(testArray.original.length - 5, 5);\n\t\t\t\ttestArray.original.insertRange(testArray.original.length, createRandomEntries(5));\n\n\t\t\t\tvar changed = countChanges(testArray);\n\t\t\t\texpect(changed).to.deep.equal({\n\t\t\t\t\tinsertedCount: 15,\n\t\t\t\t\tremovedCount: 15,\n\t\t\t\t\tmodifiedCount: 0,\n\t\t\t\t\ttotalCount: 30,\n\t\t\t\t\tinsertedRanges: 3,\n\t\t\t\t\tremovedRanges: 3,\n\t\t\t\t\tmodifiedRanges: 0,\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tit(\"should report a compact ChangeSet for modifies after inserts and removes\", function () {\n\t\t\t\tvar testArray = initializeArrayForComparison(50);\n\n\t\t\t\ttestArray.original.removeRange(5, 5);\n\t\t\t\ttestArray.original.get(7)._properties.stringProperty.value = \"NewValue1\";\n\t\t\t\ttestArray.original.insertRange(10, createRandomEntries(5));\n\t\t\t\ttestArray.original.get(20)._properties.stringProperty.value = \"NewValue2\";\n\t\t\t\ttestArray.original.get(21)._properties.stringProperty.value = \"NewValue3\";\n\t\t\t\ttestArray.original.get(22)._properties.stringProperty.value = \"NewValue4\";\n\n\t\t\t\tvar changed = countChanges(testArray);\n\t\t\t\texpect(changed).to.deep.equal({\n\t\t\t\t\tinsertedCount: 5,\n\t\t\t\t\tremovedCount: 5,\n\t\t\t\t\tmodifiedCount: 4,\n\t\t\t\t\ttotalCount: 14,\n\t\t\t\t\tinsertedRanges: 1,\n\t\t\t\t\tremovedRanges: 1,\n\t\t\t\t\tmodifiedRanges: 2,\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tit(\"should report a compact ChangeSet for a randomized array of NamedProperties\", function () {\n\t\t\t\tvar generator = new DeterministicRandomGenerator(\n\t\t\t\t\t\"931cff4d-392f-2f41-5c52-2e17965270dc\",\n\t\t\t\t);\n\t\t\t\tthis.timeout(90000);\n\n\t\t\t\tfor (var i = 0; i < 20; i++) {\n\t\t\t\t\tvar numInitialEntries = generator.irandom(300);\n\t\t\t\t\tvar testArray = initializeArrayForComparison(numInitialEntries);\n\n\t\t\t\t\t// Perform modifications to the array\n\t\t\t\t\tvar numModification = generator.irandom(10);\n\t\t\t\t\tvar modifiedEntries = 0;\n\t\t\t\t\tfor (var j = 0; j < numModification; j++) {\n\t\t\t\t\t\tswitch (generator.irandom(3)) {\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t// Remove entries from the array\n\t\t\t\t\t\t\t\tif (testArray.original.length > 0) {\n\t\t\t\t\t\t\t\t\tvar rangeStart = generator.irandom(testArray.original.length);\n\t\t\t\t\t\t\t\t\tvar rangeLength =\n\t\t\t\t\t\t\t\t\t\tgenerator.irandom(\n\t\t\t\t\t\t\t\t\t\t\ttestArray.original.length - rangeStart - 1,\n\t\t\t\t\t\t\t\t\t\t) + 1;\n\t\t\t\t\t\t\t\t\ttestArray.original.removeRange(rangeStart, rangeLength);\n\n\t\t\t\t\t\t\t\t\tmodifiedEntries += rangeLength;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t// Insert entries into the array\n\t\t\t\t\t\t\t\tvar rangeStart = generator.irandom(testArray.original.length + 1);\n\t\t\t\t\t\t\t\tvar rangeLength = generator.irandom(50);\n\t\t\t\t\t\t\t\ttestArray.original.insertRange(\n\t\t\t\t\t\t\t\t\trangeStart,\n\t\t\t\t\t\t\t\t\tcreateRandomEntries(rangeLength),\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tmodifiedEntries += rangeLength;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tif (testArray.original.length > 0) {\n\t\t\t\t\t\t\t\t\t// Modify entries in the array\n\t\t\t\t\t\t\t\t\tvar rangeStart = generator.irandom(testArray.original.length);\n\t\t\t\t\t\t\t\t\tvar rangeLength = generator.irandom(\n\t\t\t\t\t\t\t\t\t\ttestArray.original.length - rangeStart,\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tfor (var j = rangeStart; j < rangeStart + rangeLength; j++) {\n\t\t\t\t\t\t\t\t\t\ttestArray.original.get(\n\t\t\t\t\t\t\t\t\t\t\tj,\n\t\t\t\t\t\t\t\t\t\t)._properties.stringProperty.value += \"modified\";\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tmodifiedEntries += rangeLength;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tthrow new Error(\"Should never happen\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check whether the reported changes are as compact as the modifications\n\t\t\t\t\tvar changed = countChanges(testArray);\n\n\t\t\t\t\t// Make sure the reported ChangeSet is not longer than the acutally performed modifications\n\t\t\t\t\texpect(changed.totalCount).to.be.at.most(modifiedEntries);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t});\n});\n"]}
|
|
@@ -7,107 +7,111 @@
|
|
|
7
7
|
* described in /src/properties/enumArrayProperty.js
|
|
8
8
|
*/
|
|
9
9
|
var PropertyFactory, MSG;
|
|
10
|
-
describe(
|
|
10
|
+
describe("EnumArrayProperty", function () {
|
|
11
11
|
/**
|
|
12
12
|
* Get all the objects we need in this test here.
|
|
13
13
|
*/
|
|
14
14
|
before(function () {
|
|
15
|
-
MSG = require(
|
|
16
|
-
PropertyFactory = require(
|
|
15
|
+
MSG = require("@fluid-experimental/property-common").constants.MSG;
|
|
16
|
+
PropertyFactory = require("../..").PropertyFactory;
|
|
17
17
|
const enumUnoDosTresSchema = {
|
|
18
|
-
inherits:
|
|
18
|
+
inherits: "Enum",
|
|
19
19
|
properties: [
|
|
20
|
-
{ id:
|
|
21
|
-
{ id:
|
|
22
|
-
{ id:
|
|
20
|
+
{ id: "uno", value: 1 },
|
|
21
|
+
{ id: "dos", value: 2 },
|
|
22
|
+
{ id: "tres", value: 3 },
|
|
23
23
|
],
|
|
24
|
-
typeid:
|
|
24
|
+
typeid: "autodesk.enum:unoDosTres-1.0.0",
|
|
25
25
|
};
|
|
26
26
|
const enumAndEnumArraySchema = {
|
|
27
27
|
properties: [
|
|
28
28
|
{
|
|
29
|
-
context:
|
|
30
|
-
id:
|
|
31
|
-
typeid:
|
|
29
|
+
context: "array",
|
|
30
|
+
id: "enumArray",
|
|
31
|
+
typeid: "autodesk.enum:unoDosTres-1.0.0",
|
|
32
32
|
value: [2, 1, 2],
|
|
33
33
|
},
|
|
34
34
|
],
|
|
35
|
-
typeid:
|
|
35
|
+
typeid: "autodesk.enum:enums-1.0.0",
|
|
36
36
|
};
|
|
37
37
|
PropertyFactory._reregister(enumUnoDosTresSchema);
|
|
38
38
|
PropertyFactory._reregister(enumAndEnumArraySchema);
|
|
39
39
|
});
|
|
40
|
-
it(
|
|
41
|
-
let property = PropertyFactory.create(
|
|
42
|
-
expect(property.get(
|
|
43
|
-
expect(property.get(
|
|
40
|
+
it("Should be able to get a value", function () {
|
|
41
|
+
let property = PropertyFactory.create("autodesk.enum:enums-1.0.0");
|
|
42
|
+
expect(property.get("enumArray").get(0)).to.equal(2);
|
|
43
|
+
expect(property.get("enumArray").getEnumString(0)).to.equal("dos");
|
|
44
44
|
});
|
|
45
|
-
it(
|
|
46
|
-
let property = PropertyFactory.create(
|
|
47
|
-
expect(property.get(
|
|
45
|
+
it("Should be able to getValues", function () {
|
|
46
|
+
let property = PropertyFactory.create("autodesk.enum:enums-1.0.0");
|
|
47
|
+
expect(property.get("enumArray").getValues()).to.deep.equal([2, 1, 2]);
|
|
48
48
|
});
|
|
49
|
-
it(
|
|
50
|
-
let property = PropertyFactory.create(
|
|
51
|
-
expect(property.get(
|
|
49
|
+
it("Should be able to getEnumStrings", function () {
|
|
50
|
+
let property = PropertyFactory.create("autodesk.enum:enums-1.0.0");
|
|
51
|
+
expect(property.get("enumArray").getEnumStrings(0, 3)).to.deep.equal(["dos", "uno", "dos"]);
|
|
52
52
|
});
|
|
53
|
-
it(
|
|
54
|
-
let property = PropertyFactory.create(
|
|
55
|
-
expect(property.get(
|
|
56
|
-
property.get(
|
|
57
|
-
expect(property.get(
|
|
53
|
+
it("Should be able to set a value using an Enum number", function () {
|
|
54
|
+
let property = PropertyFactory.create("autodesk.enum:enums-1.0.0");
|
|
55
|
+
expect(property.get("enumArray").get(0)).to.equal(2);
|
|
56
|
+
property.get("enumArray").set(0, 1);
|
|
57
|
+
expect(property.get("enumArray").get(0)).to.equal(1);
|
|
58
58
|
});
|
|
59
|
-
it(
|
|
60
|
-
let property = PropertyFactory.create(
|
|
59
|
+
it("Should throw on setting invalid Enum number", function () {
|
|
60
|
+
let property = PropertyFactory.create("autodesk.enum:enums-1.0.0");
|
|
61
61
|
expect(function () {
|
|
62
|
-
property.get(
|
|
62
|
+
property.get("enumArray").set(0, -100);
|
|
63
63
|
}).to.throw(MSG.UNKNOWN_ENUM);
|
|
64
64
|
});
|
|
65
|
-
it(
|
|
66
|
-
let property = PropertyFactory.create(
|
|
67
|
-
expect(property.get(
|
|
68
|
-
property.get(
|
|
69
|
-
expect(property.get(
|
|
65
|
+
it("Should be able to set a value using an Enum string", function () {
|
|
66
|
+
let property = PropertyFactory.create("autodesk.enum:enums-1.0.0");
|
|
67
|
+
expect(property.get("enumArray").get(0)).to.equal(2);
|
|
68
|
+
property.get("enumArray").set(0, "uno");
|
|
69
|
+
expect(property.get("enumArray").get(0)).to.equal(1);
|
|
70
70
|
});
|
|
71
|
-
it(
|
|
72
|
-
let property = PropertyFactory.create(
|
|
71
|
+
it("Should throw on setting invalid Enum string", function () {
|
|
72
|
+
let property = PropertyFactory.create("autodesk.enum:enums-1.0.0");
|
|
73
73
|
expect(function () {
|
|
74
|
-
property.get(
|
|
74
|
+
property.get("enumArray").set(0, "badString");
|
|
75
75
|
}).to.throw(MSG.UNKNOWN_ENUM);
|
|
76
76
|
});
|
|
77
|
-
it(
|
|
78
|
-
let property = PropertyFactory.create(
|
|
79
|
-
property.get(
|
|
80
|
-
expect(property.get(
|
|
77
|
+
it("Should be able to insert a value using an Enum number", function () {
|
|
78
|
+
let property = PropertyFactory.create("autodesk.enum:enums-1.0.0");
|
|
79
|
+
property.get("enumArray").insertRange(2, [1]);
|
|
80
|
+
expect(property.get("enumArray").getValues()).to.deep.equal([2, 1, 1, 2]);
|
|
81
81
|
});
|
|
82
|
-
it(
|
|
83
|
-
let property = PropertyFactory.create(
|
|
82
|
+
it("Should throw on inserting invalid Enum number", function () {
|
|
83
|
+
let property = PropertyFactory.create("autodesk.enum:enums-1.0.0");
|
|
84
84
|
expect(function () {
|
|
85
|
-
property.get(
|
|
85
|
+
property.get("enumArray").insertRange(0, [-100]);
|
|
86
86
|
}).to.throw(MSG.UNKNOWN_ENUM);
|
|
87
87
|
});
|
|
88
|
-
it(
|
|
89
|
-
let property = PropertyFactory.create(
|
|
90
|
-
property.get(
|
|
91
|
-
expect(property.get(
|
|
88
|
+
it("Should be able to insert a value using an Enum string", function () {
|
|
89
|
+
let property = PropertyFactory.create("autodesk.enum:enums-1.0.0");
|
|
90
|
+
property.get("enumArray").insertRange(2, ["uno"]);
|
|
91
|
+
expect(property.get("enumArray").getValues()).to.deep.equal([2, 1, 1, 2]);
|
|
92
92
|
});
|
|
93
|
-
it(
|
|
94
|
-
let property = PropertyFactory.create(
|
|
93
|
+
it("Should throw on inserting invalid Enum string", function () {
|
|
94
|
+
let property = PropertyFactory.create("autodesk.enum:enums-1.0.0");
|
|
95
95
|
expect(function () {
|
|
96
|
-
property.get(
|
|
96
|
+
property.get("enumArray").insertRange(0, ["badString"]);
|
|
97
97
|
}).to.throw(MSG.UNKNOWN_ENUM);
|
|
98
98
|
});
|
|
99
|
-
it(
|
|
100
|
-
let initialValues = {
|
|
101
|
-
let property = PropertyFactory.create(
|
|
102
|
-
expect(property.get(
|
|
103
|
-
expect(property.get(
|
|
99
|
+
it("Should be able to overide default values on creation with initialValues", function () {
|
|
100
|
+
let initialValues = { enumArray: [3, 2, 3] };
|
|
101
|
+
let property = PropertyFactory.create("autodesk.enum:enums-1.0.0", null, initialValues);
|
|
102
|
+
expect(property.get("enumArray").getValues()).to.deep.equal([3, 2, 3]);
|
|
103
|
+
expect(property.get("enumArray").getEnumStrings(0, 3)).to.deep.equal([
|
|
104
|
+
"tres",
|
|
105
|
+
"dos",
|
|
106
|
+
"tres",
|
|
107
|
+
]);
|
|
104
108
|
});
|
|
105
|
-
it(
|
|
106
|
-
var property = PropertyFactory.create(
|
|
107
|
-
var enumList = property.get(
|
|
108
|
-
expect(enumList).to.have.nested.property(
|
|
109
|
-
expect(enumList).to.have.nested.property(
|
|
110
|
-
expect(enumList).to.have.nested.property(
|
|
109
|
+
it(".getValidEnumList should return expected enum list", function () {
|
|
110
|
+
var property = PropertyFactory.create("autodesk.enum:enums-1.0.0");
|
|
111
|
+
var enumList = property.get("enumArray").getValidEnumList();
|
|
112
|
+
expect(enumList).to.have.nested.property("uno.value", 1);
|
|
113
|
+
expect(enumList).to.have.nested.property("dos.value", 2);
|
|
114
|
+
expect(enumList).to.have.nested.property("tres.value", 3);
|
|
111
115
|
});
|
|
112
116
|
});
|
|
113
117
|
//# sourceMappingURL=enumArrayProperty.spec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enumArrayProperty.spec.js","sourceRoot":"","sources":["../../../src/test/properties/enumArrayProperty.spec.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,IAAI,eAAe,EAAE,GAAG,CAAC;AAEzB,QAAQ,CAAC,mBAAmB,EAAE;IAC1B;;OAEG;IACH,MAAM,CAAC;QACH,GAAG,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC;QACnE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC;QACnD,MAAM,oBAAoB,GAAG;YACzB,QAAQ,EAAE,MAAM;YAChB,UAAU,EAAE;gBACR,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;gBACvB,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;gBACvB,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE;aAC3B;YACD,MAAM,EAAE,gCAAgC;SAC3C,CAAC;QAEF,MAAM,sBAAsB,GAAG;YAC3B,UAAU,EAAE;gBACR;oBACI,OAAO,EAAE,OAAO;oBAChB,EAAE,EAAE,WAAW;oBACf,MAAM,EAAE,gCAAgC;oBACxC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;iBACnB;aACJ;YACD,MAAM,EAAE,2BAA2B;SACtC,CAAC;QAEF,eAAe,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;QAClD,eAAe,CAAC,WAAW,CAAC,sBAAsB,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+BAA+B,EAAE;QAChC,IAAI,QAAQ,GAAG,eAAe,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC;QAEnE,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,GAAG,CAA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QACzD,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QACzD,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview In this file, we will test the functions of a EnumArrayProperty object\n * described in /src/properties/enumArrayProperty.js\n */\nvar PropertyFactory, MSG;\n\ndescribe('EnumArrayProperty', function() {\n /**\n * Get all the objects we need in this test here.\n */\n before(function() {\n MSG = require('@fluid-experimental/property-common').constants.MSG;\n PropertyFactory = require('../..').PropertyFactory;\n const enumUnoDosTresSchema = {\n inherits: 'Enum',\n properties: [\n { id: 'uno', value: 1 },\n { id: 'dos', value: 2 },\n { id: 'tres', value: 3 },\n ],\n typeid: 'autodesk.enum:unoDosTres-1.0.0',\n };\n\n const enumAndEnumArraySchema = {\n properties: [\n {\n context: 'array',\n id: 'enumArray',\n typeid: 'autodesk.enum:unoDosTres-1.0.0',\n value: [2, 1, 2],\n },\n ],\n typeid: 'autodesk.enum:enums-1.0.0',\n };\n\n PropertyFactory._reregister(enumUnoDosTresSchema);\n PropertyFactory._reregister(enumAndEnumArraySchema);\n });\n\n it('Should be able to get a value', function() {\n let property = PropertyFactory.create('autodesk.enum:enums-1.0.0');\n\n expect(property.get('enumArray').get(0)).to.equal(2);\n expect(property.get('enumArray').getEnumString(0)).to.equal('dos');\n });\n\n it('Should be able to getValues', function() {\n let property = PropertyFactory.create('autodesk.enum:enums-1.0.0');\n\n expect(property.get('enumArray').getValues()).to.deep.equal([2, 1, 2]);\n });\n\n it('Should be able to getEnumStrings', function() {\n let property = PropertyFactory.create('autodesk.enum:enums-1.0.0');\n\n expect(property.get('enumArray').getEnumStrings(0, 3)).to.deep.equal(['dos', 'uno', 'dos']);\n });\n\n it('Should be able to set a value using an Enum number', function() {\n let property = PropertyFactory.create('autodesk.enum:enums-1.0.0');\n\n expect(property.get('enumArray').get(0)).to.equal(2);\n property.get('enumArray').set(0, 1);\n expect(property.get('enumArray').get(0)).to.equal(1);\n });\n\n it('Should throw on setting invalid Enum number', function() {\n let property = PropertyFactory.create('autodesk.enum:enums-1.0.0');\n expect(function() {\n property.get('enumArray').set(0, -100);\n }).to.throw(MSG.UNKNOWN_ENUM);\n });\n\n it('Should be able to set a value using an Enum string', function() {\n let property = PropertyFactory.create('autodesk.enum:enums-1.0.0');\n\n expect(property.get('enumArray').get(0)).to.equal(2);\n property.get('enumArray').set(0, 'uno');\n expect(property.get('enumArray').get(0)).to.equal(1);\n });\n\n it('Should throw on setting invalid Enum string', function() {\n let property = PropertyFactory.create('autodesk.enum:enums-1.0.0');\n expect(function() {\n property.get('enumArray').set(0, 'badString');\n }).to.throw(MSG.UNKNOWN_ENUM);\n });\n\n it('Should be able to insert a value using an Enum number', function() {\n let property = PropertyFactory.create('autodesk.enum:enums-1.0.0');\n\n property.get('enumArray').insertRange(2, [1]);\n expect(property.get('enumArray').getValues()).to.deep.equal([2, 1, 1, 2]);\n });\n\n it('Should throw on inserting invalid Enum number', function() {\n let property = PropertyFactory.create('autodesk.enum:enums-1.0.0');\n expect(function() {\n property.get('enumArray').insertRange(0, [-100]);\n }).to.throw(MSG.UNKNOWN_ENUM);\n });\n\n it('Should be able to insert a value using an Enum string', function() {\n let property = PropertyFactory.create('autodesk.enum:enums-1.0.0');\n\n property.get('enumArray').insertRange(2, ['uno']);\n expect(property.get('enumArray').getValues()).to.deep.equal([2, 1, 1, 2]);\n });\n\n it('Should throw on inserting invalid Enum string', function() {\n let property = PropertyFactory.create('autodesk.enum:enums-1.0.0');\n expect(function() {\n property.get('enumArray').insertRange(0, ['badString']);\n }).to.throw(MSG.UNKNOWN_ENUM);\n });\n\n it('Should be able to overide default values on creation with initialValues', function() {\n let initialValues = { 'enumArray': [3, 2, 3] };\n let property = PropertyFactory.create('autodesk.enum:enums-1.0.0', null, initialValues);\n\n expect(property.get('enumArray').getValues()).to.deep.equal([3, 2, 3]);\n expect(property.get('enumArray').getEnumStrings(0, 3)).to.deep.equal(['tres', 'dos', 'tres']);\n });\n\n it('.getValidEnumList should return expected enum list', function() {\n var property = PropertyFactory.create('autodesk.enum:enums-1.0.0');\n var enumList = property.get('enumArray').getValidEnumList();\n expect(enumList).to.have.nested.property('uno.value', 1);\n expect(enumList).to.have.nested.property('dos.value', 2);\n expect(enumList).to.have.nested.property('tres.value', 3);\n });\n});\n"]}
|
|
1
|
+
{"version":3,"file":"enumArrayProperty.spec.js","sourceRoot":"","sources":["../../../src/test/properties/enumArrayProperty.spec.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,IAAI,eAAe,EAAE,GAAG,CAAC;AAEzB,QAAQ,CAAC,mBAAmB,EAAE;IAC7B;;OAEG;IACH,MAAM,CAAC;QACN,GAAG,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC;QACnE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC;QACnD,MAAM,oBAAoB,GAAG;YAC5B,QAAQ,EAAE,MAAM;YAChB,UAAU,EAAE;gBACX,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;gBACvB,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;gBACvB,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE;aACxB;YACD,MAAM,EAAE,gCAAgC;SACxC,CAAC;QAEF,MAAM,sBAAsB,GAAG;YAC9B,UAAU,EAAE;gBACX;oBACC,OAAO,EAAE,OAAO;oBAChB,EAAE,EAAE,WAAW;oBACf,MAAM,EAAE,gCAAgC;oBAC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AI,CAAC,KAAK,CAAC;YACpE,MAAM;YACN,KAAK;YACL,MAAM;SACN,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oDAAoD,EAAE;QACxD,IAAI,QAAQ,GAAG,eAAe,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC;QACnE,IAAI,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,gBAAgB,EAAE,CAAC;QAC5D,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QACzD,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QACzD,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @fileoverview In this file, we will test the functions of a EnumArrayProperty object\n * described in /src/properties/enumArrayProperty.js\n */\nvar PropertyFactory, MSG;\n\ndescribe(\"EnumArrayProperty\", function () {\n\t/**\n\t * Get all the objects we need in this test here.\n\t */\n\tbefore(function () {\n\t\tMSG = require(\"@fluid-experimental/property-common\").constants.MSG;\n\t\tPropertyFactory = require(\"../..\").PropertyFactory;\n\t\tconst enumUnoDosTresSchema = {\n\t\t\tinherits: \"Enum\",\n\t\t\tproperties: [\n\t\t\t\t{ id: \"uno\", value: 1 },\n\t\t\t\t{ id: \"dos\", value: 2 },\n\t\t\t\t{ id: \"tres\", value: 3 },\n\t\t\t],\n\t\t\ttypeid: \"autodesk.enum:unoDosTres-1.0.0\",\n\t\t};\n\n\t\tconst enumAndEnumArraySchema = {\n\t\t\tproperties: [\n\t\t\t\t{\n\t\t\t\t\tcontext: \"array\",\n\t\t\t\t\tid: \"enumArray\",\n\t\t\t\t\ttypeid: \"autodesk.enum:unoDosTres-1.0.0\",\n\t\t\t\t\tvalue: [2, 1, 2],\n\t\t\t\t},\n\t\t\t],\n\t\t\ttypeid: \"autodesk.enum:enums-1.0.0\",\n\t\t};\n\n\t\tPropertyFactory._reregister(enumUnoDosTresSchema);\n\t\tPropertyFactory._reregister(enumAndEnumArraySchema);\n\t});\n\n\tit(\"Should be able to get a value\", function () {\n\t\tlet property = PropertyFactory.create(\"autodesk.enum:enums-1.0.0\");\n\n\t\texpect(property.get(\"enumArray\").get(0)).to.equal(2);\n\t\texpect(property.get(\"enumArray\").getEnumString(0)).to.equal(\"dos\");\n\t});\n\n\tit(\"Should be able to getValues\", function () {\n\t\tlet property = PropertyFactory.create(\"autodesk.enum:enums-1.0.0\");\n\n\t\texpect(property.get(\"enumArray\").getValues()).to.deep.equal([2, 1, 2]);\n\t});\n\n\tit(\"Should be able to getEnumStrings\", function () {\n\t\tlet property = PropertyFactory.create(\"autodesk.enum:enums-1.0.0\");\n\n\t\texpect(property.get(\"enumArray\").getEnumStrings(0, 3)).to.deep.equal([\"dos\", \"uno\", \"dos\"]);\n\t});\n\n\tit(\"Should be able to set a value using an Enum number\", function () {\n\t\tlet property = PropertyFactory.create(\"autodesk.enum:enums-1.0.0\");\n\n\t\texpect(property.get(\"enumArray\").get(0)).to.equal(2);\n\t\tproperty.get(\"enumArray\").set(0, 1);\n\t\texpect(property.get(\"enumArray\").get(0)).to.equal(1);\n\t});\n\n\tit(\"Should throw on setting invalid Enum number\", function () {\n\t\tlet property = PropertyFactory.create(\"autodesk.enum:enums-1.0.0\");\n\t\texpect(function () {\n\t\t\tproperty.get(\"enumArray\").set(0, -100);\n\t\t}).to.throw(MSG.UNKNOWN_ENUM);\n\t});\n\n\tit(\"Should be able to set a value using an Enum string\", function () {\n\t\tlet property = PropertyFactory.create(\"autodesk.enum:enums-1.0.0\");\n\n\t\texpect(property.get(\"enumArray\").get(0)).to.equal(2);\n\t\tproperty.get(\"enumArray\").set(0, \"uno\");\n\t\texpect(property.get(\"enumArray\").get(0)).to.equal(1);\n\t});\n\n\tit(\"Should throw on setting invalid Enum string\", function () {\n\t\tlet property = PropertyFactory.create(\"autodesk.enum:enums-1.0.0\");\n\t\texpect(function () {\n\t\t\tproperty.get(\"enumArray\").set(0, \"badString\");\n\t\t}).to.throw(MSG.UNKNOWN_ENUM);\n\t});\n\n\tit(\"Should be able to insert a value using an Enum number\", function () {\n\t\tlet property = PropertyFactory.create(\"autodesk.enum:enums-1.0.0\");\n\n\t\tproperty.get(\"enumArray\").insertRange(2, [1]);\n\t\texpect(property.get(\"enumArray\").getValues()).to.deep.equal([2, 1, 1, 2]);\n\t});\n\n\tit(\"Should throw on inserting invalid Enum number\", function () {\n\t\tlet property = PropertyFactory.create(\"autodesk.enum:enums-1.0.0\");\n\t\texpect(function () {\n\t\t\tproperty.get(\"enumArray\").insertRange(0, [-100]);\n\t\t}).to.throw(MSG.UNKNOWN_ENUM);\n\t});\n\n\tit(\"Should be able to insert a value using an Enum string\", function () {\n\t\tlet property = PropertyFactory.create(\"autodesk.enum:enums-1.0.0\");\n\n\t\tproperty.get(\"enumArray\").insertRange(2, [\"uno\"]);\n\t\texpect(property.get(\"enumArray\").getValues()).to.deep.equal([2, 1, 1, 2]);\n\t});\n\n\tit(\"Should throw on inserting invalid Enum string\", function () {\n\t\tlet property = PropertyFactory.create(\"autodesk.enum:enums-1.0.0\");\n\t\texpect(function () {\n\t\t\tproperty.get(\"enumArray\").insertRange(0, [\"badString\"]);\n\t\t}).to.throw(MSG.UNKNOWN_ENUM);\n\t});\n\n\tit(\"Should be able to overide default values on creation with initialValues\", function () {\n\t\tlet initialValues = { enumArray: [3, 2, 3] };\n\t\tlet property = PropertyFactory.create(\"autodesk.enum:enums-1.0.0\", null, initialValues);\n\n\t\texpect(property.get(\"enumArray\").getValues()).to.deep.equal([3, 2, 3]);\n\t\texpect(property.get(\"enumArray\").getEnumStrings(0, 3)).to.deep.equal([\n\t\t\t\"tres\",\n\t\t\t\"dos\",\n\t\t\t\"tres\",\n\t\t]);\n\t});\n\n\tit(\".getValidEnumList should return expected enum list\", function () {\n\t\tvar property = PropertyFactory.create(\"autodesk.enum:enums-1.0.0\");\n\t\tvar enumList = property.get(\"enumArray\").getValidEnumList();\n\t\texpect(enumList).to.have.nested.property(\"uno.value\", 1);\n\t\texpect(enumList).to.have.nested.property(\"dos.value\", 2);\n\t\texpect(enumList).to.have.nested.property(\"tres.value\", 3);\n\t});\n});\n"]}
|