From 9c4ebfb4e48ba10503b8923f0cd1698b959b9492 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 11 Mar 2021 01:18:46 +0100 Subject: [PATCH] todo: update TodoList test Signed-off-by: Patrik Oldsberg --- .../todo/src/components/TodoList/TodoList.test.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/plugins/todo/src/components/TodoList/TodoList.test.tsx b/plugins/todo/src/components/TodoList/TodoList.test.tsx index 2f44b36673..bd90f40215 100644 --- a/plugins/todo/src/components/TodoList/TodoList.test.tsx +++ b/plugins/todo/src/components/TodoList/TodoList.test.tsx @@ -26,9 +26,16 @@ describe('TodoList', () => { it('should render', async () => { const mockApi: jest.Mocked = { listTodos: jest.fn().mockResolvedValue({ - items: [{ text: 'My TODO' }], + items: [ + { + text: 'My TODO', + viewUrl: 'https://example.com', + repoFilePath: '/my-file.js', + }, + ], totalCount: 1, - cursors: { prev: 'prev', self: 'self', next: 'next' }, + limit: 10, + offset: 0, }), }; const mockEntity = { metadata: { name: 'mock' } } as Entity; @@ -41,6 +48,6 @@ describe('TodoList', () => { , ); - await expect(rendered.findByText('My TODO')).resolves.toBeInTheDocument(); + await expect(rendered.findByText('1-1 of 1')).resolves.toBeInTheDocument(); }); });