mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-29 09:23:04 +00:00
test: フォローしていないユーザーからの自分への返信が含まれることを確認するテストを追加 (#14333)
This commit is contained in:
parent
63f9c271ca
commit
3137c104f2
1 changed files with 30 additions and 0 deletions
|
@ -703,6 +703,21 @@ describe('Timelines', () => {
|
||||||
assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
|
assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test.concurrent('withReplies: false でフォローしていないユーザーからの自分への返信が含まれる', async () => {
|
||||||
|
const [alice, bob] = await Promise.all([signup(), signup()]);
|
||||||
|
|
||||||
|
await setTimeout(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/local-timeline', { limit: 100 }, alice);
|
||||||
|
|
||||||
|
assert.strictEqual(res.body.some(note => note.id === aliceNote.id), true);
|
||||||
|
assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
|
||||||
|
});
|
||||||
|
|
||||||
test.concurrent('[withReplies: true] 他人の他人への返信が含まれる', async () => {
|
test.concurrent('[withReplies: true] 他人の他人への返信が含まれる', async () => {
|
||||||
const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);
|
const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);
|
||||||
|
|
||||||
|
@ -899,6 +914,21 @@ describe('Timelines', () => {
|
||||||
assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
|
assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test.concurrent('withReplies: false でフォローしていないユーザーからの自分への返信が含まれる', async () => {
|
||||||
|
const [alice, bob] = await Promise.all([signup(), signup()]);
|
||||||
|
|
||||||
|
await setTimeout(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/local-timeline', { limit: 100 }, alice);
|
||||||
|
|
||||||
|
assert.strictEqual(res.body.some(note => note.id === aliceNote.id), true);
|
||||||
|
assert.strictEqual(res.body.some(note => note.id === bobNote.id), true);
|
||||||
|
});
|
||||||
|
|
||||||
test.concurrent('[withReplies: true] 他人の他人への返信が含まれる', async () => {
|
test.concurrent('[withReplies: true] 他人の他人への返信が含まれる', async () => {
|
||||||
const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);
|
const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue