diff --git a/packages/wasm-sdk/tests/functional/transitions/contracts.spec.ts b/packages/wasm-sdk/tests/functional/transitions/contracts.spec.ts index ee7913fc5d2..c6005128016 100644 --- a/packages/wasm-sdk/tests/functional/transitions/contracts.spec.ts +++ b/packages/wasm-sdk/tests/functional/transitions/contracts.spec.ts @@ -39,12 +39,14 @@ describe('Contract State Transitions', function describeContractStateTransitions // Contract operations require at least HIGH security level (key index 2) const { signer, identityKey } = createTestSignerAndKey(sdk, 1, 2); - // Create a simple test schema with a "note" document type - // Position property is required for document types and their properties + // Create a simple test schema with a "note" document type. + // `position` is required on each *property* (to order fields in the + // document row) — it is NOT a valid key on the document-type root. + // Under protocol v12 the document meta-schema is strict + // (`additionalProperties: false`) and rejects stray root-level keys. const schema = { note: { type: 'object', - position: 0, properties: { message: { type: 'string', @@ -114,7 +116,6 @@ describe('Contract State Transitions', function describeContractStateTransitions ...existingSchemas, task: { type: 'object', - position: 1, properties: { title: { type: 'string', diff --git a/packages/wasm-sdk/tests/functional/transitions/documents.spec.ts b/packages/wasm-sdk/tests/functional/transitions/documents.spec.ts index 2b5d5457541..fc4ac99aa32 100644 --- a/packages/wasm-sdk/tests/functional/transitions/documents.spec.ts +++ b/packages/wasm-sdk/tests/functional/transitions/documents.spec.ts @@ -78,13 +78,15 @@ describe('Document State Transitions', function describeDocumentStateTransitions // Contract operations require at least HIGH security level (key index 2) const { signer, identityKey } = createTestSignerAndKey(sdk, 1, 2); - // Create a schema with mutable, deletable, and transferable document types - // Position property is required for document types and properties + // Create a schema with mutable, deletable, and transferable document types. + // `position` is required on each *property* (to order fields in the + // document row) — it is NOT a valid key on the document-type root. + // Under protocol v12 the document meta-schema is strict + // (`additionalProperties: false`) and rejects stray root-level keys. const schema = { // Mutable document type - can be updated mutableNote: { type: 'object', - position: 0, documentsMutable: true, canBeDeleted: true, properties: { @@ -101,7 +103,6 @@ describe('Document State Transitions', function describeDocumentStateTransitions // transferable: 1 = Always transferable (see Transferable enum in DPP) transferableItem: { type: 'object', - position: 1, transferable: 1, documentsMutable: false, canBeDeleted: false,