mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-03 23:14:13 +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);
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
		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 () => {
 | 
			
		||||
			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);
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
		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 () => {
 | 
			
		||||
			const [alice, bob, carol] = await Promise.all([signup(), signup(), signup()]);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue