using System.Runtime.CompilerServices;
namespace ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests.Cluster;
///
/// 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 ).
/// Registered once via a so it runs
/// regardless of how the test host is launched.
///
internal static class SkipSummaryReporter
{
/// Registers the skip-summary hook that runs when the process exits.
[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}");
}
};
}