feat(secrets-ui): add/rotate/delete modal + audited gated reveal
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user