test(secrets): migrate UI fixtures to bUnit 2.7.2

This commit is contained in:
Joseph Doherty
2026-11-13 14:41:17 -05:00
parent 9bda64ec4b
commit f96104245e
27 changed files with 2438 additions and 58 deletions
@@ -13,7 +13,7 @@ namespace ZB.MOM.WW.Secrets.Ui.Tests;
/// description, content type) and audit the overwrite as <c>secret.add</c>. A live row is refused;
/// a tombstoned one is restored only on a second, deliberate submit of the same name.
/// </summary>
public class SecretEditorAddExistingTests : TestContext
public class SecretEditorAddExistingTests : BunitContext
{
private (RecordingSecretStore Store, CapturingAuditWriter Audit, FakeCipher Cipher) Setup()
{
@@ -23,7 +23,7 @@ public class SecretEditorAddExistingTests : TestContext
Services.AddSingleton<ISecretStore>(store);
Services.AddSingleton<IAuditWriter>(audit);
Services.AddSingleton<ISecretCipher>(cipher);
var auth = this.AddTestAuthorization();
var auth = this.AddAuthorization();
auth.SetAuthorized("carol");
auth.SetPolicies(SecretsAuthorization.ManagePolicy);
return (store, audit, cipher);
@@ -41,7 +41,7 @@ public class SecretEditorAddExistingTests : TestContext
private IRenderedComponent<SecretEditor> FillAdd(string name, string value)
{
var cut = RenderComponent<SecretEditor>(p => p.Add(c => c.OnSaved, () => { }));
var cut = Render<SecretEditor>(p => p.Add(c => c.OnSaved, () => { }));
cut.Find("[data-testid=secret-name]").Change(name);
cut.Find("[data-testid=secret-value]").Change(value);
return cut;