File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
src/Components/WebView/test/E2ETest Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 44 <TargetFramework >$(DefaultNetCoreTargetFramework)</TargetFramework >
55 </PropertyGroup >
66
7+ <ItemGroup >
8+ <!-- Add project reference to ensure PhotinoTestApp is built and copied to our output directory -->
9+ <ProjectReference Include =" ..\..\Samples\PhotinoPlatform\testassets\PhotinoTestApp\PhotinoTestApp.csproj" />
10+ </ItemGroup >
11+
712</Project >
Original file line number Diff line number Diff line change @@ -20,18 +20,14 @@ public class WebViewManagerE2ETests
2020 SkipReason = "On Helix/Ubuntu the native Photino assemblies can't be found, and on macOS it can't detect when the WebView is ready" ) ]
2121 public async Task CanLaunchPhotinoWebViewAndClickButton ( )
2222 {
23- // Get the path to the PhotinoTestApp instead of the current test assembly
24- var currentAssemblyPath = typeof ( WebViewManagerE2ETests ) . Assembly . Location ;
25-
26- // Extract the current assembly name from the path (without .dll extension)
27- var currentAssemblyName = Path . GetFileNameWithoutExtension ( currentAssemblyPath ) ;
28-
29- // Replace the current assembly name with "PhotinoTestApp" in the entire path
30- var photinoTestAppPath = currentAssemblyPath . Replace ( currentAssemblyName , "PhotinoTestApp" ) ;
23+ // With the project reference, PhotinoTestApp.dll should be copied to the same directory as this test assembly
24+ var testAssemblyDirectory = Path . GetDirectoryName ( typeof ( WebViewManagerE2ETests ) . Assembly . Location ) ! ;
25+ var photinoTestAppPath = Path . Combine ( testAssemblyDirectory , "PhotinoTestApp.dll" ) ;
3126
3227 if ( ! File . Exists ( photinoTestAppPath ) )
3328 {
34- throw new FileNotFoundException ( $ "Could not find PhotinoTestApp.dll at: { photinoTestAppPath } ") ;
29+ throw new FileNotFoundException ( $ "Could not find PhotinoTestApp.dll at: { photinoTestAppPath } . " +
30+ "Ensure the PhotinoTestApp project reference is properly configured." ) ;
3531 }
3632
3733 // This test launches the PhotinoTestApp sample as an executable so that the Photino UI window
You can’t perform that action at this time.
0 commit comments