Skip to content

Releases: bUnit-dev/bUnit

1.16.2

07 Feb 21:53
33f9c2d
Compare
Choose a tag to compare
  • Changed semantic comparer to handle elements parsed outside their proper context, e.g. an <path> element parsed without being inside a <svg> element. The semantic comparer will now be able to treat those as regular elements and thus be able to compare correctly to other elements of the same type and with the same node name. By @egil.

1.15.5

04 Feb 16:55
1c969be
Compare
Choose a tag to compare
  • Upgrade AngleSharp.Diffing to 0.17.1

1.14.4

11 Jan 20:35
77da254
Compare
Choose a tag to compare

Added

  • Added IMemoryCache by default to the Services container. By @linkdotnet.

Fixed

  • Added support in FakeNavigationManager to handle umlauts.
  • Fixed a bug where attribute values did not get escaped. Reported by @brettwinters. Fixed by @linkdotnet.

1.13.5

16 Dec 08:05
f145a90
Compare
Choose a tag to compare

This release contains a bunch of small tweaks and fixes.

1.12.6

08 Nov 20:57
6abb841
Compare
Choose a tag to compare

Fixed

1.11.7

13 Oct 11:13
ac4061c
Compare
Choose a tag to compare

Added

  • Added the StateFromJson method to the NavigationHistory type, to make it easy to deserialize navigation state stored as JSON during a call to NavigationManager.NavigateTo, e.g. as seen with the new InteractiveRequestOptions type available in .NET 7. By @linkdotnet and @egil.

1.10.14

16 Sep 16:27
a0af4e1
Compare
Choose a tag to compare

Added

  • Added new test double FakeWebAssemblyHostEnvironment that implements IWebAssemblyHostEnvironment. By @KristofferStrube.

  • Added Bind method to parameter builder that makes it easier to emulate the @bind-Value syntax in C#-based tests.

    When writing tests in razor files, the @bind- directive can be directly applied like this:

    <MyComponent @bind-Value="myParam"></MyComponent>

    The same expression in C# syntax is more verbose like this:

    RenderComponent<MyComponent>(ps => ps
      .Add(c => c.Value, value)
      .Add(c => c.ValueChanged, newValue => value = newValue)
      .Add(c => c.ValueExpression, () => value));

    With the new Bind method this can be done in one method:

    RenderComponent<MyComponent>(ps => ps
      .Bind(c => c.Value, value, newValue => value = newValue, () => value));

    By @linkdotnet and @egil.

  • Added support for NavigationLock, which allows user code to intercept and prevent navigation. By @linkdotnet and @egil.

Fixed

  • JSInterop.VerifyInvoke reported the wrong number of actual invocations of a given identifier. Reported by @otori. Fixed by @linkdotnet.

1.9.8

07 Jun 11:08
482d690
Compare
Choose a tag to compare

Changed

  • WaitForAssertion method is now marked as an assertion method with the [AssertionMethod] attribute. This makes certain analyzers like SonarSource's Tests should include assertions happy. By @egil.

Fixes

  • A race condition existed between WaitForState / WaitForAssertion and FindComponents, if the first used the latter. Reported by @rmihael, @SviatoslavK, and @RaphaelMarcouxCTRL. Fixed by @egil and @linkdotnet.

  • Triggering of event handlers now runs entirely inside the renderers synchronization context, avoiding race condition between elements in the DOM tree being updated by the renderer and the event triggering logic traversing the DOM tree to find event handlers to trigger. Reported by @FlukeFan. Fixed by @egil.

1.8.15

19 May 20:31
604c96f
Compare
Choose a tag to compare

Added

Changed

  • Htmlizer uses StringBuilder instead of List<string> to reduce allocations and improve render speed. By @linkdotnet.

Fixes

  • TestServiceProvider now implements IAsyncDisposable. This means TestContext.Dispose() now calls the async disposable method as well as the non-async version on the service provider. It does however not block or await the task returned, since that can lead to deadlocks.

    To await the disposal of async services registered in the TestContext.Services container, do the following:

    1. Create a new type that derives from TestContext and which implement IAsyncDisposable.
    2. In the DisposeAsync() method, call Services.DisposeAsync().
    3. Override the Dispose and have it only call Services.Dispose().

    Reported by @vedion and fixed by @egil.

1.7.7

29 Apr 17:32
9bf85db
Compare
Choose a tag to compare

Added

  • Added method SetAuthenticationType to TestAuthorizationContext to allow for custom authentication type checks. By @TimPurdum.

  • Added DisposeComponents to TestContextBase. It will dispose and remove all components rendered by the TestContextBase. By @linkdotnet.

  • Added .NET 7 as a target framework for bUnit. By @linkdotnet.

Fixed

  • Fixed step by step guide for building and viewing the documentation locally. By @linkdotnet.

  • FakeNavigationManager.NavigateTo could lead to exceptions when navigating to external url's. Reported by (@TDroogers)[https://github.com/TDroogers]. Fixed by @linkdotnet.