Skip to content

Commit

Permalink
test: LTL/GTLでのリノートのミュート
Browse files Browse the repository at this point in the history
  • Loading branch information
anatawa12 committed Apr 17, 2024
1 parent 9b4d3e7 commit 610c8cf
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions packages/backend/test/e2e/streaming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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', () => {
Expand Down Expand Up @@ -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', () => {
Expand Down

0 comments on commit 610c8cf

Please sign in to comment.