();
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, string? confirmLabel = null)
=> Task.FromResult(true);
// Register row 75 added a DialogSeverity overload. This stub auto-confirms
// regardless of severity — it exists to let action paths run end to end, not to
// assert anything about styling.
///
public Task ConfirmAsync(string title, string message, DialogSeverity severity, string? confirmLabel = null)
=> Task.FromResult(true);
///
public Task PromptAsync(
string title, string label, string initialValue = "", string? placeholder = null)
=> Task.FromResult(null);
/// Returns a completed task with the default result without showing a dialog.
/// The dialog result type.
/// The dialog title.
/// The dialog body fragment.
/// The optional dialog size.
/// A task that resolves to the default result.
public Task ShowAsync(
string title,
Microsoft.AspNetCore.Components.RenderFragment> body,
string? size = null)
=> Task.FromResult(default);
}
}
|