Skip to content

Commit 3137c10

Browse files
authored
test: フォローしていないユーザーからの自分への返信が含まれることを確認するテストを追加 (#14333)
1 parent 63f9c27 commit 3137c10

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

packages/backend/test/e2e/timelines.ts

+30
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,21 @@ describe('Timelines', () => {
703703
assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
704704
});
705705

706+
test.concurrent('withReplies: false でフォローしていないユーザーからの自分への返信が含まれる', async () => {
707+
const [alice, bob] = await Promise.all([signup(), signup()]);
708+
709+
await setTimeout(1000);
710+
const aliceNote = await post(alice, { text: 'hi' });
711+
const bobNote = await post(bob, { text: 'hi', replyId: aliceNote.id });
712+
713+
await waitForPushToTl();
714+
715+
const res = await api('notes/local-timeline', { limit: 100 }, alice);
716+
717+
assert.strictEqual(res.body.some(note => note.id === aliceNote.id), true);
718+
assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
719+
});
720+
706721
test.concurrent('[withReplies: true] 他人の他人への返信が含まれる', async () => {
707722
const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);
708723

@@ -899,6 +914,21 @@ describe('Timelines', () => {
899914
assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
900915
});
901916

917+
test.concurrent('withReplies: false でフォローしていないユーザーからの自分への返信が含まれる', async () => {
918+
const [alice, bob] = await Promise.all([signup(), signup()]);
919+
920+
await setTimeout(1000);
921+
const aliceNote = await post(alice, { text: 'hi' });
922+
const bobNote = await post(bob, { text: 'hi', replyId: aliceNote.id });
923+
924+
await waitForPushToTl();
925+
926+
const res = await api('notes/local-timeline', { limit: 100 }, alice);
927+
928+
assert.strictEqual(res.body.some(note => note.id === aliceNote.id), true);
929+
assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
930+
});
931+
902932
test.concurrent('[withReplies: true] 他人の他人への返信が含まれる', async () => {
903933
const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);
904934

0 commit comments

Comments
 (0)