using Shouldly;
using Xunit;
namespace ZB.MOM.WW.OtOpcUa.AdminUI.Tests.Raw;
///
/// Issue #604 source-scan guards (Razor has no bUnit): an EditForm with a validator but nothing
/// to show its messages is a silent no-op Save, the interactive pages' error boundary is pinned in PageErrorBoundaryTests, and the
/// API-key Delete must not fire straight from the row button.
///
public sealed class AdminUiFormSweepGuardTests
{
/// EditForm pages whose validation messages are rendered by a child/section component.
private static readonly HashSet AllowList = new(StringComparer.Ordinal);
[Fact]
public void Every_razor_with_an_EditForm_and_a_DataAnnotationsValidator_renders_validation_messages()
{
var offenders = new List();
foreach (var file in Directory.EnumerateFiles(ComponentsDir(), "*.razor", SearchOption.AllDirectories))
{
var text = File.ReadAllText(file);
if (!text.Contains("