summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-10-05 09:31:03 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-10-05 09:31:03 +0900
commitd2bb35bcf3340a7ab72395ff35670db10fb4c772 (patch)
treea19bccf5590922e2a8a84b44ca3aafc467cddf0b
parentfix(frontend): クライアント設定から13.7.0で削除されたチャ... (diff)
downloadmisskey-d2bb35bcf3340a7ab72395ff35670db10fb4c772.tar.gz
misskey-d2bb35bcf3340a7ab72395ff35670db10fb4c772.tar.bz2
misskey-d2bb35bcf3340a7ab72395ff35670db10fb4c772.zip
add more tests
-rw-r--r--packages/backend/test/e2e/timelines.ts41
1 files changed, 41 insertions, 0 deletions
diff --git a/packages/backend/test/e2e/timelines.ts b/packages/backend/test/e2e/timelines.ts
index a82be6365a..8bd6f0d195 100644
--- a/packages/backend/test/e2e/timelines.ts
+++ b/packages/backend/test/e2e/timelines.ts
@@ -363,6 +363,21 @@ describe('Timelines', () => {
assert.strictEqual(res.body.some((note: any) => note.id === carolNote1.id), false);
assert.strictEqual(res.body.some((note: any) => note.id === carolNote2.id), false);
}, 1000 * 10);
+
+ test.concurrent('フォローしているユーザーのチャンネル投稿が含まれない', async () => {
+ const [alice, bob] = await Promise.all([signup(), signup()]);
+
+ const channel = await api('/channels/create', { name: 'channel' }, bob).then(x => x.body);
+ await api('/following/create', { userId: bob.id }, alice);
+ await sleep(1000);
+ const bobNote = await post(bob, { text: 'hi', channelId: channel.id });
+
+ await waitForPushToTl();
+
+ const res = await api('/notes/timeline', {}, alice);
+
+ assert.strictEqual(res.body.some((note: any) => note.id === bobNote.id), false);
+ });
});
describe('Local TL', () => {
@@ -380,6 +395,19 @@ describe('Timelines', () => {
assert.strictEqual(res.body.some((note: any) => note.id === carolNote.id), false);
});
+ test.concurrent('チャンネル投稿が含まれない', async () => {
+ const [alice, bob] = await Promise.all([signup(), signup()]);
+
+ const channel = await api('/channels/create', { name: 'channel' }, bob).then(x => x.body);
+ const bobNote = await post(bob, { text: 'hi', channelId: channel.id });
+
+ await waitForPushToTl();
+
+ const res = await api('/notes/local-timeline', {}, alice);
+
+ assert.strictEqual(res.body.some((note: any) => note.id === bobNote.id), false);
+ });
+
test.concurrent('リモートユーザーのノートが含まれない', async () => {
const [alice, bob] = await Promise.all([signup(), signup({ host: genHost() })]);
@@ -776,6 +804,19 @@ describe('Timelines', () => {
assert.strictEqual(res.body.find((note: any) => note.id === bobNote.id).text, 'hi');
});
+ test.concurrent('チャンネル投稿が含まれない', async () => {
+ const [alice, bob] = await Promise.all([signup(), signup()]);
+
+ const channel = await api('/channels/create', { name: 'channel' }, bob).then(x => x.body);
+ const bobNote = await post(bob, { text: 'hi', channelId: channel.id });
+
+ await waitForPushToTl();
+
+ const res = await api('/users/notes', { userId: bob.id }, alice);
+
+ assert.strictEqual(res.body.some((note: any) => note.id === bobNote.id), false);
+ });
+
test.concurrent('[withReplies: false] 他人への返信が含まれない', async () => {
const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);