@@ -35,7 +35,6 @@ protected override void InitializeAsyncCore()
35
35
[ InlineData ( "render-throw" ) ]
36
36
[ InlineData ( "afterrender-sync-throw" ) ]
37
37
[ InlineData ( "afterrender-async-throw" ) ]
38
- [ QuarantinedTest ( "https://github.com/dotnet/aspnetcore/issues/57588" ) ]
39
38
public void ComponentLifecycleMethodThrowsExceptionTerminatesTheCircuit ( string id )
40
39
{
41
40
Browser . MountTestComponent < ReliabilityComponent > ( ) ;
@@ -44,8 +43,7 @@ public void ComponentLifecycleMethodThrowsExceptionTerminatesTheCircuit(string i
44
43
var targetButton = Browser . Exists ( By . Id ( id ) ) ;
45
44
targetButton . Click ( ) ;
46
45
47
- // Triggering an error will show the exception UI
48
- Browser . Exists ( By . CssSelector ( "#blazor-error-ui[style='display: block;']" ) ) ;
46
+ DismissBlazorErrorUI ( ) ;
49
47
50
48
// Clicking the button again will trigger a server disconnect
51
49
targetButton . Click ( ) ;
@@ -54,7 +52,6 @@ public void ComponentLifecycleMethodThrowsExceptionTerminatesTheCircuit(string i
54
52
}
55
53
56
54
[ Fact ]
57
- [ QuarantinedTest ( "https://github.com/dotnet/aspnetcore/issues/57588" ) ]
58
55
public void ComponentDisposeMethodThrowsExceptionTerminatesTheCircuit ( )
59
56
{
60
57
Browser . MountTestComponent < ReliabilityComponent > ( ) ;
@@ -67,7 +64,8 @@ public void ComponentDisposeMethodThrowsExceptionTerminatesTheCircuit()
67
64
targetButton . Click ( ) ;
68
65
// Clicking it again hides the component and invokes the rethrow which triggers the exception
69
66
targetButton . Click ( ) ;
70
- Browser . Exists ( By . CssSelector ( "#blazor-error-ui[style='display: block;']" ) ) ;
67
+
68
+ DismissBlazorErrorUI ( ) ;
71
69
72
70
// Clicking it again causes the circuit to disconnect
73
71
targetButton . Click ( ) ;
@@ -95,4 +93,17 @@ void AssertLogContains(params string[] messages)
95
93
Assert . Contains ( log , entry => entry . Message . Contains ( message ) ) ;
96
94
}
97
95
}
96
+
97
+ void DismissBlazorErrorUI ( )
98
+ {
99
+ // Triggering an error will show the exception UI
100
+ Browser . Exists ( By . CssSelector ( "#blazor-error-ui[style='display: block;']" ) ) ;
101
+
102
+ // Dismiss the error UI by clicking the dismiss button
103
+ var dismissButton = Browser . Exists ( By . CssSelector ( "#blazor-error-ui .dismiss" ) ) ;
104
+ dismissButton . Click ( ) ;
105
+
106
+ // Wait for error UI to be hidden
107
+ Browser . Exists ( By . CssSelector ( "#blazor-error-ui[style='display: none;']" ) ) ;
108
+ }
98
109
}
0 commit comments