Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -114,7 +116,6 @@ describe('Contract State Transitions', function describeContractStateTransitions
...existingSchemas,
task: {
type: 'object',
position: 1,
properties: {
title: {
type: 'string',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand All @@ -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,
Expand Down
Loading