Extends Verify to allow verification of Xaml UIs.
https://nuget.org/packages/Verify.Xaml/
Enable VerifyXaml once at assembly load time:
VerifyXaml.Enable();
A visual element (Window/Page/Control etc) can then be verified as follows:
[Test]
public async Task WindowUsage()
{
var window = new MyWindow();
await Verify(window);
}
With the state of the element being rendered as a verified files:
TheTests.WindowUsage.00.verified.xml:
TheTests.WindowUsage.01.verified.png:
The rendering of XAML elements can very slightly between different OS versions. This can make verification on different machines (eg CI) problematic. There are several approaches to mitigate this:
Gem designed by Adnen Kadri from The Noun Project.