Skip to content

Commit 4c72f97

Browse files
committed
Reenable component E2E tests on helix
1 parent 806fef3 commit 4c72f97

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

src/Components/test/E2ETest/Infrastructure/ServerFixtures/ServerFixture.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ private static Dictionary<string, string> FindProjects()
4040

4141
protected static string FindSampleOrTestSitePath(string projectName)
4242
{
43+
if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
44+
{
45+
return Path.Combine(AppContext.BaseDirectory, projectName.Split(",")[0]);
46+
}
47+
4348
var projects = _projects.Value;
4449
if (projects.TryGetValue(projectName, out var dir))
4550
{

src/Components/test/E2ETest/Microsoft.AspNetCore.Components.E2ETests.csproj

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,10 @@
77
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
88
<TestGroupName>Components.E2ETests</TestGroupName>
99

10-
<!-- https://github.com/aspnet/AspNetCore/issues/6857 -->
11-
<BuildHelixPayload>false</BuildHelixPayload>
12-
1310
<!-- Run on platforms where we support Selenium -->
1411
<SkipTests Condition="'$(SeleniumE2ETestsSupported)' != 'true'">true</SkipTests>
1512

16-
<!-- Tests do not work on Helix or when bin/ directory is not in project directory due to undeclared dependency on test content. -->
17-
<BaseOutputPath />
18-
19-
<OutputPath />
20-
2113
<GenerateLoggingTestingAssemblyAttributes>false</GenerateLoggingTestingAssemblyAttributes>
22-
2314
</PropertyGroup>
2415

2516
<ItemGroup>
@@ -46,6 +37,17 @@
4637
<ProjectReference Include="..\testassets\BasicTestApp\BasicTestApp.csproj" />
4738
<ProjectReference Include="..\testassets\Ignitor\Ignitor.csproj" />
4839
<ProjectReference Include="..\testassets\TestServer\Components.TestServer.csproj" />
40+
<Content Include="..\testassets\**\*" />
41+
</ItemGroup>
42+
43+
<ItemGroup>
44+
<HelixPreCommand Include="call npm i yarn;call node_modules\.bin\yarn install" />
45+
<HelixContent Include="package.json" />
46+
<HelixContent Include="yarn.lock" />
47+
<!-- This is currently windows only -->
48+
<HelixProjectPlatform Remove="Linux;OSX" />
49+
<HelixProjectPlatform Remove="@(HelixProjectPlatform)" />
50+
<HelixProjectTargetQueue Include="Windows.10.Amd64.ClientRS4.VS2017.Open" />
4951
</ItemGroup>
5052

5153
<!-- Shared testing infrastructure for running E2E tests using selenium -->

src/Shared/E2ETesting/SeleniumStandaloneServer.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ private static async Task InitializeInstance(ITestOutputHelper output)
100100
psi.Arguments = $"/c npm {psi.Arguments}";
101101
}
102102

103+
if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
104+
{
105+
// Just create a random tracking folder on helix
106+
trackingFolder = Path.Combine(Directory.GetCurrentDirectory(), Path.GetRandomFileName());
107+
Directory.CreateDirectory(trackingFolder);
108+
}
109+
103110
// It's important that we get the folder value before we start the process to prevent
104111
// untracked processes when the tracking folder is not correctly configure.
105112
var trackingFolder = GetProcessTrackingFolder();

0 commit comments

Comments
 (0)