-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Unit Tests and rename enum LabelPosition and MessageState
- Loading branch information
Showing
20 changed files
with
244 additions
and
52 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...ples/Demo/FluentUI.Demo.Client/Documentation/Components/Field/Examples/FieldDefault.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<FluentTextInput Label="Example field" | ||
MessageState="FieldMessageState.Success" | ||
MessageState="MessageState.Success" | ||
Message="This is a success message." | ||
MessageCondition="@FluentFieldCondition.Always" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
.../FluentUI.Demo.Client/Documentation/Components/Field/Examples/FieldMessageCondition.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...emo/FluentUI.Demo.Client/Documentation/Components/Field/Examples/FieldStatesExample.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
tests/Core/Components/Field/FluentFieldTests.FluentField_DefaultTemplate.verified.razor.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
<fluent-field label-position="above" class="my-3"> | ||
<fluent-label slot="label" for="xxx"> | ||
My | ||
<b>label</b> | ||
</fluent-label> | ||
<div slot="input" id="xxx"> | ||
Field content | ||
</div> | ||
<fluent-text as="span" size="200" slot="message"> | ||
My | ||
<i>message</i> | ||
</fluent-text> | ||
</fluent-field> |
8 changes: 8 additions & 0 deletions
8
tests/Core/Components/Field/FluentFieldTests.FluentField_MessageIcon.verified.razor.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
<fluent-field label-position="above" class="my-3"> | ||
<div slot="input" id="xxx">Field content</div> | ||
<fluent-text as="span" size="200" slot="message"> | ||
<svg style="margin: 0px 4px 0px 0px; width: 12px;" focusable="false" viewBox="0 0 24 24" aria-hidden="true" blazor:onkeydown="x" blazor:onclick="x"> | ||
<path d="M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20Zm0 8.25a1 1 0 0 0-1 .88v5.74a1 1 0 0 0 2 0v-5.62l-.01-.12a1 1 0 0 0-1-.88Zm0-3.75A1.25 1.25 0 1 0 12 9a1.25 1.25 0 0 0 0-2.5Z"></path> | ||
</svg>My message</fluent-text> | ||
</fluent-field> |
10 changes: 10 additions & 0 deletions
10
...Core/Components/Field/FluentFieldTests.FluentField_MessageState-Error.verified.razor.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
<fluent-field label-position="above" class="my-3"> | ||
<div slot="input" id="xxx">Field content</div> | ||
<fluent-text as="span" size="200" slot="message"> | ||
<svg style="margin: 0px 4px 0px 0px; width: 12px; fill: var(--error);" focusable="false" viewBox="0 0 20 20" aria-hidden="true" blazor:onkeydown="x" blazor:onclick="x"> | ||
<path d="M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16ZM7.8 7.11a.5.5 0 0 0-.63.06l-.06.07a.5.5 0 0 0 .06.64L9.3 10l-2.12 2.12-.06.07a.5.5 0 0 0 .06.64l.07.06c.2.13.47.11.64-.06L10 10.7l2.12 2.12.07.06c.2.13.46.11.64-.06l.06-.07a.5.5 0 0 0-.06-.64L10.7 10l2.12-2.12.06-.07a.5.5 0 0 0-.06-.64l-.07-.06a.5.5 0 0 0-.64.06L10 9.3 7.88 7.17l-.07-.06Z"></path> | ||
</svg> | ||
<fluent-text style="color: var(--error);" as="span">An error occured</fluent-text> | ||
</fluent-text> | ||
</fluent-field> |
10 changes: 10 additions & 0 deletions
10
...re/Components/Field/FluentFieldTests.FluentField_MessageState-Success.verified.razor.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
<fluent-field label-position="above" class="my-3"> | ||
<div slot="input" id="xxx">Field content</div> | ||
<fluent-text as="span" size="200" slot="message"> | ||
<svg style="margin: 0px 4px 0px 0px; width: 12px; fill: var(--success);" focusable="false" viewBox="0 0 20 20" aria-hidden="true" blazor:onkeydown="x" blazor:onclick="x"> | ||
<path d="M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm3.36 5.65a.5.5 0 0 0-.64-.06l-.07.06L9 11.3 7.35 9.65l-.07-.06a.5.5 0 0 0-.7.7l.07.07 2 2 .07.06c.17.11.4.11.56 0l.07-.06 4-4 .07-.08a.5.5 0 0 0-.06-.63Z"></path> | ||
</svg> | ||
<fluent-text style="color: var(--success);" as="span">Valid data</fluent-text> | ||
</fluent-text> | ||
</fluent-field> |
Oops, something went wrong.