This commit is contained in:
Pranav K 2019-10-01 13:42:32 -07:00
parent 80d019d726
commit d1faff4126
No known key found for this signature in database
GPG Key ID: F748807460A27E91
4 changed files with 9 additions and 24 deletions

View File

@ -26,21 +26,6 @@ namespace Microsoft.AspNetCore.Components.E2ETest.ServerExecutionTests
{
}
public DateTime LastLogTimeStamp { get; set; } = DateTime.MinValue;
public override async Task InitializeAsync()
{
await base.InitializeAsync();
// Capture the last log timestamp so that we can filter logs when we
// check for duplicate connections.
var lastLog = Browser.Manage().Logs.GetLog(LogType.Browser).LastOrDefault();
if (lastLog != null)
{
LastLogTimeStamp = lastLog.Timestamp;
}
}
[Fact]
public void PassingParametersToComponentsWorks()
{

View File

@ -2,10 +2,10 @@
<component type="typeof(ComponentWithParameters)"
render-mode="ServerPrerendered"
parameter-Param1="ComponentWithParameters.TestModelValues"
parameter-Param2="ComponentWithParameters.DerivedModelValue"
parameter-key1="QueryValue"
parameter-key2="43" />
param-Param1="ComponentWithParameters.TestModelValues"
param-Param2="ComponentWithParameters.DerivedModelValue"
param-key1="QueryValue"
param-key2="43" />
@*
So that E2E tests can make assertions about both the prerendered and

View File

@ -12,7 +12,7 @@
<div id="test-container">
<component type="typeof(GreeterComponent)" render-mode="ServerPrerendered" />
<component type="typeof(GreeterComponent)" render-mode="Server" />
<component type="typeof(GreeterComponent)" render-mode="Static" parameter-name='"John"' />
<component type="typeof(GreeterComponent)" render-mode="Static" param-name='"John"' />
<component type="typeof(GreeterComponent)" render-mode="Server"/>
<div id="container">
<p>Some content before</p>
@ -28,8 +28,8 @@
</div>
</div>
<div id="container">
<component type="typeof(GreeterComponent)" render-mode="Server" parameter-name='"Albert"' />
<component type="typeof(GreeterComponent)" render-mode="ServerPrerendered" parameter-name='"Abraham"' />
<component type="typeof(GreeterComponent)" render-mode="Server" param-name='"Albert"' />
<component type="typeof(GreeterComponent)" render-mode="ServerPrerendered" param-name='"Abraham"' />
</div>
</div>

View File

@ -17,8 +17,8 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
[HtmlTargetElement("component", Attributes = ComponentTypeName, TagStructure = TagStructure.WithoutEndTag)]
public class ComponentTagHelper : TagHelper
{
private const string ComponentParameterName = "parameters";
private const string ComponentParameterPrefix = "parameter-";
private const string ComponentParameterName = "params";
private const string ComponentParameterPrefix = "param-";
private const string ComponentTypeName = "type";
private const string RenderModeName = "render-mode";
private IDictionary<string, object> _parameters;