feat(ui): add Node column + filter to SiteCalls grid
This commit is contained in:
@@ -223,6 +223,43 @@ public class SiteCallAuditActorTests : TestKit, IClassFixture<MsSqlMigrationFixt
|
||||
Assert.Equal(response.SiteCalls[^1].TrackedOperationId, response.NextAfterId);
|
||||
}
|
||||
|
||||
[SkippableFact]
|
||||
public async Task SiteCallQueryRequest_FilterBySourceNode_ReturnsMatchingSummaries()
|
||||
{
|
||||
// Task 17: the new Node filter input pushes a string into
|
||||
// SiteCallQueryRequest.SourceNodeFilter — the actor must thread it
|
||||
// onto SiteCallQueryFilter.SourceNode and the response summaries must
|
||||
// mirror the row's SourceNode column.
|
||||
Skip.IfNot(_fixture.Available, _fixture.SkipReason);
|
||||
|
||||
var siteId = NewSiteId();
|
||||
await using var context = CreateContext();
|
||||
var repo = new SiteCallAuditRepository(context);
|
||||
var actor = CreateActor(repo);
|
||||
|
||||
var t0 = new DateTime(2026, 5, 20, 14, 0, 0, DateTimeKind.Utc);
|
||||
await repo.UpsertAsync(NewRow(
|
||||
TrackedOperationId.New(), siteId, status: "Attempted",
|
||||
createdAtUtc: t0, sourceNode: "site-plant-a-node-a"));
|
||||
await repo.UpsertAsync(NewRow(
|
||||
TrackedOperationId.New(), siteId, status: "Delivered",
|
||||
createdAtUtc: t0.AddMinutes(1), terminal: true, sourceNode: "site-plant-a-node-b"));
|
||||
|
||||
actor.Tell(
|
||||
new SiteCallQueryRequest(
|
||||
"corr-node", StatusFilter: null, SourceSiteFilter: siteId, ChannelFilter: null,
|
||||
TargetKeyword: null, StuckOnly: false, FromUtc: null, ToUtc: null,
|
||||
AfterCreatedAtUtc: null, AfterId: null, PageSize: 50,
|
||||
SourceNodeFilter: "site-plant-a-node-a"),
|
||||
TestActor);
|
||||
|
||||
var response = ExpectMsg<SiteCallQueryResponse>(TimeSpan.FromSeconds(10));
|
||||
Assert.True(response.Success);
|
||||
Assert.Single(response.SiteCalls);
|
||||
Assert.Equal("site-plant-a-node-a", response.SiteCalls[0].SourceNode);
|
||||
Assert.Equal("Attempted", response.SiteCalls[0].Status);
|
||||
}
|
||||
|
||||
[SkippableFact]
|
||||
public async Task SiteCallQueryRequest_KeysetPaging_AdvancesViaCursor()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user