Merge main into notification filters
linter / quality (pull_request) Successful in 3m31s
tests / ci (8.4) (pull_request) Successful in 2m0s

This commit is contained in:
2026-04-29 10:41:51 +00:00
28 changed files with 700 additions and 192 deletions
@@ -131,27 +131,27 @@ class TicketCreatedNotificationDispatchTest extends TestCase
Queue::assertPushed(DeliverNotificationAction::class, 3);
Queue::assertPushed(DeliverNotificationAction::class, function (DeliverNotificationAction $job) use ($webhookAction, $project, $ticket, $user, $backlogStatus): bool {
return $job->notificationActionId === $webhookAction->id
&& $job->payload->projectId === $project->id
&& $job->payload->projectKey === 'CORE'
&& $job->payload->projectName === 'Core Platform'
&& $job->payload->ticketId === $ticket->id
&& $job->payload->ticketKey === $ticket->ticket_key
&& $job->payload->ticketTitle === 'Trigger ticket created notification'
&& $job->payload->ticketUrl === route('projects.tickets.show', [$project, $ticket])
&& $job->payload->actorId === $user->id
&& $job->payload->actorName === 'Erica Example'
&& $job->payload->fromStatusId === null
&& $job->payload->fromStatusLabel === null
&& $job->payload->toStatusId === $backlogStatus->id
&& $job->payload->toStatusLabel === 'Backlog'
&& $job->payload->eventType === NotificationEventType::TicketCreate
&& $job->event->payload()->projectId === $project->id
&& $job->event->payload()->projectKey === 'CORE'
&& $job->event->payload()->projectName === 'Core Platform'
&& $job->event->payload()->ticketId === $ticket->id
&& $job->event->payload()->ticketKey === $ticket->ticket_key
&& $job->event->payload()->ticketTitle === 'Trigger ticket created notification'
&& $job->event->payload()->ticketUrl === route('projects.tickets.show', [$project, $ticket])
&& $job->event->payload()->actorId === $user->id
&& $job->event->payload()->actorName === 'Erica Example'
&& $job->event->payload()->fromStatusId === null
&& $job->event->payload()->fromStatusLabel === null
&& $job->event->payload()->toStatusId === $backlogStatus->id
&& $job->event->payload()->toStatusLabel === 'Backlog'
&& $job->event->eventType() === NotificationEventType::TicketCreate
&& $job->notificationDeliveryLogId !== null;
});
Queue::assertPushed(DeliverNotificationAction::class, fn (DeliverNotificationAction $job): bool => $job->notificationActionId === $discordAction->id
&& $job->payload->eventType === NotificationEventType::TicketCreate
&& $job->event->eventType() === NotificationEventType::TicketCreate
&& $job->notificationDeliveryLogId !== null);
Queue::assertPushed(DeliverNotificationAction::class, fn (DeliverNotificationAction $job): bool => $job->notificationActionId === $filterNotExistsAction->id
&& $job->payload->eventType === NotificationEventType::TicketCreate
&& $job->event->eventType() === NotificationEventType::TicketCreate
&& $job->notificationDeliveryLogId !== null);
Queue::assertNotPushed(DeliverNotificationAction::class, fn (DeliverNotificationAction $job): bool => $job->notificationActionId === $disabledAction->id);
Queue::assertNotPushed(DeliverNotificationAction::class, fn (DeliverNotificationAction $job): bool => $job->notificationActionId === $statusChangedAction->id);