openclaw-windows-node/tests/OpenClaw.Tray.IntegrationTests/IntegrationFactAttribute.cs
Chris Anderson 9fa43f3477
feat: add native WinUI A2UI renderer and MCP hardening (#239)
Adds the native WinUI A2UI rendering pipeline, MCP/local security hardening, navigation/media safeguards, and integration/UI coverage for tray-hosted A2UI surfaces.\n\nThanks to @codemonkeychris for the substantial implementation and follow-through on review feedback.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-29 22:53:50 -07:00

29 lines
870 B
C#

using System;
using Xunit;
namespace OpenClaw.Tray.IntegrationTests;
/// <summary>
/// Black-box integration tests that spawn the tray app as a subprocess. Skipped
/// unless OPENCLAW_RUN_INTEGRATION=1 because they need a real Windows desktop
/// session (the WinUI3 app cannot run headless) and they pop UI windows / tray
/// icons during execution.
/// </summary>
public sealed class IntegrationFactAttribute : FactAttribute
{
private const string EnvVar = "OPENCLAW_RUN_INTEGRATION";
public IntegrationFactAttribute()
{
if (string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable(EnvVar)))
{
Skip = $"Integration tests disabled. Set {EnvVar}=1 to enable.";
return;
}
if (!OperatingSystem.IsWindows())
{
Skip = "Tray integration tests require Windows.";
}
}
}