Skip to content

Commit 6140821

Browse files
committed
Fix identity UI script tests on helix
1 parent e455c2c commit 6140821

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

src/Identity/test/Identity.Test/IdentityUIScriptsTest.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ public static IEnumerable<object[]> ScriptWithIntegrityData
3838
}
3939
}
4040

41-
[ConditionalTheory]
42-
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6549
41+
[Theory]
4342
[MemberData(nameof(ScriptWithIntegrityData))]
4443
public async Task IdentityUI_ScriptTags_SubresourceIntegrityCheck(ScriptTag scriptTag)
4544
{
@@ -67,8 +66,7 @@ public static IEnumerable<object[]> ScriptWithFallbackSrcData
6766
}
6867
}
6968

70-
[ConditionalTheory]
71-
[SkipOnHelix] // https://github.com/aspnet/AspNetCore/issues/6549
69+
[Theory]
7270
[MemberData(nameof(ScriptWithFallbackSrcData))]
7371
public async Task IdentityUI_ScriptTags_FallbackSourceContent_Matches_CDNContent(ScriptTag scriptTag)
7472
{
@@ -147,13 +145,17 @@ private static List<ScriptTag> GetScriptTags(string cshtmlFile)
147145
private static string GetSolutionDir()
148146
{
149147
var dir = new DirectoryInfo(AppContext.BaseDirectory);
150-
while (dir != null)
148+
// On helix we use the published copy
149+
if (!string.Equals(Environment.GetEnvironmentVariable("helix"), "true", StringComparison.OrdinalIgnoreCase))
151150
{
152-
if (File.Exists(Path.Combine(dir.FullName, "Identity.sln")))
151+
while (dir != null)
153152
{
154-
break;
153+
if (File.Exists(Path.Combine(dir.FullName, "Identity.sln")))
154+
{
155+
break;
156+
}
157+
dir = dir.Parent;
155158
}
156-
dir = dir.Parent;
157159
}
158160
return dir.FullName;
159161
}

src/Identity/test/Identity.Test/Microsoft.AspNetCore.Identity.Test.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
<ItemGroup>
88
<Compile Include="$(IdentityTestSharedSourceRoot)**\*.cs" />
99
<Compile Include="$(SharedSourceRoot)test\SkipOnHelixAttribute.cs" />
10+
<Content Include="..\..\UI\src\Areas\Identity\Pages\**\*.*" CopyToPublishDirectory="PreserveNewest" LinkBase="UI\src\Areas\Identity\Pages" />
11+
<Content Include="..\..\UI\src\wwwroot\**\*.*" CopyToPublishDirectory="PreserveNewest" LinkBase="UI\src\wwwroot" />
1012
</ItemGroup>
1113

1214
<ItemGroup>

0 commit comments

Comments
 (0)