Skip to content

feat(parent structure): add method that return note parent structure #838

feat(parent structure): add method that return note parent structure

feat(parent structure): add method that return note parent structure #838

Triggered via pull request September 14, 2024 23:21
Status Failure
Total duration 2m 52s
Artifacts 1

run-tests.yml

on: pull_request
Matrix: tests
report-coverage
0s
report-coverage
Fit to window
Zoom out
Zoom in

Annotations

4 errors and 2 warnings
src/presentation/http/router/note.test.ts > Note API > GET note/:notePublicId > Returns two parents in case of relation between child and parent notes with 200 status: src/presentation/http/router/note.test.ts#L561
AssertionError: expected { …(5) } to match object { parents: { items: [ …(2) ] } } - Expected + Received Object { + "accessRights": Object { + "canEdit": true, + }, + "note": Object { + "content": Object { + "blocks": Array [ + Object { + "data": Object { + "text": "text", + }, + "id": "mJDq8YbvqO", + "type": "paragraph", + }, + Object { + "data": Object { + "level": 2, + "text": "fdgsfdgfdsg", + }, + "id": "DeL0QehzGe", + "type": "header", + }, + ], + }, + "createdAt": "2024-09-14T23:23:36.647Z", + "id": "N8Odn4jM20", + "updatedAt": "2024-09-14T23:23:36.647Z", + }, + "parentNote": Object { + "content": Object { + "blocks": Array [ + Object { + "data": Object { + "text": "text", + }, + "id": "mJDq8YbvqO", + "type": "paragraph", + }, + Object { + "data": Object { + "level": 2, + "text": "fdgsfdgfdsg", + }, + "id": "DeL0QehzGe", + "type": "header", + }, + ], + }, + "createdAt": "2024-09-14T23:23:36.644Z", + "id": "vUQk6UZ-Rz", + "updatedAt": "2024-09-14T23:23:36.644Z", + }, "parents": Object { "items": Array [ Object { "content": Object { "blocks": Array [ Object { "data": Object { "text": "text", }, "id": "mJDq8YbvqO", "type": "paragraph", }, Object { "data": Object { "level": 2, "text": "fdgsfdgfdsg", }, "id": "DeL0QehzGe", "type": "header", }, ], }, - "id": "vUQk6UZ-Rz", + "createdAt": "2024-09-14T23:23:36.644Z", + "id": "1", + "updatedAt": "2024-09-14T23:23:36.644Z", }, Object { "content": Object { "blocks": Array [ Object { "data": Object { "text": "text", }, "id": "mJDq8YbvqO", "type": "paragraph", }, Object { "data": Object { "level": 2, "text": "fdgsfdgfdsg", }, "id": "DeL0QehzGe", "type": "header", }, ], }, - "id": "N8Odn4jM20", + "createdAt": "2024-09-14T23:23:36.647Z", + "id": "2", + "updatedAt": "2024-09-14T23:23:36.647Z", }, ], }, + "tools": Array [ + Object { + "exportName": "Header", + "id": "1", + "isDefault": true, + "name": "header", + "source": Object { + "cdn": "https://cdn.jsdelivr.net/npm/@editorjs/header@2.8.1/dist/header.umd.min.js", + }, + "title": "Heading", + "userId": null, + }, + Object { + "exportName": "Paragraph", + "id": "2", + "isDefault": true, + "name": "paragraph", + "source": Object { + "cdn": "https://cdn.jsdelivr.net/npm/@editorjs/paragraph@2.11.3/dist/paragraph.umd.min.js", + }, + "title": "Paragraph", + "userId": null, + }, + ], } ❯ src/presentation/http/router/note.test.ts:561:32
src/presentation/http/router/note.test.ts > Note API > GET note/:notePublicId > Returns multiple parents in case of multiple notes relations with user presence in team in each note with 200 status: src/presentation/http/router/note.test.ts#L626
AssertionError: expected { …(5) } to match object { parents: { items: [ …(3) ] } } - Expected + Received Object { + "accessRights": Object { + "canEdit": true, + }, + "note": Object { + "content": Object { + "blocks": Array [ + Object { + "data": Object { + "text": "text", + }, + "id": "mJDq8YbvqO", + "type": "paragraph", + }, + Object { + "data": Object { + "level": 2, + "text": "fdgsfdgfdsg", + }, + "id": "DeL0QehzGe", + "type": "header", + }, + ], + }, + "createdAt": "2024-09-14T23:23:36.730Z", + "id": "ELFXi7mN83", + "updatedAt": "2024-09-14T23:23:36.730Z", + }, + "parentNote": Object { + "content": Object { + "blocks": Array [ + Object { + "data": Object { + "text": "text", + }, + "id": "mJDq8YbvqO", + "type": "paragraph", + }, + Object { + "data": Object { + "level": 2, + "text": "fdgsfdgfdsg", + }, + "id": "DeL0QehzGe", + "type": "header", + }, + ], + }, + "createdAt": "2024-09-14T23:23:36.728Z", + "id": "AHzA8V5_uQ", + "updatedAt": "2024-09-14T23:23:36.728Z", + }, "parents": Object { "items": Array [ Object { "content": Object { "blocks": Array [ Object { "data": Object { "text": "text", }, "id": "mJDq8YbvqO", "type": "paragraph", }, Object { "data": Object { "level": 2, "text": "fdgsfdgfdsg", }, "id": "DeL0QehzGe", "type": "header", }, ], }, - "id": "jYpuGWKA34", + "createdAt": "2024-09-14T23:23:36.725Z", + "id": "1", + "updatedAt": "2024-09-14T23:23:36.725Z", }, Object { "content": Object { "blocks": Array [ Object { "data": Object { "text": "text", }, "id": "mJDq8YbvqO", "type": "paragraph", }, Object { "data": Object { "level": 2, "text": "fdgsfdgfdsg", }, "id": "DeL0QehzGe", "type": "header", }, ], }, - "id": "AHzA8V5_uQ", + "createdAt": "2024-09-14T23:23:36.728Z", + "id": "2", + "updatedAt": "2024-09-14T23:23:36.728Z", }, Object { "content": Object { "blocks": Array [ Object { "data": Object { "text": "text", }, "id": "mJDq8YbvqO", "type": "paragraph", }, Object { "data": Object { "level": 2, "text": "fdgsfdgfdsg", }, "id": "DeL0QehzGe", "type": "header", }, ], }, - "id": "ELFXi7mN83", + "createdAt": "2024-09-14T23:23:36.730Z", + "id": "3", + "updatedAt": "2024-09-14T23:23:36.730Z", }, ], }, + "tools": Array [ + Object { + "exportName": "Header", + "id": "1", + "isDefault": true, + "name": "header", + "source": Object { + "cdn": "https://cdn.jsdelivr.net/npm/@editorjs/header@2.8.1/dist/header.umd.min.js", + }, + "title": "Heading", + "userId": null, + }, + Object { + "exportName": "Paragraph", + "id": "2", + "isDefault": true, + "name": "paragraph", + "source": Object { + "cdn": "https://cdn.jsdelivr.net/npm/@editorjs/paragraph@2.11.3/dis
src/presentation/http/router/note.test.ts > Note API > GET note/:notePublicId > Returns one parent in case where there is no note relation with 200 status: src/presentation/http/router/note.test.ts#L673
AssertionError: expected { …(4) } to match object { parents: { items: [ { …(2) } ] } } - Expected + Received Object { + "accessRights": Object { + "canEdit": true, + }, + "note": Object { + "content": Object { + "blocks": Array [ + Object { + "data": Object { + "text": "text", + }, + "id": "mJDq8YbvqO", + "type": "paragraph", + }, + Object { + "data": Object { + "level": 2, + "text": "fdgsfdgfdsg", + }, + "id": "DeL0QehzGe", + "type": "header", + }, + ], + }, + "createdAt": "2024-09-14T23:23:36.803Z", + "id": "Ly4cSxIX9-", + "updatedAt": "2024-09-14T23:23:36.803Z", + }, "parents": Object { "items": Array [ Object { "content": Object { "blocks": Array [ Object { "data": Object { "text": "text", }, "id": "mJDq8YbvqO", "type": "paragraph", }, Object { "data": Object { "level": 2, "text": "fdgsfdgfdsg", }, "id": "DeL0QehzGe", "type": "header", }, ], }, - "id": "Ly4cSxIX9-", + "createdAt": "2024-09-14T23:23:36.803Z", + "id": "1", + "updatedAt": "2024-09-14T23:23:36.803Z", }, ], }, + "tools": Array [ + Object { + "exportName": "Header", + "id": "1", + "isDefault": true, + "name": "header", + "source": Object { + "cdn": "https://cdn.jsdelivr.net/npm/@editorjs/header@2.8.1/dist/header.umd.min.js", + }, + "title": "Heading", + "userId": null, + }, + Object { + "exportName": "Paragraph", + "id": "2", + "isDefault": true, + "name": "paragraph", + "source": Object { + "cdn": "https://cdn.jsdelivr.net/npm/@editorjs/paragraph@2.11.3/dist/paragraph.umd.min.js", + }, + "title": "Paragraph", + "userId": null, + }, + ], } ❯ src/presentation/http/router/note.test.ts:673:32
tests (feat/return-note)
Process completed with exit code 1.
tests (feat/return-note)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/setup-node@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
tests (main)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/setup-node@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/

Artifacts

Produced during runtime
Name Size
coverage-main
97 KB