You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ All notable changes to **bUnit** will be documented in this file. The project ad
14
14
15
15
- A race condition existed between `WaitForState` / `WaitForAssertion` and `FindComponents`, if the first used the latter. Reported by [@rmihael](https://github.com/rmihael), [@SviatoslavK](https://github.com/SviatoslavK), and [@RaphaelMarcouxCTRL](https://github.com/RaphaelMarcouxCTRL). Fixed by [@egil](https://github.com/egil) and [@linkdotnet](https://github.com/linkdotnet).
16
16
17
+
- 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](https://github.com/FlukeFan). Fixed by [@egil](https://github.com/egil).
/// <param name="eventName">The name of the event to raise (using on-form, e.g. <c>onclick</c>).</param>
57
58
/// <param name="eventArgs">The event arguments to pass to the event handler.</param>
58
59
/// <returns>A <see cref="Task"/> that completes when the render caused by the triggering of the event finishes.</returns>
59
-
[SuppressMessage("Globalization","CA1308:Normalize strings to uppercase",Justification="HTML events are standardize to lower case and safe in this context.")]
@@ -67,18 +67,32 @@ public static Task TriggerEventAsync(this IElement element, string eventName, Ev
67
67
varrenderer=element.GetTestContext()?.Renderer
68
68
??thrownewInvalidOperationException($"Blazor events can only be raised on elements rendered with the Blazor test renderer '{nameof(ITestRenderer)}'.");
[SuppressMessage("Globalization","CA1308:Normalize strings to uppercase",Justification="HTML events are standardize to lower case and safe in this context.")]
0 commit comments