From 610c8cf7a0da518ee18a9a7e96d9dead5a6b7041 Mon Sep 17 00:00:00 2001 From: anatawa12 Date: Wed, 17 Apr 2024 11:10:06 +0900 Subject: [PATCH] =?UTF-8?q?test:=20LTL/GTL=E3=81=A7=E3=81=AE=E3=83=AA?= =?UTF-8?q?=E3=83=8E=E3=83=BC=E3=83=88=E3=81=AE=E3=83=9F=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/test/e2e/streaming.ts | 47 ++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/packages/backend/test/e2e/streaming.ts b/packages/backend/test/e2e/streaming.ts index b0a70074c6a3..41804d316109 100644 --- a/packages/backend/test/e2e/streaming.ts +++ b/packages/backend/test/e2e/streaming.ts @@ -74,6 +74,9 @@ describe('Streaming', () => { // Mute: chitose => kanako await api('mute/create', { userId: kanako.id }, chitose); + // Renote Mute: chitose => kyoko + await api('renote-mute/create', { userId: kyoko.id }, chitose); + // List: chitose => ayano, kyoko list = await api('users/lists/create', { name: 'my list', @@ -371,6 +374,28 @@ describe('Streaming', () => { assert.strictEqual(fired, false); }); + + // #12956 + test('リノートをミュートしているローカルユーザーの通常ノートのリノートが流れてくる', async () => { + const fired = await waitFire( + chitose, 'globalTimeline', // chitose:Global + () => api('notes/create', { renoteId: kyokoNote.id }, takumi), // takumi posts + msg => msg.type === 'note' && msg.body.userId === takumi.id, // takumi ayano + ); + + assert.strictEqual(fired, true); + }); + + // #12956 + test('リノートをミュートしているローカルユーザーのリノートが流れてこない', async () => { + const fired = await waitFire( + chitose, 'globalTimeline', // chitose:Global + () => api('notes/create', { renoteId: takumiNote.id }, kyoko), // kyoko posts + msg => msg.type === 'note' && msg.body.userId === kyoko.id, // wait kyoko + ); + + assert.strictEqual(fired, false); + }); }); describe('Hybrid Timeline', () => { @@ -519,6 +544,28 @@ describe('Streaming', () => { assert.strictEqual(fired, true); }); + + // #12956 + test('リノートをミュートしている人の通常ノートのリノートが流れてくる', async () => { + const fired = await waitFire( + chitose, 'globalTimeline', // chitose:Global + () => api('notes/create', { renoteId: kyokoNote.id }, takumi), // takumi posts + msg => msg.type === 'note' && msg.body.userId === takumi.id, // takumi ayano + ); + + assert.strictEqual(fired, true); + }); + + // #12956 + test('リノートをミュートしている人のリノートが流れてこない', async () => { + const fired = await waitFire( + chitose, 'globalTimeline', // chitose:Global + () => api('notes/create', { renoteId: takumiNote.id }, kyoko), // kyoko posts + msg => msg.type === 'note' && msg.body.userId === kyoko.id, // wait kyoko + ); + + assert.strictEqual(fired, false); + }); }); describe('UserList Timeline', () => {