feat(ui): add Node column + filter to NotificationOutbox grid
This commit is contained in:
@@ -149,6 +149,45 @@ public class NotificationOutboxActorQueryTests : TestKit
|
||||
1, 50, Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Query_PassesSourceNodeFilter_AndProjectsSourceNodeOntoSummary()
|
||||
{
|
||||
// Task 16: the Notifications page's new Node filter input pushes a
|
||||
// value into NotificationOutboxQueryRequest.SourceNodeFilter; the actor
|
||||
// must thread it onto NotificationOutboxFilter.SourceNode AND mirror
|
||||
// the row's SourceNode column onto the response summaries.
|
||||
var row = MakeNotification(status: NotificationStatus.Pending);
|
||||
row.SourceNode = "central-a";
|
||||
_repository.QueryAsync(
|
||||
Arg.Any<NotificationOutboxFilter>(), Arg.Any<int>(), Arg.Any<int>(), Arg.Any<CancellationToken>())
|
||||
.Returns(((IReadOnlyList<Notification>)new[] { row }, 1));
|
||||
var actor = CreateActor();
|
||||
|
||||
actor.Tell(
|
||||
new NotificationOutboxQueryRequest(
|
||||
CorrelationId: "corr-node",
|
||||
StatusFilter: null,
|
||||
TypeFilter: null,
|
||||
SourceSiteFilter: null,
|
||||
ListNameFilter: null,
|
||||
StuckOnly: false,
|
||||
SubjectKeyword: null,
|
||||
From: null,
|
||||
To: null,
|
||||
PageNumber: 1,
|
||||
PageSize: 50,
|
||||
SourceNodeFilter: "central-a"),
|
||||
TestActor);
|
||||
|
||||
var response = ExpectMsg<NotificationOutboxQueryResponse>();
|
||||
Assert.True(response.Success);
|
||||
Assert.Equal("central-a", response.Notifications.Single().SourceNode);
|
||||
|
||||
_repository.Received(1).QueryAsync(
|
||||
Arg.Is<NotificationOutboxFilter>(f => f.SourceNode == "central-a"),
|
||||
1, 50, Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Query_RepositoryThrows_RepliesFailureWithEmptyList()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user