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
+18-14Lines changed: 18 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,18 +6,20 @@ All notable changes to **bUnit** will be documented in this file. The project ad
6
6
7
7
## [Unreleased]
8
8
9
+
## [1.4.15] - 2021-12-18
10
+
9
11
This release reintroduces `Stub<TComponent>` and related back into the main library, so the "preview" library `bunit.web.mock` is already obsolete.
10
12
11
13
### Added
12
14
13
-
- Add `ComponentFactories` extensions method that makes it easy to register an instance of a replacement component. By [@egil](https://github.com/egil).
14
-
- Add ability to pass `ServiceProviderOptions` to `TestServiceProvider` through property to allow users to customize the service provider. By [@rodolfograve](https://github.com/rodolfograve).
15
+
-Add `ComponentFactories` extensions method that makes it easy to register an instance of a replacement component. By [@egil](https://github.com/egil).
16
+
-Add ability to pass `ServiceProviderOptions` to `TestServiceProvider` through property to allow users to customize the service provider. By [@rodolfograve](https://github.com/rodolfograve).
15
17
16
18
### Fixed
17
19
18
-
- Changed `SetParametersAndRender` such that it rethrows any exceptions thrown by the component under tests `SetParametersAsync` method. Thanks to [@bonsall](https://github.com/bonsall) for reporting the issue. Fixed by [@egil](https://github.com/egil).
19
-
-`onclick` on a button inside a form will raise the `onsubmit` event for the form itself. Reported by [@egil]. Fixed by [@linkdotnet](https://github.com/linkdotnet).
20
-
- Only forms are allowed to have a `onsubmit` event handler. When `onsubmit` is invoked from a non-form element results in an exception. Fixed by [@linkdotnet](https://github.com/linkdotnet).
20
+
-Changed `SetParametersAndRender` such that it rethrows any exceptions thrown by the component under tests `SetParametersAsync` method. Thanks to [@bonsall](https://github.com/bonsall) for reporting the issue. Fixed by [@egil](https://github.com/egil).
21
+
-`onclick` on a button inside a form will raise the `onsubmit` event for the form itself. Reported by [@egil]. Fixed by [@linkdotnet](https://github.com/linkdotnet).
22
+
-Only forms are allowed to have a `onsubmit` event handler. When `onsubmit` is invoked from a non-form element results in an exception. Fixed by [@linkdotnet](https://github.com/linkdotnet).
21
23
22
24
## [1.3.42] - 2021-11-09
23
25
@@ -42,7 +44,7 @@ Big shout out to **bUnit's sponsors** who helped make this release happen.
42
44
43
45
List of added functionality in this release.
44
46
45
-
- Added support for writing tests of components that use the `<FocusOnNavigate>` component included in .NET 6. This includes an assertion helper method `VerifyFocusOnNavigateInvoke` on bUnit's `JSInterop` that allow you to verify that `<FocusOnNavigate>` has set focus on an element during render. For example, to verify that `h1` selector was used to pick an element to focus on, do:
47
+
-Added support for writing tests of components that use the `<FocusOnNavigate>` component included in .NET 6. This includes an assertion helper method `VerifyFocusOnNavigateInvoke` on bUnit's `JSInterop` that allow you to verify that `<FocusOnNavigate>` has set focus on an element during render. For example, to verify that `h1` selector was used to pick an element to focus on, do:
46
48
47
49
```csharp
48
50
// <App /> component uses <FocusOnNavigate>
@@ -55,21 +57,21 @@ List of added functionality in this release.
55
57
Assert.Equal("h1", invocation.Arguments[0]);
56
58
```
57
59
58
-
By [@egil](https://github.com/egil).
60
+
By [@egil](https://github.com/egil).
59
61
60
-
-Addedfakeversionofthe `PersistentComponentState` typeinBlazorthatmakesitpossibletotestcomponentsthatusethetype. By [@egil](https://github.com/egil).
62
+
-Addedfakeversionofthe `PersistentComponentState` typeinBlazorthatmakesitpossibletotestcomponentsthatusethetype. By [@egil](https://github.com/egil).
61
63
62
-
-Added `TriggerEvent` methodtomakeiteasiertotriggercustomevents. By [@egil](https://github.com/egil).
64
+
-Added `TriggerEvent` methodtomakeiteasiertotriggercustomevents. By [@egil](https://github.com/egil).
63
65
64
-
-Added `History` captureinthe `FakeNavigationManager`. By [@egil](https://github.com/egil).
66
+
-Added `History` captureinthe `FakeNavigationManager`. By [@egil](https://github.com/egil).
- Added `WaitForElement` and `WaitForElements` methods. ThesemakesitpossibletowaitforoneormoreelementstoappearintheDOMbeforecontinuingatest, similartohow `WaitForAssertion` allowsyoutowaitforanassertiontopass, or `WaitForState` allowsyoutowaitforapredicatetopass. By [@egil](https://github.com/egil).
70
+
- Added `WaitForElement` and `WaitForElements` methods. ThesemakesitpossibletowaitforoneormoreelementstoappearintheDOMbeforecontinuingatest, similartohow `WaitForAssertion` allowsyoutowaitforanassertiontopass, or `WaitForState` allowsyoutowaitforapredicatetopass. By [@egil](https://github.com/egil).
69
71
70
72
### Changed
71
73
72
-
-Addedautomaticconversionofvalues (types) passedto `Change()` and `Input()` eventtriggermethods. Thismeansthate.g. a `DateTime` passedto `Change()` isautomaticallyconvertedtoastringformatthatBlazorexpects. By [@egil](https://github.com/egil).
74
+
-Addedautomaticconversionofvalues (types) passedto `Change()` and `Input()` eventtriggermethods. Thismeansthate.g. a `DateTime` passedto `Change()` isautomaticallyconvertedtoastringformatthatBlazorexpects. By [@egil](https://github.com/egil).
73
75
74
76
### Fixed
75
77
@@ -1065,7 +1067,9 @@ The latest version of the library is availble on NuGet:
1065
1067
-**Wrongcasingonkeyboardeventdispatchhelpers.**
1066
1068
Thehelpermethodsforthekeyboardeventswasnotprobablycased, sothathasbeenupdated. E.g. from `Keypress(...)` to `KeyPress(...)`.
0 commit comments