feat(centralui): Bundle Import filter on ConfigurationAuditLog page

This commit is contained in:
Joseph Doherty
2026-05-24 05:44:21 -04:00
parent 39f994f9bc
commit ef025a325d
4 changed files with 79 additions and 0 deletions

View File

@@ -353,6 +353,29 @@ public class CentralUiRepositoryTests : IDisposable
Assert.Single(entries);
}
[Fact]
public async Task GetAuditLogEntries_FiltersByBundleImportId()
{
// T24 — Bundle Import filter on the Configuration Audit Log page is
// backed by the new optional bundleImportId arg on the repo query.
// Only rows stamped with the given id should come back.
var importA = Guid.NewGuid();
var importB = Guid.NewGuid();
_context.AuditLogEntries.AddRange(
new AuditLogEntry("admin", "Create", "Template", "1", "T1")
{ Timestamp = DateTimeOffset.UtcNow, BundleImportId = importA },
new AuditLogEntry("admin", "Create", "Template", "2", "T2")
{ Timestamp = DateTimeOffset.UtcNow, BundleImportId = importB },
new AuditLogEntry("admin", "Update", "Template", "3", "T3")
{ Timestamp = DateTimeOffset.UtcNow });
await _context.SaveChangesAsync();
var (entries, total) = await _repository.GetAuditLogEntriesAsync(bundleImportId: importA);
Assert.Single(entries);
Assert.Equal(1, total);
Assert.Equal(importA, entries[0].BundleImportId);
}
[Fact]
public async Task GetAuditLogEntries_ReverseChronologicalWithPagination()
{