feat(secrets-ui): add/rotate/delete modal + audited gated reveal

This commit is contained in:
Joseph Doherty
2026-07-15 17:20:01 -04:00
parent d7f8ca455b
commit 21556cc1a7
15 changed files with 950 additions and 14 deletions
@@ -1,8 +1,10 @@
using Bunit;
using Bunit.TestDoubles;
using Microsoft.Extensions.DependencyInjection;
using ZB.MOM.WW.Audit;
using ZB.MOM.WW.Secrets.Abstractions;
using ZB.MOM.WW.Secrets.Ui;
using ZB.MOM.WW.Secrets.Ui.Tests.Fakes;
namespace ZB.MOM.WW.Secrets.Ui.Tests;
@@ -33,7 +35,13 @@ public class SecretsListTests : TestContext
};
private void RegisterStore(params SecretMetadata[] rows)
=> Services.AddSingleton<ISecretStore>(new FakeSecretStore(rows));
{
// SecretsList now embeds RevealButton / ConfirmDeleteModal / SecretEditor, which inject the
// cipher and audit writer, so those seams must be registered even for list-only assertions.
Services.AddSingleton<ISecretStore>(new FakeSecretStore(rows));
Services.AddSingleton<ISecretCipher>(new FakeCipher());
Services.AddSingleton<IAuditWriter>(new CapturingAuditWriter());
}
[Fact]
public void Renders_Metadata_ForEachSecret()