Conversation
|
Hey there @kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
| _ = App.WaitForElement("label"); | ||
|
|
||
| // The test passes if fonts are correctly rendered | ||
| VerifyScreenshot(); |
There was a problem hiding this comment.
Waiting CI to pass tests and generate the reference snapshot.
There was a problem hiding this comment.
@jsuarezruiz how do we get the screenshot? this looks ok to merge now otherwise.
There was a problem hiding this comment.
Right now, you need to go to the UITest run https://dev.azure.com/xamarin/public/_build/results?buildId=110953&view=ms.vss-test-web.build-test-results-tab&runId=2620968&resultId=100163&paneView=debug
And check the failed test .

Then go to the Attachments and download the image for the test SystemFontsShouldRenderCorrectly

|
Hi, Edit: Typeface? CreateTypeface((string? fontFamilyName, FontWeight weight, bool italic) fontData)
{
var (fontFamily, weight, italic) = fontData;
fontFamily ??= string.Empty;
var style = ToTypefaceStyle(weight, italic);
var result = Typeface.Default;
var isDefaultTypeface = false;
if (!string.IsNullOrWhiteSpace(fontFamily))
{
if (LoadDefaultTypeface(fontFamily) is Typeface systemTypeface)
{
result = systemTypeface;
isDefaultTypeface = true;
}
else if (GetFromAssets(fontFamily) is Typeface typeface)
result = typeface;
else
result = Typeface.Create(fontFamily, style);
}
if (OperatingSystem.IsAndroidVersionAtLeast(28))
result = Typeface.Create(result, (!isDefaultTypeface || result == null) ? (int)weight : result.Weight, italic);
else
result = Typeface.Create(result, style);
return result;
}Thank you |
|
@jonathanpeppers I've added a commit with your suggested changes. Thanks for the tips! |
jonathanpeppers
left a comment
There was a problem hiding this comment.
LGTM, if the test & screenshot are working. 👍
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |

Issues Fixed
Fixes #19556