-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Test fixes #54825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test fixes #54825
Changes from all commits
45d6556
ecbd438
25898f9
9d6c5d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
namespace Microsoft.AspNetCore.Components.E2ETest.Tests; | ||
|
||
public class ThreadingHostedAppTest | ||
: ServerTestBase<ThreadingHostedAppTest.ThreadingAppServerSiteFixture>, IDisposable | ||
: ServerTestBase<ThreadingHostedAppTest.ThreadingAppServerSiteFixture> | ||
{ | ||
public class ThreadingAppServerSiteFixture : AspNetSiteServerFixture | ||
{ | ||
|
@@ -110,11 +110,4 @@ private void WaitUntilLoaded() | |
var app = Browser.Exists(By.TagName("app")); | ||
Browser.NotEqual("Loading...", () => app.Text); | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
// Make the tests run faster by navigating back to the home page when we are done | ||
// If we don't, then the next test will reload the whole page before it starts | ||
Browser.Exists(By.LinkText("Home")).Click(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the multithreading case, this happens too late and was trying to reach the DOM after the page is gone. Fortunately we just don't even need this optimization. |
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
namespace Microsoft.AspNetCore.Components.E2ETest.Tests; | ||
|
||
public class ThreadingAppTest | ||
: ServerTestBase<BlazorWasmTestAppFixture<ThreadingApp.Program>>, IDisposable | ||
: ServerTestBase<BlazorWasmTestAppFixture<ThreadingApp.Program>> | ||
{ | ||
public ThreadingAppTest( | ||
BrowserFixture browserFixture, | ||
|
@@ -127,11 +127,4 @@ private void WaitUntilLoaded() | |
var app = Browser.Exists(By.TagName("app")); | ||
Browser.NotEqual("Loading...", () => app.Text); | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
// Make the tests run faster by navigating back to the home page when we are done | ||
// If we don't, then the next test will reload the whole page before it starts | ||
Browser.Exists(By.LinkText("Home")).Click(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this no longer help? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the multithreading case, this happens too late and was trying to reach the DOM after the page is gone. Fortunately we just don't even need this optimization - it's fine to reload the page between tests, and makes them more isolated/robust anyway. |
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GoTo
was producing wrong results because only accepts relative URLs.Navigate
works withabout:blank
.