Skip to content

Commit

Permalink
chore: Adjust icon tests with mapping changes
Browse files Browse the repository at this point in the history
  • Loading branch information
morning4coffe-dev committed Feb 19, 2025
1 parent 34cd243 commit 22bf1e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ public async Task When_SymbolIcon_Verify_Size()

await UITestHelper.Load(SUT);

var expectedGlyph = SymbolIcon.ConvertSymbolValueToGlyph((int)Symbol.Home);

#if __SKIA__ || __WASM__
var tb = SUT.FindChildren<TextBlock>().Single(tb => tb.Text.Length == 1 && tb.Text[0] == (char)Symbol.Home);
var tb = SUT.FindChildren<TextBlock>().Single(tb => tb.Text.Length == 1 && tb.Text[0] == expectedGlyph);
#else
var tb = (TextBlock)SUT.EnumerateAllChildren().SingleOrDefault(c => c is TextBlock textBlock && textBlock.Text.Length == 1 && textBlock.Text[0] == (char)Symbol.Home);
var tb = (TextBlock)SUT.EnumerateAllChildren().SingleOrDefault(c => c is TextBlock textBlock && textBlock.Text.Length == 1 && textBlock.Text[0] == expectedGlyph);
#endif

Assert.AreEqual(12, tb.FontSize);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public async Task When_Switch_Sources()

var symbolChild = VisualTreeUtils.FindVisualChildByType<TextBlock>(iconSourceElement);
Assert.IsNotNull(symbolChild);
Assert.AreEqual("\uE10B", symbolChild.Text); //E10B represents Accept symbol
Assert.AreEqual("\uE8FB", symbolChild.Text); //E8FB represents Accept symbol

symbolIconSource.Symbol = Symbol.Cancel;
Assert.AreEqual("\uE10A", symbolChild.Text); //E10A represents Cancel symbol
Assert.AreEqual("\uE711", symbolChild.Text); //E711 represents Cancel symbol

// PathIconSource
var ellipseGeometry = new EllipseGeometry()
Expand Down

0 comments on commit 22bf1e0

Please sign in to comment.