From d1cf7b0d9196e63260ff1c7eb3318a47c2bbc9c3 Mon Sep 17 00:00:00 2001 From: Conrad Chan Date: Thu, 16 Apr 2020 17:26:33 -0700 Subject: [PATCH] chore: fix mocked data --- src/region/__mocks__/data.ts | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/src/region/__mocks__/data.ts b/src/region/__mocks__/data.ts index 479bedc7b..97bb9a561 100644 --- a/src/region/__mocks__/data.ts +++ b/src/region/__mocks__/data.ts @@ -17,34 +17,31 @@ export const rect = { export const target = { id: 'target_1', + location: { + type: 'page' as const, + value: 1, + }, shape: rect, type: 'region' as const, }; +export const user = { + id: '1', + login: 'johndoe', + name: 'John Doe', + type: 'user' as const, +}; + export const annotation = { - created_at: new Date(), - created_by: { - id: '1', - login: 'johndoe', - name: 'John Doe', - type: 'user' as const, - }, + created_at: new Date('2020-04-15'), + created_by: user, id: '123', - modified_at: new Date(), - modified_by: { - id: '1', - login: 'johndoe', - name: 'John Doe', - type: 'user' as const, - }, + modified_at: new Date('2020-04-16'), + modified_by: user, permissions: { can_delete: true, can_edit: true, }, - target: { - location: { type: 'page' as const, value: 1 }, - shape: { height: 10, width: 10, x: 10, y: 10, type: 'rect' as const }, - type: 'region' as const, - }, + target, type: 'annotation' as const, };