diff -r 1f340f3597a8 -r ea92f4fe783d client/src/components/__tests__/Note.test.js --- a/client/src/components/__tests__/Note.test.js Tue Oct 09 19:07:47 2018 +0200 +++ b/client/src/components/__tests__/Note.test.js Mon Oct 08 18:35:47 2018 +0200 @@ -2,13 +2,38 @@ import { shallow } from 'enzyme'; import Note from '../Note'; - const setup = propOverrides => { const props = Object.assign({ note: { - id: 'abc', - text: 'test text' - } + _id: 'abc', + session: 'foo', + + plain: 'test text', + raw: { + document: { + nodes: [ + { + object: 'block', + type: 'paragraph', + nodes: [ + { + object: 'text', + leaves: [ + { + text: 'test text', + }, + ], + }, + ], + }, + ], + }, + }, + html: 'test text', + startedAt: Date.now(), + finishedAt: Date.now() + 60000, + }, + isEditing: false }, propOverrides); const wrapper = shallow(); @@ -27,7 +52,7 @@ test('contains note text', () => { const { wrapper } = setup(); - expect(wrapper.text()).toBe('test text'); + expect(wrapper.find('.note-content').render().text()).toBe('test text'); }); test('contains note id', () => { @@ -36,4 +61,4 @@ }); -}); \ No newline at end of file +});