Skip to content

Commit

Permalink
fix: workaround failing ui test for autolayout
Browse files Browse the repository at this point in the history
  • Loading branch information
kazo0 committed Aug 19, 2024
1 parent a5f5bbd commit a3e561e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Uno.Toolkit.RuntimeTests/Tests/AutoLayoutTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -732,10 +732,16 @@ public async Task When_Fixed_Dimensions_Padding_And_SpaceBetween_Vertical()
}

[TestMethod]
[Ignore("#1203 -- to be restored")] // temporary disabled to avoid blocking other prs
[RequiresFullWindow]
public async Task When_Hug_With_CounterAlignment()
{
/*
* There is an outstanding issue (https://github.com/unoplatform/uno.toolkit.ui/issues/1051) if the AutoLayout is the absolute root element of the application Window.
* Which is not a common scenario outside of UI Tests that are replacing the window content.
* For now we can workaround this by wrapping the AutoLayout in a Border.
*/
var border = new Border();

var SUT = new AutoLayout()
{
PrimaryAxisAlignment = AutoLayoutAlignment.Center,
Expand All @@ -759,8 +765,9 @@ public async Task When_Hug_With_CounterAlignment()

SUT.Children.Add(textBlock);
SUT.Children.Add(button);
border.Child = SUT;

await UnitTestUIContentHelperEx.SetContentAndWait(SUT);
await UnitTestUIContentHelperEx.SetContentAndWait(border);


var textBlockTransform = textBlock.TransformToVisual(SUT).TransformPoint(new Windows.Foundation.Point(0, 0));
Expand Down

0 comments on commit a3e561e

Please sign in to comment.