Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/Mvc/test/Mvc.FunctionalTests/HtmlGenerationTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public static TheoryData<string, string> WebPagesData
{ "Customer", "/Customer/HtmlGeneration_Customer" },
{ "Index", null },
{ "Product", null },
{ "Link", null },
{ "Script", null },
// Testing attribute values with boolean and null values
{ "AttributesWithBooleanValues", null },
// Testing SelectTagHelper with Html.BeginForm
Expand Down Expand Up @@ -135,13 +137,6 @@ public async Task HtmlGenerationWebSite_GeneratesExpectedResults(string action,
}
}

[ConditionalTheory]
[InlineData("Link", null)]
[InlineData("Script", null)]
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/10423")]
public Task HtmlGenerationWebSite_GeneratesExpectedResultsNotReadyForHelix(string action, string antiforgeryPath)
=> HtmlGenerationWebSite_GeneratesExpectedResults(action, antiforgeryPath);

[Fact]
public async Task HtmlGenerationWebSite_GeneratesExpectedResults_WithImageData()
{
Expand Down
3 changes: 1 addition & 2 deletions src/Mvc/test/Mvc.FunctionalTests/TagHelpersTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ public async Task CanRenderViewsWithTagHelpers(string action)
[InlineData("GlobbingTagHelpers")]
[InlineData("ViewComponentTagHelpers")]
[SkipOnHelix("https://github.com/dotnet/aspnetcore/issues/10423")]
public Task CanRenderViewsWithTagHelpersNotReadyForHelix(string action)
=> CanRenderViewsWithTagHelpers(action);
public Task CanRenderViewsWithTagHelpersNotReadyForHelix(string action) => CanRenderViewsWithTagHelpers(action);

[Fact]
public async Task GivesCorrectCallstackForSyncronousCalls()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
<link href="~/styles/site.css" rel="stylesheet" title="&lt;the title>" />

<!-- Globbed link tag with existing file -->
<link asp-href-include="**/site.css" rel="stylesheet" title="&lt;the title>" />
<link asp-href-include="**/styles/site.css" rel="stylesheet" title="&lt;the title>" />

<!-- Globbed link tag with comma separated pattern -->
<link asp-href-include="~/styles/*.css, ~/styles/sub/*.css" rel="stylesheet" title="&lt;the title" />

<!-- Globbed link tag with existing file and exclude -->
<link asp-href-include=" **/*.css" asp-href-exclude="**/site3*.css" rel="stylesheet" title='"the" title' />
<link asp-href-include=" **/styles/**/*.css" asp-href-exclude="**/site3*.css" rel="stylesheet" title='"the" title' />

<!-- Globbed link tag missing include -->
<link asp-href-exclude="**/site2.css" rel="stylesheet">
Expand All @@ -37,7 +37,7 @@
<link href="~/styles/site.css" asp-href-include="**/site2.css" rel="stylesheet" />

<!-- Globbed link tag with existing file and static href should dedupe -->
<link href="~/styles/site.css" asp-href-include="**/site.css" rel="stylesheet" />
<link href="~/styles/site.css" asp-href-include="**/styles/site.css" rel="stylesheet" />

<!-- Fallback to static href -->
<link href="~/styles/site.min.css?a=b&c=d" rel="stylesheet" data-extra="test" title='"the" title'
Expand Down Expand Up @@ -127,7 +127,7 @@

<!-- Fallback to globbed href -->
<link href="~/styles/site.min.css" rel="stylesheet" data-extra="test"
asp-fallback-href-include="**/site.css"
asp-fallback-href-include="**/styles/site.css"
asp-fallback-test-class="hidden"
asp-fallback-test-property="visibility"
asp-fallback-test-value="hidden" />
Expand All @@ -143,45 +143,45 @@
<!-- Fallback to static and globbed href should dedupe -->
<link href="~/styles/site.min.css" rel="stylesheet" data-extra="test"
asp-fallback-href="~/styles/site.css"
asp-fallback-href-include="**/site.css"
asp-fallback-href-include="**/styles/site.css"
asp-fallback-test-class="hidden"
asp-fallback-test-property="visibility"
asp-fallback-test-value="hidden" />

<!-- Fallback to static and globbed href with exclude -->
<link href="~/styles/site.min.css" rel="stylesheet" data-extra="test"
asp-fallback-href="~/styles/site.css"
asp-fallback-href-include="**/*.css"
asp-fallback-href-include="**/styles/**/*.css"
asp-fallback-href-exclude="**/site3*.css"
asp-fallback-test-class="hidden"
asp-fallback-test-property="visibility"
asp-fallback-test-value="hidden" />

<!-- Fallback from globbed href to globbed href -->
<link asp-href-include="styles/site.min.css" rel="stylesheet" data-extra="test"
asp-fallback-href-include="**/site.css"
asp-fallback-href-include="**/styles/site.css"
asp-fallback-test-class="hidden"
asp-fallback-test-property="visibility"
asp-fallback-test-value="hidden" />

<!-- Fallback from globbed href with exclude to globbed href -->
<link asp-href-include="**/*.min.css" asp-href-exclude="**/site3.min.css" rel="stylesheet" data-extra="test"
asp-fallback-href-include="**/site.css"
asp-fallback-href-include="**/styles/site.css"
asp-fallback-test-class="hidden"
asp-fallback-test-property="visibility"
asp-fallback-test-value="hidden" />

<!-- Fallback from globbed and static href to globbed href -->
<link href="styles/site.min.css" asp-href-include="styles/site.css" rel="stylesheet" data-extra="test"
asp-fallback-href-include="**/site.css"
asp-fallback-href-include="**/styles/site.css"
asp-fallback-test-class="hidden"
asp-fallback-test-property="visibility"
asp-fallback-test-value="hidden" />

<!-- Fallback from globbed and static href with exclude to globbed href -->
<link href="styles/site.min.css" asp-href-include="**/*.min.css" asp-href-exclude="**/site3.min.css"
rel="stylesheet" data-extra="test"
asp-fallback-href-include="**/site.css"
asp-fallback-href-include="**/styles/site.css"
asp-fallback-test-class="hidden"
asp-fallback-test-property="visibility"
asp-fallback-test-value="hidden">
Expand All @@ -190,7 +190,7 @@
<link href="styles/site.min.css" asp-href-include="**/*.min.css" asp-href-exclude="**/site3.min.css"
rel="stylesheet" data-extra="test"
asp-fallback-href="~/styles/site.css"
asp-fallback-href-include="**/*.css"
asp-fallback-href-include="**/styles/**/*.css"
asp-fallback-href-exclude="**/site3*.css"
asp-fallback-test-class="hidden"
asp-fallback-test-property="visibility"
Expand Down Expand Up @@ -232,7 +232,7 @@
<link href="~/styles/site.css" rel="stylesheet" asp-append-version="true" />

<!-- Globbed link tag with existing file and file version -->
<link asp-href-include="**/site.css" rel="stylesheet" asp-append-version="true" />
<link asp-href-include="**/styles/site.css" rel="stylesheet" asp-append-version="true" />

<!-- Fallback with file version -->
<link href="~/styles/site.min.css" rel="stylesheet" data-extra="test"
Expand All @@ -243,7 +243,7 @@
asp-append-version="true">

<!-- Globbed link tag with existing file, static href and file version -->
<link href="~/styles/site.css" asp-href-include="**/*.css" rel="stylesheet" asp-append-version="true" />
<link href="~/styles/site.css" asp-href-include="**/styles/**/*.css" rel="stylesheet" asp-append-version="true" />
</head>
<body>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</script>

<script src="~/blank.js"
asp-fallback-src-include="**/*.js"
asp-fallback-src-include="**/styles/**/*.js"
asp-fallback-src-exclude="**/site3.js"
asp-fallback-test="false">
// Fallback to globbed src with exclude
Expand Down Expand Up @@ -104,7 +104,7 @@
</script>

<!-- Globbed script tag with existing file and exclude -->
<script asp-src-include="**/*.js" asp-src-exclude="**/site3.js">
<script asp-src-include="**/styles/**/*.js" asp-src-exclude="**/site3.js">
// This comment shouldn't be emitted
</script>

Expand Down Expand Up @@ -149,12 +149,12 @@
</script>

<!-- Globbed script tag with existing files and version -->
<script asp-src-include="**/*.js" asp-append-version="true">
<script asp-src-include="**/styles/**/*.js" asp-append-version="true">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually put JavaScript under the styles directory? Seems weird...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really have any more context than you, but this is the expected styles directory https://github.com/dotnet/aspnetcore/tree/main/src/Mvc/test/WebSites/HtmlGenerationWebSite/wwwroot/styles, the issues it that all the test websites get their wwwroots combined when I did the helix conversion, since they all got squashed together, so **/*.js finds a bunch of extra files. I don't really have a simple fix for that, so I just updated it to look at the styles directory 🤷

// This comment shouldn't be emitted
</script>

<!-- Globbed script tag with existing file, exclude and version -->
<script asp-src-include="**/*.js" asp-src-exclude="**/site3.js" asp-append-version="true">
<script asp-src-include="**/styles/**/*.js" asp-src-exclude="**/site3.js" asp-append-version="true">
// This comment shouldn't be emitted
</script>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<!-- RazorClassLib folder wildcard -->
<script asp-src-include="/_content/RazorPagesClassLibrary/**/file.js"></script>
<!-- RazorClassLib deep wildcard -->
<script asp-src-include="/**/*.js"></script>
<script asp-src-include="/**/*.js" asp-src-exclude="/styles/**/*.js,/razorlib/*.js,/lib/**/*.js" ></script>
<!-- RazorClassLib Exclude local -->
<script asp-src-exclude="/js/dist/*.js" asp-src-include="**/*.js"></script>
<script asp-src-exclude="/js/dist/*.js,/styles/**/*.js,/razorlib/*.js,/lib/**/*.js" asp-src-include="**/*.js"></script>
<!-- local Exclude lib-->
<script asp-src-exclude="/_content/**/*.js" asp-src-include="**/*.js"></script>
<script asp-src-exclude="/_content/**/*.js,/styles/**/*.js,/razorlib/*.js,/lib/**/*.js" asp-src-include="**/*.js"></script>
}
Globbing