Date: Thu, 16 May 2019 15:52:11 +0100
Subject: [PATCH 07/13] Prepare for E2E test implementations
---
.../test/testassets/BasicTestApp/AuthTest/Links.razor | 10 +++++-----
.../testassets/TestServer/Pages/Authentication.cshtml | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/Components/test/testassets/BasicTestApp/AuthTest/Links.razor b/src/Components/test/testassets/BasicTestApp/AuthTest/Links.razor
index ae8b00217d5a..70f524a76393 100644
--- a/src/Components/test/testassets/BasicTestApp/AuthTest/Links.razor
+++ b/src/Components/test/testassets/BasicTestApp/AuthTest/Links.razor
@@ -1,8 +1,8 @@
@using Microsoft.AspNetCore.Components.Routing
-
- - Home
- - Cascading authentication state
- - AuthorizeView cases
-
+
+ - Home
+ - Cascading authentication state
+ - AuthorizeView cases
+
To change the underlying authentication state, go here.
diff --git a/src/Components/test/testassets/TestServer/Pages/Authentication.cshtml b/src/Components/test/testassets/TestServer/Pages/Authentication.cshtml
index f3314230570e..3f6cbdefd58c 100644
--- a/src/Components/test/testassets/TestServer/Pages/Authentication.cshtml
+++ b/src/Components/test/testassets/TestServer/Pages/Authentication.cshtml
@@ -7,7 +7,7 @@
Authentication
- Authentication
+ Authentication
This is a completely fake login mechanism for automated test purposes.
It accepts any username, with no password.
From 17813bcb3cb957ef67938febe9f12ab6dff69691 Mon Sep 17 00:00:00 2001
From: Steve Sanderson
Date: Thu, 16 May 2019 16:07:16 +0100
Subject: [PATCH 08/13] Fix ToBaseRelativePath handling of hashes
... otherwise E2E test will fail, because we're using the hash to control server-or-client execution
---
.../Blazor/Blazor/test/WebAssemblyUriHelperTest.cs | 3 +++
src/Components/Components/src/UriHelperBase.cs | 7 +++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/Components/Blazor/Blazor/test/WebAssemblyUriHelperTest.cs b/src/Components/Blazor/Blazor/test/WebAssemblyUriHelperTest.cs
index 45c94a71d2fb..2903d7fcd3e3 100644
--- a/src/Components/Blazor/Blazor/test/WebAssemblyUriHelperTest.cs
+++ b/src/Components/Blazor/Blazor/test/WebAssemblyUriHelperTest.cs
@@ -29,6 +29,9 @@ public void ComputesCorrectBaseUri(string baseUri, string expectedResult)
[InlineData("scheme://host/path/", "scheme://host/path/", "")]
[InlineData("scheme://host/path/", "scheme://host/path/more", "more")]
[InlineData("scheme://host/path/", "scheme://host/path", "")]
+ [InlineData("scheme://host/path/", "scheme://host/path#hash", "#hash")]
+ [InlineData("scheme://host/path/", "scheme://host/path/#hash", "#hash")]
+ [InlineData("scheme://host/path/", "scheme://host/path/more#hash", "more#hash")]
public void ComputesCorrectValidBaseRelativePaths(string baseUri, string absoluteUri, string expectedResult)
{
var actualResult = _uriHelper.ToBaseRelativePath(baseUri, absoluteUri);
diff --git a/src/Components/Components/src/UriHelperBase.cs b/src/Components/Components/src/UriHelperBase.cs
index 41af519eca0a..3b8f0910452f 100644
--- a/src/Components/Components/src/UriHelperBase.cs
+++ b/src/Components/Components/src/UriHelperBase.cs
@@ -154,7 +154,10 @@ public string ToBaseRelativePath(string baseUri, string locationAbsolute)
// baseUri ends with a slash), and from that we return "something"
return locationAbsolute.Substring(baseUri.Length);
}
- else if ($"{locationAbsolute}/".Equals(baseUri, StringComparison.Ordinal))
+
+ var hashIndex = locationAbsolute.IndexOf('#');
+ var locationAbsoluteNoHash = hashIndex < 0 ? locationAbsolute : locationAbsolute.Substring(0, hashIndex);
+ if ($"{locationAbsoluteNoHash}/".Equals(baseUri, StringComparison.Ordinal))
{
// Special case: for the base URI "/something/", if you're at
// "/something" then treat it as if you were at "/something/" (i.e.,
@@ -162,7 +165,7 @@ public string ToBaseRelativePath(string baseUri, string locationAbsolute)
// whether the server would return the same page whether or not the
// slash is present, but ASP.NET Core at least does by default when
// using PathBase.
- return string.Empty;
+ return locationAbsolute.Substring(baseUri.Length - 1);
}
var message = $"The URI '{locationAbsolute}' is not contained by the base URI '{baseUri}'.";
From 3e00ee90393262ed940b22fa101ff8bd20c149ca Mon Sep 17 00:00:00 2001
From: Steve Sanderson
Date: Thu, 16 May 2019 16:28:17 +0100
Subject: [PATCH 09/13] Decouple E2E execution mode from hosting mode
---
.../test/E2ETest/Infrastructure/BasicTestAppTestBase.cs | 2 +-
.../ServerFixtures/ToggleExecutionModeServerFixture.cs | 6 ++++--
.../ServerExecutionTests/ServerExecutionTestExtensions.cs | 1 +
src/Components/test/E2ETest/Tests/BindTest.cs | 2 +-
src/Components/test/E2ETest/Tests/CascadingValueTest.cs | 2 +-
src/Components/test/E2ETest/Tests/ComponentRenderingTest.cs | 2 +-
src/Components/test/E2ETest/Tests/EventBubblingTest.cs | 2 +-
src/Components/test/E2ETest/Tests/EventCallbackTest.cs | 2 +-
src/Components/test/E2ETest/Tests/FormsTest.cs | 2 +-
src/Components/test/E2ETest/Tests/InteropTest.cs | 2 +-
src/Components/test/E2ETest/Tests/KeyTest.cs | 2 +-
11 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/src/Components/test/E2ETest/Infrastructure/BasicTestAppTestBase.cs b/src/Components/test/E2ETest/Infrastructure/BasicTestAppTestBase.cs
index d4933b858edb..62d62f0d6878 100644
--- a/src/Components/test/E2ETest/Infrastructure/BasicTestAppTestBase.cs
+++ b/src/Components/test/E2ETest/Infrastructure/BasicTestAppTestBase.cs
@@ -15,7 +15,7 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Infrastructure
public class BasicTestAppTestBase : ServerTestBase>
{
public string ServerPathBase
- => "/subdir" + (_serverFixture.UsingAspNetHost ? "#server" : "");
+ => "/subdir" + (_serverFixture.ExecutionMode == ExecutionMode.Server ? "#server" : "");
public BasicTestAppTestBase(
BrowserFixture browserFixture,
diff --git a/src/Components/test/E2ETest/Infrastructure/ServerFixtures/ToggleExecutionModeServerFixture.cs b/src/Components/test/E2ETest/Infrastructure/ServerFixtures/ToggleExecutionModeServerFixture.cs
index 9fb9863f6024..759b87185228 100644
--- a/src/Components/test/E2ETest/Infrastructure/ServerFixtures/ToggleExecutionModeServerFixture.cs
+++ b/src/Components/test/E2ETest/Infrastructure/ServerFixtures/ToggleExecutionModeServerFixture.cs
@@ -9,7 +9,8 @@ public class ToggleExecutionModeServerFixture
: ServerFixture
{
public string PathBase { get; set; }
- public bool UsingAspNetHost { get; private set; }
+
+ public ExecutionMode ExecutionMode { get; set; } = ExecutionMode.Client;
private AspNetSiteServerFixture.BuildWebHost _buildWebHostMethod;
private IDisposable _serverToDispose;
@@ -18,7 +19,6 @@ public void UseAspNetHost(AspNetSiteServerFixture.BuildWebHost buildWebHostMetho
{
_buildWebHostMethod = buildWebHostMethod
?? throw new ArgumentNullException(nameof(buildWebHostMethod));
- UsingAspNetHost = true;
}
protected override string StartAndGetRootUri()
@@ -46,4 +46,6 @@ public override void Dispose()
_serverToDispose?.Dispose();
}
}
+
+ public enum ExecutionMode { Client, Server }
}
diff --git a/src/Components/test/E2ETest/ServerExecutionTests/ServerExecutionTestExtensions.cs b/src/Components/test/E2ETest/ServerExecutionTests/ServerExecutionTestExtensions.cs
index e867e03a9b9b..c8e34f36cda1 100644
--- a/src/Components/test/E2ETest/ServerExecutionTests/ServerExecutionTestExtensions.cs
+++ b/src/Components/test/E2ETest/ServerExecutionTests/ServerExecutionTestExtensions.cs
@@ -10,6 +10,7 @@ internal static class ServerExecutionTestExtensions
public static ToggleExecutionModeServerFixture WithServerExecution(this ToggleExecutionModeServerFixture serverFixture)
{
serverFixture.UseAspNetHost(TestServer.Program.BuildWebHost);
+ serverFixture.ExecutionMode = ExecutionMode.Server;
return serverFixture;
}
}
diff --git a/src/Components/test/E2ETest/Tests/BindTest.cs b/src/Components/test/E2ETest/Tests/BindTest.cs
index b08a315441ce..51fcc9ea9d1d 100644
--- a/src/Components/test/E2ETest/Tests/BindTest.cs
+++ b/src/Components/test/E2ETest/Tests/BindTest.cs
@@ -25,7 +25,7 @@ public BindTest(
protected override void InitializeAsyncCore()
{
// On WebAssembly, page reloads are expensive so skip if possible
- Navigate(ServerPathBase, noReload: !_serverFixture.UsingAspNetHost);
+ Navigate(ServerPathBase, noReload: _serverFixture.ExecutionMode == ExecutionMode.Client);
MountTestComponent();
WaitUntilExists(By.Id("bind-cases"));
}
diff --git a/src/Components/test/E2ETest/Tests/CascadingValueTest.cs b/src/Components/test/E2ETest/Tests/CascadingValueTest.cs
index 8102be1e58d8..e4642fa98c1f 100644
--- a/src/Components/test/E2ETest/Tests/CascadingValueTest.cs
+++ b/src/Components/test/E2ETest/Tests/CascadingValueTest.cs
@@ -24,7 +24,7 @@ public CascadingValueTest(
protected override void InitializeAsyncCore()
{
- Navigate(ServerPathBase, noReload: !_serverFixture.UsingAspNetHost);
+ Navigate(ServerPathBase, noReload: _serverFixture.ExecutionMode == ExecutionMode.Client);
MountTestComponent();
}
diff --git a/src/Components/test/E2ETest/Tests/ComponentRenderingTest.cs b/src/Components/test/E2ETest/Tests/ComponentRenderingTest.cs
index 5c8e194cac28..c88d2997c6d5 100644
--- a/src/Components/test/E2ETest/Tests/ComponentRenderingTest.cs
+++ b/src/Components/test/E2ETest/Tests/ComponentRenderingTest.cs
@@ -31,7 +31,7 @@ public ComponentRenderingTest(
protected override void InitializeAsyncCore()
{
- Navigate(ServerPathBase, noReload: !_serverFixture.UsingAspNetHost);
+ Navigate(ServerPathBase, noReload: _serverFixture.ExecutionMode == ExecutionMode.Client);
}
[Fact]
diff --git a/src/Components/test/E2ETest/Tests/EventBubblingTest.cs b/src/Components/test/E2ETest/Tests/EventBubblingTest.cs
index a15d1b31d42b..f45e3d106a75 100644
--- a/src/Components/test/E2ETest/Tests/EventBubblingTest.cs
+++ b/src/Components/test/E2ETest/Tests/EventBubblingTest.cs
@@ -31,7 +31,7 @@ public EventBubblingTest(
protected override void InitializeAsyncCore()
{
- Navigate(ServerPathBase, noReload: !_serverFixture.UsingAspNetHost);
+ Navigate(ServerPathBase, noReload: _serverFixture.ExecutionMode == ExecutionMode.Client);
MountTestComponent();
WaitUntilExists(By.Id("event-bubbling"));
}
diff --git a/src/Components/test/E2ETest/Tests/EventCallbackTest.cs b/src/Components/test/E2ETest/Tests/EventCallbackTest.cs
index 4e5472a88a78..01d53d6b20a1 100644
--- a/src/Components/test/E2ETest/Tests/EventCallbackTest.cs
+++ b/src/Components/test/E2ETest/Tests/EventCallbackTest.cs
@@ -25,7 +25,7 @@ public EventCallbackTest(
protected override void InitializeAsyncCore()
{
// On WebAssembly, page reloads are expensive so skip if possible
- Navigate(ServerPathBase, noReload: !_serverFixture.UsingAspNetHost);
+ Navigate(ServerPathBase, noReload: _serverFixture.ExecutionMode == ExecutionMode.Client);
MountTestComponent();
}
diff --git a/src/Components/test/E2ETest/Tests/FormsTest.cs b/src/Components/test/E2ETest/Tests/FormsTest.cs
index 88f2a0d9fbf9..9f1083af204b 100644
--- a/src/Components/test/E2ETest/Tests/FormsTest.cs
+++ b/src/Components/test/E2ETest/Tests/FormsTest.cs
@@ -31,7 +31,7 @@ public FormsTest(
protected override void InitializeAsyncCore()
{
// On WebAssembly, page reloads are expensive so skip if possible
- Navigate(ServerPathBase, noReload: !_serverFixture.UsingAspNetHost);
+ Navigate(ServerPathBase, noReload: _serverFixture.ExecutionMode == ExecutionMode.Client);
}
[Fact]
diff --git a/src/Components/test/E2ETest/Tests/InteropTest.cs b/src/Components/test/E2ETest/Tests/InteropTest.cs
index 4b82c9809685..7ab262c46518 100644
--- a/src/Components/test/E2ETest/Tests/InteropTest.cs
+++ b/src/Components/test/E2ETest/Tests/InteropTest.cs
@@ -104,7 +104,7 @@ public void CanInvokeDotNetMethods()
// Include the sync assertions only when running under WebAssembly
var expectedValues = expectedAsyncValues;
- if (!_serverFixture.UsingAspNetHost)
+ if (_serverFixture.ExecutionMode == ExecutionMode.Client)
{
foreach (var kvp in expectedSyncValues)
{
diff --git a/src/Components/test/E2ETest/Tests/KeyTest.cs b/src/Components/test/E2ETest/Tests/KeyTest.cs
index b7a55196949e..2cb0e58d1827 100644
--- a/src/Components/test/E2ETest/Tests/KeyTest.cs
+++ b/src/Components/test/E2ETest/Tests/KeyTest.cs
@@ -30,7 +30,7 @@ public KeyTest(
protected override void InitializeAsyncCore()
{
// On WebAssembly, page reloads are expensive so skip if possible
- Navigate(ServerPathBase, noReload: !_serverFixture.UsingAspNetHost);
+ Navigate(ServerPathBase, noReload: _serverFixture.ExecutionMode == ExecutionMode.Client);
}
[Fact]
From ec218ef7d07e7f4c09d0ba901db6d37dedd3ad5e Mon Sep 17 00:00:00 2001
From: Steve Sanderson
Date: Thu, 16 May 2019 16:36:36 +0100
Subject: [PATCH 10/13] Actual E2E tests for cascading authentication state
---
.../ServerExecutionTests/TestSubclasses.cs | 8 ++
src/Components/test/E2ETest/Tests/AuthTest.cs | 73 +++++++++++++++++++
2 files changed, 81 insertions(+)
create mode 100644 src/Components/test/E2ETest/Tests/AuthTest.cs
diff --git a/src/Components/test/E2ETest/ServerExecutionTests/TestSubclasses.cs b/src/Components/test/E2ETest/ServerExecutionTests/TestSubclasses.cs
index 9265718d5492..1f16095af57c 100644
--- a/src/Components/test/E2ETest/ServerExecutionTests/TestSubclasses.cs
+++ b/src/Components/test/E2ETest/ServerExecutionTests/TestSubclasses.cs
@@ -81,4 +81,12 @@ public ServerKeyTest(BrowserFixture browserFixture, ToggleExecutionModeServerFix
{
}
}
+
+ public class ServerAuthTest : AuthTest
+ {
+ public ServerAuthTest(BrowserFixture browserFixture, ToggleExecutionModeServerFixture serverFixture, ITestOutputHelper output)
+ : base(browserFixture, serverFixture.WithServerExecution(), output)
+ {
+ }
+ }
}
diff --git a/src/Components/test/E2ETest/Tests/AuthTest.cs b/src/Components/test/E2ETest/Tests/AuthTest.cs
new file mode 100644
index 000000000000..fe0dcb9af921
--- /dev/null
+++ b/src/Components/test/E2ETest/Tests/AuthTest.cs
@@ -0,0 +1,73 @@
+// 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 BasicTestApp;
+using Microsoft.AspNetCore.Components.E2ETest.Infrastructure;
+using Microsoft.AspNetCore.Components.E2ETest.Infrastructure.ServerFixtures;
+using Microsoft.AspNetCore.E2ETesting;
+using OpenQA.Selenium;
+using Xunit;
+using Xunit.Abstractions;
+
+namespace Microsoft.AspNetCore.Components.E2ETest.Tests
+{
+ public class AuthTest : BasicTestAppTestBase
+ {
+ const string CascadingAuthenticationStateLink = "Cascading authentication state";
+
+ public AuthTest(
+ BrowserFixture browserFixture,
+ ToggleExecutionModeServerFixture serverFixture,
+ ITestOutputHelper output)
+ : base(browserFixture, serverFixture, output)
+ {
+ // Normally, the E2E tests use the Blazor dev server if they are testing
+ // client-side execution. But for the auth tests, we always have to run
+ // in "hosted on ASP.NET Core" mode, because we get the auth state from it.
+ serverFixture.UseAspNetHost(TestServer.Program.BuildWebHost);
+ }
+
+ [Fact]
+ public void CascadingAuthenticationState_Unauthenticated()
+ {
+ SignInAs(null);
+
+ var appElement = MountAndNavigateToAuthTest(CascadingAuthenticationStateLink);
+
+ Browser.Equal("False", () => appElement.FindElement(By.Id("identity-authenticated")).Text);
+ Browser.Equal(string.Empty, () => appElement.FindElement(By.Id("identity-name")).Text);
+ Browser.Equal("(none)", () => appElement.FindElement(By.Id("test-claim")).Text);
+ }
+
+ [Fact]
+ public void CascadingAuthenticationState_Authenticated()
+ {
+ SignInAs("someone cool");
+
+ var appElement = MountAndNavigateToAuthTest(CascadingAuthenticationStateLink);
+
+ Browser.Equal("True", () => appElement.FindElement(By.Id("identity-authenticated")).Text);
+ Browser.Equal("someone cool", () => appElement.FindElement(By.Id("identity-name")).Text);
+ Browser.Equal("Test claim value", () => appElement.FindElement(By.Id("test-claim")).Text);
+ }
+
+ IWebElement MountAndNavigateToAuthTest(string authLinkText)
+ {
+ Navigate(ServerPathBase);
+ var appElement = MountTestComponent();
+ WaitUntilExists(By.Id("auth-links"));
+ appElement.FindElement(By.LinkText(authLinkText)).Click();
+ return appElement;
+ }
+
+ void SignInAs(string usernameOrNull)
+ {
+ const string authenticationPageUrl = "/Authentication";
+ var baseRelativeUri = usernameOrNull == null
+ ? $"{authenticationPageUrl}?signout=true"
+ : $"{authenticationPageUrl}?username={usernameOrNull}";
+ Navigate(baseRelativeUri);
+ WaitUntilExists(By.CssSelector("h1#authentication"));
+ }
+ }
+}
From 746f2c90f501498af7fa6aac97b9ec4eed88434d Mon Sep 17 00:00:00 2001
From: Steve Sanderson
Date: Thu, 16 May 2019 16:50:31 +0100
Subject: [PATCH 11/13] Actual E2E tests for AuthorizeView (in "no
authentication rule" mode)
---
src/Components/test/E2ETest/Tests/AuthTest.cs | 19 +++++++++++++++++++
.../AuthTest/AuthorizeViewCases.razor | 4 ++--
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/src/Components/test/E2ETest/Tests/AuthTest.cs b/src/Components/test/E2ETest/Tests/AuthTest.cs
index fe0dcb9af921..cc3139b6abde 100644
--- a/src/Components/test/E2ETest/Tests/AuthTest.cs
+++ b/src/Components/test/E2ETest/Tests/AuthTest.cs
@@ -13,7 +13,9 @@ namespace Microsoft.AspNetCore.Components.E2ETest.Tests
{
public class AuthTest : BasicTestAppTestBase
{
+ // These strings correspond to the links in BasicTestApp\AuthTest\Links.razor
const string CascadingAuthenticationStateLink = "Cascading authentication state";
+ const string AuthorizeViewCases = "AuthorizeView cases";
public AuthTest(
BrowserFixture browserFixture,
@@ -51,6 +53,23 @@ public void CascadingAuthenticationState_Authenticated()
Browser.Equal("Test claim value", () => appElement.FindElement(By.Id("test-claim")).Text);
}
+ [Fact]
+ public void AuthorizeViewCases_NoAuthorizationRule_Unauthenticated()
+ {
+ SignInAs(null);
+ MountAndNavigateToAuthTest(AuthorizeViewCases);
+ WaitUntilExists(By.CssSelector("#no-authorization-rule .not-authorized"));
+ }
+
+ [Fact]
+ public void AuthorizeViewCases_NoAuthorizationRule_Authenticated()
+ {
+ SignInAs("Some User");
+ var appElement = MountAndNavigateToAuthTest(AuthorizeViewCases);
+ Browser.Equal("Welcome, Some User!", () =>
+ appElement.FindElement(By.CssSelector("#no-authorization-rule .authorized")).Text);
+ }
+
IWebElement MountAndNavigateToAuthTest(string authLinkText)
{
Navigate(ServerPathBase);
diff --git a/src/Components/test/testassets/BasicTestApp/AuthTest/AuthorizeViewCases.razor b/src/Components/test/testassets/BasicTestApp/AuthTest/AuthorizeViewCases.razor
index 6f40dac90894..d78c70f72a08 100644
--- a/src/Components/test/testassets/BasicTestApp/AuthTest/AuthorizeViewCases.razor
+++ b/src/Components/test/testassets/BasicTestApp/AuthTest/AuthorizeViewCases.razor
@@ -1,7 +1,7 @@
@page "/AuthorizeViewCases"
-
-
Scenario: No authorization rules
+
+
Scenario: No authorization rule
From 933a45b240acec3998f1c89e1e4a34c9a41915af Mon Sep 17 00:00:00 2001
From: Steve Sanderson
Date: Thu, 16 May 2019 16:55:55 +0100
Subject: [PATCH 12/13] Fix inconsistent namespace
---
.../test/E2ETest/ServerExecutionTests/PrerenderingTest.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Components/test/E2ETest/ServerExecutionTests/PrerenderingTest.cs b/src/Components/test/E2ETest/ServerExecutionTests/PrerenderingTest.cs
index be5e99619680..b7b6d361c805 100644
--- a/src/Components/test/E2ETest/ServerExecutionTests/PrerenderingTest.cs
+++ b/src/Components/test/E2ETest/ServerExecutionTests/PrerenderingTest.cs
@@ -8,7 +8,7 @@
using Xunit;
using Xunit.Abstractions;
-namespace Microsoft.AspNetCore.Components.E2ETests.ServerExecutionTests
+namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests
{
public class PrerenderingTest : ServerTestBase
{
From bd25b9b43a8eb1b72707d1bf1d350e753c5d3211 Mon Sep 17 00:00:00 2001
From: Steve Sanderson
Date: Thu, 16 May 2019 17:02:54 +0100
Subject: [PATCH 13/13] CR: Manual ref assembly definitions for
AuthorizeView/CascadingAuthenticationState
---
eng/GenAPI.exclusions.txt | 2 ++
...etCore.Components.netstandard2.0.Manual.cs | 26 +++++++++++++++++++
...ft.AspNetCore.Components.netstandard2.0.cs | 24 -----------------
3 files changed, 28 insertions(+), 24 deletions(-)
diff --git a/eng/GenAPI.exclusions.txt b/eng/GenAPI.exclusions.txt
index 61d8c412b296..4595fc772a0c 100644
--- a/eng/GenAPI.exclusions.txt
+++ b/eng/GenAPI.exclusions.txt
@@ -4,6 +4,8 @@ T:Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame
T:Microsoft.AspNetCore.Mvc.ApplicationModels.PageParameterModel
T:Microsoft.AspNetCore.Mvc.ApplicationModels.PagePropertyModel
# Manually implemented - https://github.com/aspnet/AspNetCore/issues/8825
+T:Microsoft.AspNetCore.Components.AuthorizeView
+T:Microsoft.AspNetCore.Components.CascadingAuthenticationState
T:Microsoft.AspNetCore.Components.CascadingValue`1
T:Microsoft.AspNetCore.Components.Forms.DataAnnotationsValidator
T:Microsoft.AspNetCore.Components.Forms.EditForm
diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.Manual.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.Manual.cs
index 19c9249e47cb..72db875d4874 100644
--- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.Manual.cs
+++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.Manual.cs
@@ -49,6 +49,32 @@ public readonly partial struct RenderTreeFrame
// Built-in components: https://github.com/aspnet/AspNetCore/issues/8825
namespace Microsoft.AspNetCore.Components
{
+ public partial class AuthorizeView : Microsoft.AspNetCore.Components.ComponentBase
+ {
+ public AuthorizeView() { }
+ [Microsoft.AspNetCore.Components.ParameterAttribute]
+ public Microsoft.AspNetCore.Components.RenderFragment Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } }
+ [Microsoft.AspNetCore.Components.ParameterAttribute]
+ public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } }
+ [Microsoft.AspNetCore.Components.ParameterAttribute]
+ public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } }
+ [Microsoft.AspNetCore.Components.ParameterAttribute]
+ public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } }
+ protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { }
+ [System.Diagnostics.DebuggerStepThroughAttribute]
+ protected override System.Threading.Tasks.Task OnParametersSetAsync() { throw null; }
+ }
+
+ public partial class CascadingAuthenticationState : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable
+ {
+ public CascadingAuthenticationState() { }
+ [Microsoft.AspNetCore.Components.ParameterAttribute]
+ public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } private set { throw null; } }
+ protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { }
+ protected override void OnInit() { }
+ void System.IDisposable.Dispose() { }
+ }
+
public partial class CascadingValue : Microsoft.AspNetCore.Components.IComponent
{
public CascadingValue() { }
diff --git a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs
index 1729a18ed154..a1b3d1e2f8c4 100644
--- a/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs
+++ b/src/Components/Components/ref/Microsoft.AspNetCore.Components.netstandard2.0.cs
@@ -16,21 +16,6 @@ public event Microsoft.AspNetCore.Components.AuthenticationStateChangedHandler A
public abstract System.Threading.Tasks.Task GetAuthenticationStateAsync();
protected void NotifyAuthenticationStateChanged(System.Threading.Tasks.Task task) { }
}
- public partial class AuthorizeView : Microsoft.AspNetCore.Components.ComponentBase
- {
- public AuthorizeView() { }
- [Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment Authorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- [Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment Authorizing { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- [Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- [Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment NotAuthorized { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { }
- [System.Diagnostics.DebuggerStepThroughAttribute]
- protected override System.Threading.Tasks.Task OnParametersSetAsync() { throw null; }
- }
[Microsoft.AspNetCore.Components.BindElementAttribute("select", null, "value", "onchange")]
[Microsoft.AspNetCore.Components.BindElementAttribute("textarea", null, "value", "onchange")]
[Microsoft.AspNetCore.Components.BindInputElementAttribute("checkbox", null, "checked", "onchange")]
@@ -85,15 +70,6 @@ public static partial class BindMethods
public static System.Action SetValueHandler(System.Action setter, string existingValue) { throw null; }
public static System.Action SetValueHandler(System.Action setter, T existingValue) { throw null; }
}
- public partial class CascadingAuthenticationState : Microsoft.AspNetCore.Components.ComponentBase, System.IDisposable
- {
- public CascadingAuthenticationState() { }
- [Microsoft.AspNetCore.Components.ParameterAttribute]
- public Microsoft.AspNetCore.Components.RenderFragment ChildContent { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
- protected override void BuildRenderTree(Microsoft.AspNetCore.Components.RenderTree.RenderTreeBuilder builder) { }
- protected override void OnInit() { }
- void System.IDisposable.Dispose() { }
- }
[System.AttributeUsageAttribute(System.AttributeTargets.Property, AllowMultiple=false, Inherited=false)]
public sealed partial class CascadingParameterAttribute : System.Attribute
{