|
7 | 7 | public MarkupMatchesTests(ITestOutputHelper outputHelper)
|
8 | 8 | {
|
9 | 9 | this.outputHelper = outputHelper;
|
| 10 | + TestContext.DefaultWaitTimeout = TimeSpan.FromSeconds(30); |
10 | 11 | }
|
11 | 12 |
|
12 | 13 | [Fact]
|
13 |
| - public async Task MarkupMatchesShouldNotBeBlockedByRenderer() |
| 14 | + public void MarkupMatchesShouldNotBeBlockedByRenderer() |
14 | 15 | {
|
15 |
| - await DumpCapture.OnFailureAsync(() => |
16 |
| - { |
17 |
| - var tcs = new TaskCompletionSource<object?>(); |
| 16 | + var tcs = new TaskCompletionSource<object?>(); |
| 17 | + var cut = Render(@<LoadingComponent Task="@tcs.Task" /> ); |
| 18 | + cut.MarkupMatches(@<span>loading</span> ); |
18 | 19 |
|
19 |
| - var cut = Render(@<LoadingComponent Task="@tcs.Task" /> ); |
| 20 | + tcs.SetResult(true); |
20 | 21 |
|
21 |
| - cut.MarkupMatches(@<span>loading</span> ); |
22 |
| - |
23 |
| - tcs.SetResult(true); |
24 |
| - |
25 |
| - cut.WaitForAssertion(() => cut.MarkupMatches(@<span>done</span>)); |
26 |
| - }, |
27 |
| - outputHelper); |
| 22 | + cut.WaitForAssertion(() => cut.MarkupMatches(@<span>done</span>)); |
28 | 23 | }
|
29 | 24 |
|
30 | 25 | [Fact]
|
31 |
| - public async Task MarkupMatchesShouldNotBeBlockedByRendererComplex() |
| 26 | + public void MarkupMatchesShouldNotBeBlockedByRendererComplex() |
32 | 27 | {
|
33 |
| - await DumpCapture.OnFailureAsync(() => |
34 |
| - { |
35 |
| - var tcs = new TaskCompletionSource<object?>(); |
36 |
| - |
37 |
| - var cut = Render(@<InvokeAsyncInsideContinueWith Task="@tcs.Task" /> ); |
38 |
| - |
39 |
| - cut.MarkupMatches(@<span>waiting</span>); |
| 28 | + var tcs = new TaskCompletionSource<object?>(); |
| 29 | + var cut = Render(@<InvokeAsyncInsideContinueWith Task="@tcs.Task" /> ); |
| 30 | + cut.MarkupMatches(@<span>waiting</span>); |
40 | 31 |
|
41 |
| - tcs.SetResult(true); |
| 32 | + tcs.SetResult(true); |
42 | 33 |
|
43 |
| - cut.WaitForAssertion(() => cut.MarkupMatches(@<span>done</span>)); |
44 |
| - }, |
45 |
| - outputHelper); |
| 34 | + cut.WaitForAssertion(() => cut.MarkupMatches(@<span>done</span>)); |
46 | 35 | }
|
47 | 36 | }
|
0 commit comments