-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Fix Photino E2E tests #63498
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
Fix Photino E2E tests #63498
Conversation
…is created properly.
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.
Pull Request Overview
This PR fixes the failing Photino E2E tests by refactoring the test setup to use the existing PhotinoTestApp sample instead of running the test assembly directly. The key issue was that the test was not creating the required _framework
directory, preventing Blazor from starting.
- Consolidates the E2E test functionality into the existing PhotinoTestApp sample
- Adds multiple execution modes to PhotinoTestApp (basic test mode and sample launch mode)
- Updates the E2E test to launch PhotinoTestApp with
--basic-test
argument instead of running its own assembly
Reviewed Changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/Components/WebView/test/E2ETest/Microsoft.AspNetCore.Components.WebViewE2E.Test.csproj | Changed SDK type and removed executable configuration since it no longer needs an entry point |
src/Components/WebView/test/E2ETest/WebViewManagerE2ETests.cs | Updated test to launch PhotinoTestApp.dll with --basic-test argument instead of the test assembly |
src/Components/WebView/test/E2ETest/Program.cs | Removed entry point since test now uses PhotinoTestApp |
src/Components/WebView/test/E2ETest/wwwroot/css/app.css | Removed CSS file as it's no longer needed |
src/Components/WebView/test/E2ETest/_Imports.razor | Removed imports file as it's no longer needed |
src/Components/WebView/Samples/PhotinoPlatform/testassets/PhotinoTestApp/Program.cs | Refactored to support multiple execution modes via command line arguments |
src/Components/WebView/Samples/PhotinoPlatform/testassets/PhotinoTestApp/LaunchSample.cs | New class containing the original sample app functionality |
src/Components/WebView/Samples/PhotinoPlatform/testassets/PhotinoTestApp/BasicTest.cs | New class containing the E2E test functionality moved from the test project |
src/Components/WebView/Samples/PhotinoPlatform/testassets/PhotinoTestApp/IExecutionMode.cs | New interface for different execution modes |
src/Components/WebView/Samples/PhotinoPlatform/testassets/PhotinoTestApp/PhotinoTestApp.csproj | Fixed hardcoded configuration name in assets path |
src/Components/WebView/Samples/PhotinoPlatform/testassets/PhotinoTestApp/Program.cs
Outdated
Show resolved
Hide resolved
…inoTestApp/Program.cs Co-authored-by: Copilot <[email protected]>
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.
Looks great.
Minor comments
The failure is connected, the way we're finding the
|
This is not the best logging:
Locally it's passing. We have to log the details better and check how to fix it. [Edit]
|
|
This time web view did not even get ready, last time it got ready in the middle of the timeout but we added some logging, it might have slowed it down enough to pass the deadline. Is CI significantly slower than my local machine? Let's increase timeouts. [edit] |
…h longer timeout, without logging.
Dropping for now. It's a purely test issue, what's more - it's failing only on CI. |
Use Photino sample app in E2E tests
The test was quarantined with 100% failure rate. The issue was with the test setup - we did not create
_framework
dir and because of that, no blazor was started, the test was failing. I did not track down the direct reason why the test broke at some point. The test is launching a process with.dll
pointing to its own project. That project has an entry point that manages opening Photino window, communication between .net and JS and checking if buttons were clicked properly.We have a sample application that is launching blazor app with Photino framework. That sample did not manifest any issues, was creating
_framework
dir and the code copied from E2E test is able to run there without problems. Because we were already using dotnet process to run the.dll
in the original E2E test, we can as well run the sample app.dll
from our E2E test. It cleans up some code and removes duplicating similar functionality in two projects.Description
Microsoft.AspNetCore.Components.WebViewE2E.Test.csproj
toPhotinoTestApp.csproj
.PhotinoTestApp.csproj
had a hardcoded configuration name in assets path, it did not have a direct impact on the issue but it got fixed.Microsoft.AspNetCore.Components.WebViewE2E.Test.csproj
does not need an entrypoint anymore, the sdk type got changed and a cleanup was done.Fixes #54017.