fix: HoverPreview not showing on collaborative editing teams

types
This commit is contained in:
Tom Moor
2021-12-05 19:31:08 -08:00
parent ce2a58e83b
commit 6e371f0d03
13 changed files with 111 additions and 88 deletions

View File

@@ -134,6 +134,7 @@ describe("documentMover", () => {
title: "Child document",
text: `content ![attachment](${attachment.redirectUrl})`,
});
await collection.addDocumentToStructure(newDocument);
await documentMover({
user,
@@ -143,9 +144,11 @@ describe("documentMover", () => {
index: 0,
ip,
});
// check document ids where updated
await newDocument.reload();
expect(newDocument.collectionId).toBe(newCollection.id);
// check new attachment was created pointint to same key
const attachmentIds = parseAttachmentIds(newDocument.text);
const newAttachment = await Attachment.findByPk(attachmentIds[0]);