Skip to content

Commit 550710f

Browse files
rynowakpranavkm
authored andcommitted
Update components E2E test to use splatting (#11518)
This test was already in place, and just needs some updates to work with Razor syntax instead of .cs
1 parent eba671e commit 550710f

File tree

3 files changed

+23
-43
lines changed

3 files changed

+23
-43
lines changed

src/Components/test/testassets/BasicTestApp/DuplicateAttributesComponent.razor

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,12 @@
77

88
<div id="duplicate-on-element-override">
99
<DuplicateAttributesOnElementChildComponent
10-
BoolAttributeBefore="true"
11-
StringAttributeBefore="original-text"
1210
UnmatchedValues="@elementValues"
1311
BoolAttributeAfter="false"
1412
StringAttributeAfter="other-text" />
1513
</div>
1614

1715
@functions {
18-
void SomeMethod()
19-
{
20-
}
21-
2216
Dictionary<string, object> elementValues = new Dictionary<string, object>()
2317
{
2418
{ "bool", true },

src/Components/test/testassets/BasicTestApp/DuplicateAttributesOnElementChildComponent.cs

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@if (StringAttributeBefore != null)
2+
{
3+
<div string="@StringAttributeBefore"
4+
bool="@BoolAttributeBefore"
5+
@attributes="@UnmatchedValues">
6+
</div>
7+
}
8+
else
9+
{
10+
<div @attributes="@UnmatchedValues"
11+
string="@StringAttributeAfter"
12+
bool="@BoolAttributeAfter">
13+
</div>
14+
}
15+
16+
@code {
17+
[Parameter] public string StringAttributeBefore { get; private set; }
18+
[Parameter] public bool BoolAttributeBefore { get; private set; }
19+
[Parameter] public string StringAttributeAfter { get; private set; }
20+
[Parameter] public bool? BoolAttributeAfter { get; private set; }
21+
22+
[Parameter(CaptureUnmatchedValues = true)] public Dictionary<string, object> UnmatchedValues { get; private set; }
23+
}

0 commit comments

Comments
 (0)