feat: mentions and following tickets
Mention project members in comments with @, follow and unfollow tickets, and get told when something changes on the tickets you follow. Commenting on a ticket starts following it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { CommentAddedEvent } from '@task-stream/api/tracker/domain';
|
||||
import { lastValueFrom, of, toArray } from 'rxjs';
|
||||
import { WatchIssueCommand } from '../commands/watch-issue.command';
|
||||
import { CommentersFollowSaga } from './commenters-follow.saga';
|
||||
|
||||
describe('CommentersFollowSaga', () => {
|
||||
it('makes whoever comments follow the ticket', async () => {
|
||||
const event = new CommentAddedEvent('ana', {
|
||||
id: 'c-1',
|
||||
issueId: 'i-1',
|
||||
projectId: 'p-1',
|
||||
authorId: 'ana',
|
||||
body: 'Lo miro',
|
||||
deleted: false,
|
||||
createdAt: '2026-10-08T10:00:00.000Z',
|
||||
editedAt: null,
|
||||
});
|
||||
|
||||
const commands = await lastValueFrom(
|
||||
new CommentersFollowSaga().commented(of(event)).pipe(toArray()),
|
||||
);
|
||||
|
||||
expect(commands).toEqual([new WatchIssueCommand('ana', 'i-1', 'ana')]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user