summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-10-04 14:47:45 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-10-04 14:47:45 +0900
commitfb6a5c835697ef9f80bfe74cf82e2e0342ccbbbc (patch)
treedf69bf5d9c7054bad74dd60519d7e63d0af31f8e
parentfix test (diff)
downloadsharkey-fb6a5c835697ef9f80bfe74cf82e2e0342ccbbbc.tar.gz
sharkey-fb6a5c835697ef9f80bfe74cf82e2e0342ccbbbc.tar.bz2
sharkey-fb6a5c835697ef9f80bfe74cf82e2e0342ccbbbc.zip
add more test
-rw-r--r--packages/backend/test/e2e/timelines.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/backend/test/e2e/timelines.ts b/packages/backend/test/e2e/timelines.ts
index edb0b684ba..4cdecb9a05 100644
--- a/packages/backend/test/e2e/timelines.ts
+++ b/packages/backend/test/e2e/timelines.ts
@@ -770,6 +770,21 @@ describe('Timelines', () => {
assert.strictEqual(res.body.some((note: any) => note.id === bobNote2.id), true);
});
+ test.concurrent('[withReplies: true] 他人への visibility: specified な返信が含まれない', async () => {
+ const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);
+
+ const carolNote = await post(carol, { text: 'hi' });
+ const bobNote1 = await post(bob, { text: 'hi' });
+ const bobNote2 = await post(bob, { text: 'hi', replyId: carolNote.id, visibility: 'specified' });
+
+ await sleep(100); // redisに追加されるのを待つ
+
+ const res = await api('/users/notes', { userId: bob.id, withReplies: true }, alice);
+
+ assert.strictEqual(res.body.some((note: any) => note.id === bobNote1.id), true);
+ assert.strictEqual(res.body.some((note: any) => note.id === bobNote2.id), false);
+ });
+
test.concurrent('[withFiles: true] ファイル付きノートのみ含まれる', async () => {
const [alice, bob] = await Promise.all([signup(), signup()]);