From 9c8a4cb71e580deba70b5e3888a94d9e15d62445 Mon Sep 17 00:00:00 2001 From: montaghanmy Date: Fri, 15 Sep 2023 15:13:22 +0100 Subject: [PATCH] ref: document tests --- tdrive/backend/node/test/e2e/common/entities/mock_entities.ts | 1 + tdrive/backend/node/test/e2e/documents/documents.spec.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tdrive/backend/node/test/e2e/common/entities/mock_entities.ts b/tdrive/backend/node/test/e2e/common/entities/mock_entities.ts index a98737ebd..a6edb0fcb 100644 --- a/tdrive/backend/node/test/e2e/common/entities/mock_entities.ts +++ b/tdrive/backend/node/test/e2e/common/entities/mock_entities.ts @@ -29,6 +29,7 @@ export class DriveFileMockClass { access_info: MockAccessInformation; creator: string; is_directory: boolean; + scope: "personal" | "shared"; created_by: Record; shared_by: Record; } diff --git a/tdrive/backend/node/test/e2e/documents/documents.spec.ts b/tdrive/backend/node/test/e2e/documents/documents.spec.ts index 36407fe4b..1aadb0255 100644 --- a/tdrive/backend/node/test/e2e/documents/documents.spec.ts +++ b/tdrive/backend/node/test/e2e/documents/documents.spec.ts @@ -59,11 +59,12 @@ describe("the Drive feature", () => { const createItem = async (): Promise => { await TestDbService.getInstance(platform, true); - + const scope: "personal" | "shared" = "shared"; const item = { name: "new test file", parent_id: "root", company_id: platform.workspace.company_id, + scope, }; const version = {}; @@ -143,6 +144,7 @@ describe("the Drive feature", () => { ); expect(listTrashResult.item.name).toEqual("Trash"); + expect(createItemResult.scope).toEqual("shared"); expect(listTrashResult.children.some(({ id }) => id === createItemResult.id)).toBeTruthy(); });