Skip to content

Commit 975e250

Browse files
committed
Remove test duplication: when server always requests a render with enhanced nav, actual request headers do not matter.
1 parent c0cee2f commit 975e250

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

src/Components/test/E2ETest/ServerRenderingTests/NoInteractivityTest.cs

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public void NotFoundSetOnInitialization_ResponseNotStarted_SSR(bool hasReExecuti
154154
[InlineData(true, false)]
155155
[InlineData(false, true)]
156156
[InlineData(false, false)]
157-
public void NotFoundSetOnInitialization_ResponseStarted_BrowserNavigation_SSR(bool hasReExecutionMiddleware, bool hasCustomNotFoundPageSet)
157+
public void NotFoundSetOnInitialization_ResponseStarted_SSR(bool hasReExecutionMiddleware, bool hasCustomNotFoundPageSet)
158158
{
159159
string reexecution = hasReExecutionMiddleware ? "/reexecution" : "";
160160
string testUrl = $"{ServerPathBase}{reexecution}/set-not-found-ssr-streaming?useCustomNotFoundPage={hasCustomNotFoundPageSet}";
@@ -180,30 +180,6 @@ private void AssertNotFoundRendered_ResponseStarted_Or_POST(bool hasReExecutionM
180180
}
181181
}
182182

183-
[Theory]
184-
[InlineData(true, true)]
185-
[InlineData(true, false)]
186-
[InlineData(false, true)]
187-
[InlineData(false, false)]
188-
public void NotFoundSetOnInitialization_ResponseStarted_LinkNavigation_SSR(bool hasReExecutionMiddleware, bool hasCustomNotFoundPageSet)
189-
{
190-
string testUrl = NavigateByLinkToPageTestingNotFound("Sets", hasReExecutionMiddleware, hasCustomNotFoundPageSet);
191-
AssertNotFoundRendered_ResponseStarted_Or_POST(hasReExecutionMiddleware, hasCustomNotFoundPageSet, testUrl);
192-
AssertUrlNotChanged(testUrl);
193-
}
194-
195-
private string NavigateByLinkToPageTestingNotFound(string action, bool hasReExecutionMiddleware, bool hasCustomNotFoundPageSet)
196-
{
197-
string reexecution = hasReExecutionMiddleware ? "/reexecution" : "";
198-
Navigate($"{ServerPathBase}/not-found-index?useCustomNotFoundPage={hasCustomNotFoundPageSet}");
199-
Browser.Equal("List of Not Found test pages", () => Browser.FindElement(By.Id("test-info")).Text);
200-
string reexecutionText = hasReExecutionMiddleware ? " with reexecution" : "";
201-
var link = Browser.FindElement(By.LinkText($"PageThat{action}NotFound-streaming{reexecutionText}"));
202-
var testUrl = link.GetAttribute("href");
203-
link.Click();
204-
return testUrl;
205-
}
206-
207183
[Theory]
208184
[InlineData(true, true)]
209185
[InlineData(true, false)]

0 commit comments

Comments
 (0)