diff options
| author | zyoshoka <107108195+zyoshoka@users.noreply.github.com> | 2024-03-07 09:51:57 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-07 09:51:57 +0900 |
| commit | 412e9f284dce4167304a57c905f3cd8e9438b128 (patch) | |
| tree | 6357365b4a17d3c2be111a3cf14e1debea8d8993 /packages/backend/test/e2e | |
| parent | enhance(frontend): リアクションの総数を表示するように (#13532) (diff) | |
| download | misskey-412e9f284dce4167304a57c905f3cd8e9438b128.tar.gz misskey-412e9f284dce4167304a57c905f3cd8e9438b128.tar.bz2 misskey-412e9f284dce4167304a57c905f3cd8e9438b128.zip | |
test(backend): enable typecheck by workflow (#13526)
Diffstat (limited to 'packages/backend/test/e2e')
| -rw-r--r-- | packages/backend/test/e2e/note.ts | 8 | ||||
| -rw-r--r-- | packages/backend/test/e2e/timelines.ts | 20 |
2 files changed, 23 insertions, 5 deletions
diff --git a/packages/backend/test/e2e/note.ts b/packages/backend/test/e2e/note.ts index 973bcbd750..11016f58ae 100644 --- a/packages/backend/test/e2e/note.ts +++ b/packages/backend/test/e2e/note.ts @@ -472,7 +472,7 @@ describe('Note', () => { priority: 0, value: true, }, - }, + } as any, }, alice); assert.strictEqual(res.status, 200); @@ -784,7 +784,7 @@ describe('Note', () => { priority: 1, value: 0, }, - }, + } as any, }, alice); assert.strictEqual(res.status, 200); @@ -838,7 +838,7 @@ describe('Note', () => { priority: 1, value: 0, }, - }, + } as any, }, alice); assert.strictEqual(res.status, 200); @@ -894,7 +894,7 @@ describe('Note', () => { priority: 1, value: 1, }, - }, + } as any, }, alice); assert.strictEqual(res.status, 200); diff --git a/packages/backend/test/e2e/timelines.ts b/packages/backend/test/e2e/timelines.ts index d413703ede..5487292afc 100644 --- a/packages/backend/test/e2e/timelines.ts +++ b/packages/backend/test/e2e/timelines.ts @@ -890,17 +890,35 @@ describe('Timelines', () => { const list = await api('users/lists/create', { name: 'list' }, alice).then(res => res.body); await api('users/lists/push', { listId: list.id, userId: bob.id }, alice); + await api('users/lists/update-membership', { listId: list.id, userId: bob.id, withReplies: false }, alice); await sleep(1000); const aliceNote = await post(alice, { text: 'hi' }); const bobNote = await post(bob, { text: 'hi', replyId: aliceNote.id }); await waitForPushToTl(); - const res = await api('notes/user-list-timeline', { listId: list.id, withReplies: false }, alice); + const res = await api('notes/user-list-timeline', { listId: list.id }, alice); assert.strictEqual(res.body.some((note: any) => note.id === bobNote.id), true); }); + test.concurrent('withReplies: false でリスインしているフォローしていないユーザーの他人への返信が含まれない', async () => { + const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]); + + const list = await api('users/lists/create', { name: 'list' }, alice).then(res => res.body); + await api('users/lists/push', { listId: list.id, userId: bob.id }, alice); + await api('users/lists/update-membership', { listId: list.id, userId: bob.id, withReplies: false }, alice); + await sleep(1000); + const carolNote = await post(carol, { text: 'hi' }); + const bobNote = await post(bob, { text: 'hi', replyId: carolNote.id }); + + await waitForPushToTl(); + + const res = await api('notes/user-list-timeline', { listId: list.id }, alice); + + assert.strictEqual(res.body.some((note: any) => note.id === bobNote.id), false); + }); + test.concurrent('withReplies: true でリスインしているフォローしていないユーザーの他人への返信が含まれる', async () => { const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]); |