C# Blazor test form with bUnit

The issue was that only the first Change() was recognized. This is because after every change, submit and click the UI is rendered again. It is smarter to call it the following way:

var ctx = MyTestContext();
var cut = ctx.RenderComponent<Login>();

cut.Find("input[aria-label=Mail-Address]").Change(testuser);
cut.Find("input[type=password]").Change("s3cur3_PASS");
cut.Find("form").Submit();

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top