test(e2e): standardize AuditLog tests on SkippableFact + skip summary log

This commit is contained in:
Joseph Doherty
2026-06-05 10:25:16 -04:00
parent 234ddb5201
commit 271f70b1d2
2 changed files with 44 additions and 49 deletions
@@ -0,0 +1,23 @@
using System.Runtime.CompilerServices;
namespace ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests.Cluster;
/// <summary>
/// Makes the suite's skip policy visible: at process exit, writes one console
/// line reporting how many cluster/DB-dependent test gates skipped because the
/// cluster was unavailable (see <see cref="ClusterAvailability.SkippedCount"/>).
/// Registered once via a <see cref="ModuleInitializerAttribute"/> so it runs
/// regardless of how the test host is launched (Task 3).
/// </summary>
internal static class SkipSummaryReporter
{
[ModuleInitializer]
internal static void Init() =>
AppDomain.CurrentDomain.ProcessExit += (_, _) =>
{
if (ClusterAvailability.SkippedCount > 0)
{
Console.WriteLine($"[E2E] Skipped {ClusterAvailability.SkippedCount} cluster/DB-dependent test gate(s) — {ClusterAvailability.SkipReason}");
}
};
}