();
cut.WaitForAssertion(() =>
{
// Verify the row name rendered.
Assert.Contains("Ops Alerts", cut.Markup);
// Locate the Type | in the rendered table row and assert its text content
// is exactly "Email". If the Type column were removed the | would not
// exist and the assertion would throw, catching the regression.
var typeCell = cut.FindAll("tbody tr td")
.FirstOrDefault(td => td.TextContent.Trim() == "Email");
Assert.NotNull(typeCell);
});
}
/// A dialog service that auto-confirms, so action paths run end-to-end.
private sealed class AlwaysConfirmDialogService : IDialogService
{
public Task ConfirmAsync(string title, string message, bool danger = false)
=> Task.FromResult(true);
public Task PromptAsync(
string title, string label, string initialValue = "", string? placeholder = null)
=> Task.FromResult(null);
public Task ShowAsync(
string title,
Microsoft.AspNetCore.Components.RenderFragment> body,
string? size = null)
=> Task.FromResult(default);
}
}
|