diff --git a/src/ProjectTemplates/test/ByteOrderMarkTest.cs b/src/ProjectTemplates/test/ByteOrderMarkTest.cs index 6e6ed2a352..465d2c4114 100644 --- a/src/ProjectTemplates/test/ByteOrderMarkTest.cs +++ b/src/ProjectTemplates/test/ByteOrderMarkTest.cs @@ -1,12 +1,10 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; -using Microsoft.AspNetCore.Testing; using Xunit; using Xunit.Abstractions; diff --git a/src/ProjectTemplates/test/IdentityUIPackageTest.cs b/src/ProjectTemplates/test/IdentityUIPackageTest.cs index b89c19b61a..6d907b954b 100644 --- a/src/ProjectTemplates/test/IdentityUIPackageTest.cs +++ b/src/ProjectTemplates/test/IdentityUIPackageTest.cs @@ -26,59 +26,6 @@ namespace Templates.Test public ITestOutputHelper Output { get; } - public static TheoryData, string, string[]> MSBuildIdentityUIPackageOptions - { - get - { - var data = new TheoryData, string, string[]>(); - - data.Add(new Dictionary - { - ["IdentityUIFrameworkVersion"] = "Bootstrap3" - }, - "Bootstrap v3.4.1", - Bootstrap3ContentFiles); - - data.Add(new Dictionary(), "Bootstrap v4.3.1", Bootstrap4ContentFiles); - - return data; - } - } - - public static string[] Bootstrap3ContentFiles { get; } = new string[] - { - "Identity/css/site.css", - "Identity/js/site.js", - "Identity/lib/bootstrap/dist/css/bootstrap-theme.css", - "Identity/lib/bootstrap/dist/css/bootstrap-theme.css.map", - "Identity/lib/bootstrap/dist/css/bootstrap-theme.min.css", - "Identity/lib/bootstrap/dist/css/bootstrap-theme.min.css.map", - "Identity/lib/bootstrap/dist/css/bootstrap.css", - "Identity/lib/bootstrap/dist/css/bootstrap.css.map", - "Identity/lib/bootstrap/dist/css/bootstrap.min.css", - "Identity/lib/bootstrap/dist/css/bootstrap.min.css.map", - "Identity/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot", - "Identity/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.svg", - "Identity/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf", - "Identity/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff", - "Identity/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2", - "Identity/lib/bootstrap/dist/js/bootstrap.js", - "Identity/lib/bootstrap/dist/js/bootstrap.min.js", - "Identity/lib/bootstrap/dist/js/npm.js", - "Identity/lib/jquery/LICENSE.txt", - "Identity/lib/jquery/dist/jquery.js", - "Identity/lib/jquery/dist/jquery.min.js", - "Identity/lib/jquery/dist/jquery.min.map", - "Identity/lib/jquery-validation/LICENSE.md", - "Identity/lib/jquery-validation/dist/additional-methods.js", - "Identity/lib/jquery-validation/dist/additional-methods.min.js", - "Identity/lib/jquery-validation/dist/jquery.validate.js", - "Identity/lib/jquery-validation/dist/jquery.validate.min.js", - "Identity/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js", - "Identity/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js", - "Identity/lib/jquery-validation-unobtrusive/LICENSE.txt", - }; - public static string[] Bootstrap4ContentFiles { get; } = new string[] { "Identity/favicon.ico", @@ -118,12 +65,12 @@ namespace Templates.Test "Identity/lib/jquery-validation-unobtrusive/LICENSE.txt", }; - [ConditionalTheory] - [MemberData(nameof(MSBuildIdentityUIPackageOptions))] + [ConditionalFact] [SkipOnHelix("cert failure", Queues = "OSX.1014.Amd64;OSX.1014.Amd64.Open")] [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/19716")] - public async Task IdentityUIPackage_WorksWithDifferentOptions(IDictionary packageOptions, string versionValidator, string[] expectedFiles) + public async Task IdentityUIPackage_WorksWithDifferentOptions() { + var packageOptions = new Dictionary(); Project = await ProjectFactory.GetOrCreateProject("identityuipackage" + string.Concat(packageOptions.Values), Output); var useLocalDB = false; @@ -147,6 +94,7 @@ namespace Templates.Test Assert.True(0 == migrationsResult.ExitCode, ErrorMessages.GetFailedProcessMessage("run EF migrations", Project, migrationsResult)); Project.AssertEmptyMigration("razorpages"); + var versionValidator = "Bootstrap v4.3.1"; using (var aspNetProcess = Project.StartBuiltProjectAsync()) { Assert.False( @@ -156,7 +104,7 @@ namespace Templates.Test var response = await aspNetProcess.SendRequest("/Identity/lib/bootstrap/dist/css/bootstrap.css"); Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Contains(versionValidator, await response.Content.ReadAsStringAsync()); - await ValidatePublishedFiles(aspNetProcess, expectedFiles); + await ValidatePublishedFiles(aspNetProcess, Bootstrap4ContentFiles); } using (var aspNetProcess = Project.StartPublishedProjectAsync()) @@ -168,7 +116,7 @@ namespace Templates.Test var response = await aspNetProcess.SendRequest("/Identity/lib/bootstrap/dist/css/bootstrap.css"); Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Contains(versionValidator, await response.Content.ReadAsStringAsync()); - await ValidatePublishedFiles(aspNetProcess, expectedFiles); + await ValidatePublishedFiles(aspNetProcess, Bootstrap4ContentFiles); } } diff --git a/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj b/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj index 7e143f533a..ca40318bc5 100644 --- a/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj +++ b/src/ProjectTemplates/test/ProjectTemplates.Tests.csproj @@ -1,4 +1,4 @@ - + @@ -39,6 +39,10 @@ + + + + false