Conversation
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
| nameof(ILabel.Font), | ||
| () => label.Font = Font.SystemFontOfSize(newSize)); | ||
| } | ||
| #if !WINDOWS |
There was a problem hiding this comment.
Moved these all into TextStyleHandlerTests since they apply to anything that implements ITextStyle
7bcf664 to
f5773ca
Compare
d6630e0 to
5ad6384
Compare
Eilon
left a comment
There was a problem hiding this comment.
Looks good for the BlazorWebView device test changes.
| var w = size.Width; | ||
| var h = size.Height; | ||
|
|
||
| if (double.IsPositiveInfinity(w)) |
There was a problem hiding this comment.
@hartez I added this code because all of the ScrollView tests started failing due to view.Measure returning infinite size.
I'm wondering if this is actually a bug with ScrollViewHandler.
The GetDesiredSize code inside ScrollViewHandler just returns the constraints back if the ScrollView has no content (which makes sense)
I wonder if for this scenario the ScrollViewHandler on iOS should return a size of zero if the content is null and the constraints are infinite.
Something like
if (platformView == null || virtualView == null || virtualView.PresentedContent == null)
{
if (double.IsPositiveInfinity(widthConstraint))
widthConstraint = 0;
if (double.IsPositiveInfinity(heightConstraint))
heightConstraint= 0;
return new Size(widthConstraint, heightConstraint);
}If this does seem like something we should fix on ScrollViewHandler I'll do that in a different PR. I'd like this PR to not touch any actual sdk code just test code.
|
/backport to net7.0 |
|
Started backporting to net7.0: https://github.com/dotnet/maui/actions/runs/3489791409 |
Description of Change
Currently our
FrameRendererdoesn't call any of the initial mapper properties that run through thebatchupdate. All of the tests for this behavior currently exists insideCore.DeviceTeston the base handler. The intent of this PR is to move all of that testing code into a re-usable place so thatFrameRenderer(and other handlers inside Controls) can utilize the tests we have inCore.DeviceTestto validate that all the defaultViewHandlermappers. This PR also consolidates a bunch of helper methods that were duplicated betweenCore/ControlsI moved all of the code shared between
Controls/Core.DeviceTeststoCore.DeviceTests.Shared. These don't seem like things we'd ever really package up and distribute. They are a bit specific to our tests. Anything we'd want to package up we should move toTestUtilsandAssertionExtensionsI tried to rename anything that was a repeated class name. So, now there's only one
HandlerTestBase,ContextStubBase, etc..This PR doesn't actually fix
Frameyet it's mainly just the reorg part of the tests so that I can fixFrameand add tests here https://github.com/dotnet/maui/pull/10751/files#diff-ad087c312304a6bb9d0b8d53ab57e6d941c1fa937885ad9f10922b1734f2f0d0R118Moved all the
ITextStyletests out ofHandlerTestBaseand into a specificTextStyleHandlerBaseso now instead of just having a bunch of noop tests related toTextStylethey all just run for interfaces that implementITextStyle