From eb4278dd737f89663c6476ea48fc0dfc55891488 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Tue, 22 Sep 2020 17:53:17 +0200 Subject: [PATCH] Update Note E2E tests to use new `getNoteDtoByIdOrAlias` method Signed-off-by: David Mehren --- test/public-api/notes.e2e-spec.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/public-api/notes.e2e-spec.ts b/test/public-api/notes.e2e-spec.ts index 3446c0f44..1bc920410 100644 --- a/test/public-api/notes.e2e-spec.ts +++ b/test/public-api/notes.e2e-spec.ts @@ -27,7 +27,8 @@ describe('Notes', () => { .expect(201); expect(response.body.metadata?.id).toBeDefined(); expect( - notesService.getNoteByIdOrAlias(response.body.metadata.id).content, + (await notesService.getNoteDtoByIdOrAlias(response.body.metadata.id)) + .content, ).toEqual(newNote); }); @@ -49,7 +50,8 @@ describe('Notes', () => { .expect(201); expect(response.body.metadata?.id).toBeDefined(); return expect( - notesService.getNoteByIdOrAlias(response.body.metadata.id).content, + (await notesService.getNoteDtoByIdOrAlias(response.body.metadata.id)) + .content, ).toEqual(newNote); }); @@ -67,9 +69,9 @@ describe('Notes', () => { .put('/notes/test4') .send('New note text') .expect(200); - return expect(notesService.getNoteByIdOrAlias('test4').content).toEqual( - 'New note text', - ); + return expect( + (await notesService.getNoteDtoByIdOrAlias('test4')).content, + ).toEqual('New note text'); }); it.skip(`PUT /notes/{note}/metadata`, () => {