Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions src/Components/test/E2ETest/Tests/CircuitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ protected override void InitializeAsyncCore()
[InlineData("render-throw")]
[InlineData("afterrender-sync-throw")]
[InlineData("afterrender-async-throw")]
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/57588")]
public void ComponentLifecycleMethodThrowsExceptionTerminatesTheCircuit(string id)
{
Browser.MountTestComponent<ReliabilityComponent>();
Expand All @@ -47,14 +46,20 @@ public void ComponentLifecycleMethodThrowsExceptionTerminatesTheCircuit(string i
// Triggering an error will show the exception UI
Browser.Exists(By.CssSelector("#blazor-error-ui[style='display: block;']"));

// Dismiss the error UI by clicking the dismiss button
var dismissButton = Browser.Exists(By.CssSelector("#blazor-error-ui .dismiss"));
dismissButton.Click();

// Wait for error UI to be hidden
Browser.Exists(By.CssSelector("#blazor-error-ui[style='display: none;']"));

Comment thread
ilonatommy marked this conversation as resolved.
// Clicking the button again will trigger a server disconnect
targetButton.Click();

AssertLogContains("Connection disconnected.");
}

[Fact]
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/57588")]
public void ComponentDisposeMethodThrowsExceptionTerminatesTheCircuit()
{
Browser.MountTestComponent<ReliabilityComponent>();
Expand All @@ -69,6 +74,13 @@ public void ComponentDisposeMethodThrowsExceptionTerminatesTheCircuit()
targetButton.Click();
Browser.Exists(By.CssSelector("#blazor-error-ui[style='display: block;']"));

// Dismiss the error UI by clicking the dismiss button
var dismissButton = Browser.Exists(By.CssSelector("#blazor-error-ui .dismiss"));
dismissButton.Click();

// Wait for error UI to be hidden
Browser.Exists(By.CssSelector("#blazor-error-ui[style='display: none;']"));

// Clicking it again causes the circuit to disconnect
targetButton.Click();
AssertLogContains("Connection disconnected.");
Expand Down
Loading