-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Can't build BasicTestApp and run Blazor E2E test #60849
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
Comments
@Regenhardt thanks for contacting us. You need nodejs and you need to build the JS bits |
Building with npm worked, thanks! Now it needs java to build Microsoft.AspNetCore.Components.E2ETests, even though I have the Microsoft OpenJDK installed for VS via tools and features' individual components. Should I find that jdk and add it to PATH or create JAVA_HOME? |
@Regenhardt you can put it in your path and JAVA_HOME. I don't remember if the build automatically installs it and sets it up. Have your run |
I have JAVA_HOME set and /bin in my path, now the test project starts up. Unfortunately I get a weird ArgumentException fom the server fixture saying that The page has libraries, browser extension, and grid server. Edit: |
@Regenhardt thanks for the additional details. Have you run |
I just built I now called the Running other tests first reveals: It's actually just my new tests that produce this error, others do not. I'm not sure how to further analyze this, I can't find anything in the contrib docs for how to write Blazor tests. I created a new component in the BasicTestApp that executes the steps that should work and displays the results in ui elements. I get an exception about a collection being empty. This could kinda be a version of my test failing, as I check for Something wrong with the test setup? |
@Regenhardt thanks for the additional details. Our test infrastructure has grown organically over the years and as a result it's a bit too complex. The best way to proceed is to find a test on a similar area and copy/add a test case. I would probably try and extend this test https://github.com/dotnet/aspnetcore/blob/main/src/Components/test/E2ETest/Tests/InteropTest.cs
|
Hi @Regenhardt. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
It works, thanks for the help! For my future reference, how to add a test:
|
I'm tying to add an E2E test, but I have difficulties getting everything to build. One of the culprits is
BasicTestApp
and I suspect that there is a general problem with my setup, something I didn't do that I should have done.The actual change is in JSInterop, which builds fine. JSInterop.Tests is green too. What am I doing wrong?
Visual Studio: VS Community 17.14.0 Preview 1.1
.NET SDK: 10.0.100-preview.2.25109.3
VS started via startvs.cmd file.
Warning:
VS build error:
Terminal build output:
The text was updated successfully, but these errors were encountered: