-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Make Style be applied last - Add Label tests
- Loading branch information
Showing
28 changed files
with
287 additions
and
41 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<FluentLabel Typo="Typography.Header" Color="@Color.Warning"> A 'Header' using Color.Warning</FluentLabel> | ||
<FluentLabel Typo="Typography.Body" Color="@Color.Disabled"> A 'Body' label using Color.Disabled</FluentLabel> | ||
<FluentLabel Typo="Typography.Body" Color="@Color.Custom" CustomColor="deepskyblue"> A 'Body' label using a custom color through the CustomColor parameter. Just specify a valid color string value.</FluentLabel> | ||
<FluentLabel Typo="Typography.Body" Style="color: chocolate;"> A 'Body' label using a custom color through the Style parameter. In this case a valid CSS color specification needs to be provided.</FluentLabel> | ||
<FluentLabel Typo="Typography.Body" Style="color: burlywood;" Color="@Color.Custom" CustomColor="burlywood"> When specifying both <code>CustomColor</code> and <code>Style</code>, the latter wins.</FluentLabel> |
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
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentInputLabel_Default.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,2 @@ | ||
|
||
<p typo="body" class="fluent-typography" b-1nnnfjehkp="">Test label</p> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_Alignment.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,2 @@ | ||
|
||
<p typo="body" class="fluent-typography fluent-typo-center" b-1nnnfjehkp="">Test label</p> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_Color.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,2 @@ | ||
|
||
<p typo="body" class="fluent-typography" style="color: var(--warning);" b-1nnnfjehkp="">Test label</p> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_CustomColor.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,2 @@ | ||
|
||
<p typo="body" class="fluent-typography" style="color: deepskyblue;" b-1nnnfjehkp="">Test label</p> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_Disabled.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,2 @@ | ||
|
||
<p typo="body" class="fluent-typography" disabled="" b-1nnnfjehkp="">Test label</p> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_Style.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,2 @@ | ||
|
||
<p typo="body" class="fluent-typography" style="color: chocolate;" b-1nnnfjehkp="">Test label</p> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_TypographyBody.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,2 @@ | ||
|
||
<p typo="body" class="fluent-typography" b-1nnnfjehkp="">Test label</p> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_TypographyEmaiHeader.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,2 @@ | ||
|
||
<h3 typo="email-header" class="fluent-typography" b-1nnnfjehkp="">Test label</h3> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_TypographyH1.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,2 @@ | ||
|
||
<h1 typo="h1" class="fluent-typography" b-1nnnfjehkp="">Test label</h1> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_TypographyH2.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,2 @@ | ||
|
||
<h2 typo="h2" class="fluent-typography" b-1nnnfjehkp="">Test label</h2> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_TypographyH3.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,2 @@ | ||
|
||
<h3 typo="h3" class="fluent-typography" b-1nnnfjehkp="">Test label</h3> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_TypographyH4.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,2 @@ | ||
|
||
<h4 typo="h4" class="fluent-typography" b-1nnnfjehkp="">Test label</h4> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_TypographyH5.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,2 @@ | ||
|
||
<h5 typo="h5" class="fluent-typography" b-1nnnfjehkp="">Test label</h5> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_TypographyH6.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,2 @@ | ||
|
||
<h6 typo="h6" class="fluent-typography" b-1nnnfjehkp="">Test label</h6> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_TypographyHeader.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,2 @@ | ||
|
||
<h5 typo="header" class="fluent-typography" b-1nnnfjehkp="">Test label</h5> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_TypographyHeroTitle.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,2 @@ | ||
|
||
<h1 typo="hero-title" class="fluent-typography" b-1nnnfjehkp="">Test label</h1> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_TypographyPageTitle.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,2 @@ | ||
|
||
<h2 typo="page-title" class="fluent-typography" b-1nnnfjehkp="">Test label</h2> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_TypographyPaneHeader.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,2 @@ | ||
|
||
<h4 typo="pane-header" class="fluent-typography" b-1nnnfjehkp="">Test label</h4> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_TypographySubject.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,2 @@ | ||
|
||
<h6 typo="subject" class="fluent-typography" b-1nnnfjehkp="">Test label</h6> |
2 changes: 2 additions & 0 deletions
2
tests/Core/Label/FluentLabelTests.FluentLabel_Weight.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,2 @@ | ||
|
||
<p typo="body" bold="" class="fluent-typography" b-1nnnfjehkp="">Test label</p> |
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,197 @@ | ||
@using Xunit; | ||
@inherits TestContext | ||
@code | ||
{ | ||
[Inject] | ||
private LibraryConfiguration LibraryConfiguration { get; set; } = new LibraryConfiguration(); | ||
|
||
[Fact] | ||
public void FluentInputLabel_Default() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel>Test label</FluentLabel>); | ||
|
||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
[Fact] | ||
public void FluentLabel_Color() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Color="Color.Warning">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
|
||
[Fact] | ||
public void FluentLabel_CustomColor() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Color="Color.Custom" CustomColor="deepskyblue">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
|
||
[Fact] | ||
public void FluentLabel_Style() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Style="color: chocolate;">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
// Generate a test for Typography enum | ||
[Fact] | ||
public void FluentLabel_TypographyHeader() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Typo="Typography.Header">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
[Fact] | ||
public void FluentLabel_TypographyBody() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Typo="Typography.Body">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
[Fact] | ||
public void FluentLabel_TypographyHeroTitle() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Typo="Typography.HeroTitle">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
[Fact] | ||
public void FluentLabel_TypographyPageTitle() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Typo="Typography.PageTitle">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
[Fact] | ||
public void FluentLabel_TypographySubject() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Typo="Typography.Subject">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
[Fact] | ||
public void FluentLabel_TypographyPaneHeader() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Typo="Typography.PaneHeader">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
[Fact] | ||
public void FluentLabel_TypographyEmaiHeader() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Typo="Typography.EmailHeader">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
|
||
[Fact] | ||
public void FluentLabel_TypographyH1() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Typo="Typography.H1">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
[Fact] | ||
public void FluentLabel_TypographyH2() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Typo="Typography.H2">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
[Fact] | ||
public void FluentLabel_TypographyH3() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Typo="Typography.H3">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
[Fact] | ||
public void FluentLabel_TypographyH4() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Typo="Typography.H4">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
[Fact] | ||
public void FluentLabel_TypographyH5() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Typo="Typography.H5">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
[Fact] | ||
public void FluentLabel_TypographyH6() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Typo="Typography.H6">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
// Disabled | ||
[Fact] | ||
public void FluentLabel_Disabled() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Disabled="true">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
//Weight | ||
[Fact] | ||
public void FluentLabel_Weight() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Weight="FontWeight.Bold">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
//Alignment | ||
[Fact] | ||
public void FluentLabel_Alignment() | ||
{ | ||
// Arrange && Act | ||
var cut = Render(@<FluentLabel Alignment="AspNetCore.Components.HorizontalAlignment.Center">Test label</FluentLabel>); | ||
// Assert | ||
cut.Verify(); | ||
} | ||
|
||
|
||
} |
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
4 changes: 0 additions & 4 deletions
4
tests/Core/_ToDo/Label/FluentLabelTests.FluentLabel_Default.verified.html
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.