Skip to content

Commit 91c5b16

Browse files
committed
Fix the error message
1 parent fdad0cc commit 91c5b16

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/Components/test/E2ETest/ServerExecutionTests/WebSocketCompressionTests.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ public abstract partial class BlockedWebSocketCompressionTests(
9797
: ServerTestBase<BasicTestAppServerSiteFixture<RazorComponentEndpointsStartup<App>>>(browserFixture, serverFixture, output)
9898
{
9999
[Fact]
100-
[QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/64305")]
101100
public void EmbeddingServerAppInsideIframe_WithCompressionEnabled_Fails()
102101
{
103102
Navigate("/subdir/iframe");
@@ -106,11 +105,17 @@ public void EmbeddingServerAppInsideIframe_WithCompressionEnabled_Fails()
106105

107106
Assert.True(logs.Count > 0);
108107

109-
Assert.Matches(ParseErrorMessageRegex, logs[0].Message);
108+
Assert.True(
109+
ParseErrorMessageRegexOld.IsMatch(logs[0].Message) ||
110+
ParseErrorMessageRegexNew.IsMatch(logs[0].Message),
111+
$"Expected log message to match one of the CSP error patterns. Actual: {logs[0].Message}");
110112
}
111113

112114
[GeneratedRegex(@"security - Refused to frame 'http://\d+\.\d+\.\d+\.\d+:\d+/' because an ancestor violates the following Content Security Policy directive: ""frame-ancestors 'none'"".")]
113-
private static partial Regex ParseErrorMessageRegex { get; }
115+
private static partial Regex ParseErrorMessageRegexOld { get; }
116+
117+
[GeneratedRegex(@"security - Framing 'http://\d+\.\d+\.\d+\.\d+:\d+/' violates the following Content Security Policy directive: ""frame-ancestors 'none'"".")]
118+
private static partial Regex ParseErrorMessageRegexNew { get; }
114119
}
115120

116121
public partial class DefaultConfigurationWebSocketCompressionTests : AllowedWebSocketCompressionTests

0 commit comments

Comments
 (0)