Skip to content

Commit

Permalink
fix snapshot nested sequence schema (#17698)
Browse files Browse the repository at this point in the history
## Description

This PR fixes the schema in the nested sequence test in our snapshot
tests.
  • Loading branch information
daesunp committed Oct 10, 2023
1 parent 96d9e2a commit ce11ba9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Expand Up @@ -9,7 +9,7 @@
"tree": {
"String": {
"type": 2,
"content": "{\"trunk\":[{\"change\":{\"maxId\":1,\"changes\":[{\"fieldKey\":\"rootFieldKey\",\"fieldKind\":\"Sequence\",\"change\":[{\"type\":\"Insert\",\"count\":1,\"content\":[{\"type\":\"SeqMap\"}],\"cellId\":{\"localId\":0},\"changes\":{\"fieldChanges\":[{\"fieldKey\":\"foo\",\"fieldKind\":\"Sequence\",\"change\":[{\"type\":\"Insert\",\"count\":1,\"content\":[{\"type\":\"SeqMap\"}],\"cellId\":{\"localId\":1}}]}]}}]}]},\"revision\":\"beefbeef-beef-4000-8000-000000000004\",\"sequenceNumber\":-9007199254740990,\"sessionId\":\"beefbeef-beef-4000-8000-000000000001\"}],\"branches\":[]}"
"content": "{\"trunk\":[{\"change\":{\"maxId\":1,\"changes\":[{\"fieldKey\":\"rootFieldKey\",\"fieldKind\":\"Sequence\",\"change\":[{\"type\":\"Insert\",\"count\":1,\"content\":[{\"type\":\"has-sequence-map.SeqMap\"}],\"cellId\":{\"localId\":0},\"changes\":{\"fieldChanges\":[{\"fieldKey\":\"foo\",\"fieldKind\":\"Sequence\",\"change\":[{\"type\":\"Insert\",\"count\":1,\"content\":[{\"type\":\"has-sequence-map.SeqMap\"}],\"cellId\":{\"localId\":1}}]}]}}]}]},\"revision\":\"beefbeef-beef-4000-8000-000000000004\",\"sequenceNumber\":-9007199254740990,\"sessionId\":\"beefbeef-beef-4000-8000-000000000001\"}],\"branches\":[]}"
}
}
},
Expand All @@ -27,7 +27,7 @@
"tree": {
"ForestTree": {
"type": 2,
"content": "[[\"rootFieldKey\",[{\"type\":\"SeqMap\",\"fields\":{\"foo\":[{\"type\":\"SeqMap\"}]}}]]]"
"content": "[[\"rootFieldKey\",[{\"type\":\"has-sequence-map.SeqMap\",\"fields\":{\"foo\":[{\"type\":\"has-sequence-map.SeqMap\"}]}}]]]"
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions experimental/dds/tree2/src/test/snapshots/testTrees.ts
Expand Up @@ -162,7 +162,7 @@ export function generateTestTrees(): { name: string; tree: () => ISharedTree }[]
parent: undefined,
field: rootFieldKey,
})
.insert(0, [singleTextCursor({ type: brand("SeqMap") })]);
.insert(0, [singleTextCursor({ type: seqMapSchema.name })]);
// The nested change
view.editor
.sequenceField({
Expand All @@ -173,7 +173,7 @@ export function generateTestTrees(): { name: string; tree: () => ISharedTree }[]
},
field: brand("foo"),
})
.insert(0, [singleTextCursor({ type: brand("SeqMap") })]);
.insert(0, [singleTextCursor({ type: seqMapSchema.name })]);
view.transaction.commit();
return tree;
},
Expand Down

0 comments on commit ce11ba9

Please sign in to comment.