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: MIGRATION.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,3 +82,26 @@ The `TestServiceProvider` class has been renamed to `BunitTestServiceProvider`.
82
82
83
83
## `DisposeComponents` is now asynchronous and called `DisposeComponentsAsync`
84
84
`DisposeComponentsAsync` allows to await `DisposeAsync` of components under test. If you used `DisposeComponents`, you should replace it with `DisposeComponentsAsync`.
85
+
86
+
## `IRefreshableElementCollection` was removed
87
+
88
+
The `IRefreshableElementCollection` interface has been removed. With this the `FindAll` method does not accept a `bool enableRefresh` parameter anymore. Code like this:
89
+
90
+
```csharp
91
+
varitems=cut.FindAll("li", enableRefresh: true);
92
+
93
+
cut.Find("button").Click(); // Some action that causes items to change
94
+
95
+
Assert.Equal(3, items.Count);
96
+
```
97
+
98
+
Should be changed to this:
99
+
100
+
```csharp
101
+
varitems=cut.FindAll("li");
102
+
103
+
cut.Find("button").Click(); // Some action that causes items to change
Copy file name to clipboardExpand all lines: src/bunit/Extensions/RenderedComponentExtensions.cs
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -36,13 +36,13 @@ public static IElement Find<TComponent>(this IRenderedComponent<TComponent> rend
36
36
/// </summary>
37
37
/// <param name="renderedComponent">The rendered fragment to search.</param>
38
38
/// <param name="cssSelector">The group of selectors to use.</param>
39
-
/// <param name="enableAutoRefresh">If true, the returned <see cref="IRefreshableElementCollection{IElement}"/> will automatically refresh its <see cref="IElement"/>s whenever the <paramref name="renderedComponent"/> changes.</param>
40
-
/// <returns>An <see cref="IRefreshableElementCollection{IElement}"/>, that can be refreshed to execute the search again.</returns>
Copy file name to clipboardExpand all lines: src/bunit/Extensions/WaitForHelpers/RenderedComponentWaitForHelperExtensions.WaitForElement.cs
+18-18Lines changed: 18 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -40,8 +40,8 @@ public static IElement WaitForElement<TComponent>(this IRenderedComponent<TCompo
40
40
/// <param name="renderedComponent">The render fragment or component find the matching element in.</param>
41
41
/// <param name="cssSelector">The CSS selector to use to search for elements.</param>
42
42
/// <exception cref="WaitForFailedException">Thrown if no elements is found matching the <paramref name="cssSelector"/> within the default timeout.</exception>
@@ -52,8 +52,8 @@ public static IRefreshableElementCollection<IElement> WaitForElements<TComponent
52
52
/// <param name="cssSelector">The CSS selector to use to search for elements.</param>
53
53
/// <param name="matchElementCount">The exact number of elements to that the <paramref name="cssSelector"/> should match.</param>
54
54
/// <exception cref="WaitForFailedException">Thrown if no elements is found matching the <paramref name="cssSelector"/> within the default timeout.</exception>
@@ -64,8 +64,8 @@ public static IRefreshableElementCollection<IElement> WaitForElements<TComponent
64
64
/// <param name="cssSelector">The CSS selector to use to search for elements.</param>
65
65
/// <param name="timeout">The maximum time to wait for elements to appear.</param>
66
66
/// <exception cref="WaitForFailedException">Thrown if no elements is found matching the <paramref name="cssSelector"/> within the default timeout.</exception>
@@ -78,8 +78,8 @@ public static IRefreshableElementCollection<IElement> WaitForElements<TComponent
78
78
/// <param name="matchElementCount">The exact number of elements to that the <paramref name="cssSelector"/> should match.</param>
79
79
/// <param name="timeout">The maximum time to wait for elements to appear.</param>
80
80
/// <exception cref="WaitForFailedException">Thrown if no elements is found matching the <paramref name="cssSelector"/> within the default timeout.</exception>
/// <param name="cssSelector">The CSS selector to use to search for elements.</param>
116
116
/// <param name="matchElementCount">The exact number of elements to that the <paramref name="cssSelector"/> should match.</param>
117
117
/// <exception cref="WaitForFailedException">Thrown if no elements is found matching the <paramref name="cssSelector"/> within the default timeout.</exception>
/// <param name="cssSelector">The CSS selector to use to search for elements.</param>
129
129
/// <param name="timeout">The maximum time to wait for elements to appear.</param>
130
130
/// <exception cref="WaitForFailedException">Thrown if no elements is found matching the <paramref name="cssSelector"/> within the default timeout.</exception>
/// <param name="matchElementCount">The exact number of elements to that the <paramref name="cssSelector"/> should match.</param>
143
143
/// <param name="timeout">The maximum time to wait for elements to appear.</param>
144
144
/// <exception cref="WaitForFailedException">Thrown if no elements is found matching the <paramref name="cssSelector"/> within the default timeout.</exception>
/// <param name="renderedComponent">The render fragment or component find the matching element in.</param>
155
155
/// <param name="cssSelector">The CSS selector to use to search for elements.</param>
156
156
/// <exception cref="WaitForFailedException">Thrown if no elements is found matching the <paramref name="cssSelector"/> within the default timeout.</exception>
0 commit comments