Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: UWP Build #1265

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Uno.Toolkit.RuntimeTests/Tests/AncestorBindingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public async Task Ancestor_TopLevel_PageBinding()
var setup = new AncestorBindingTest();
await UnitTestUIContentHelperEx.SetContentAndWait(setup);

var sut = setup.FindFirstDescendant<TextBlock>("TopLevelTextBlock") ?? throw new Exception("Failed to find TopLevelTextBlock");
var sut = setup.GetFirstDescendant<TextBlock>(x => x.Name == "TopLevelTextBlock") ?? throw new Exception("Failed to find TopLevelTextBlock");
Assert.AreEqual(sut.Text, setup.Tag);
}

Expand All @@ -40,9 +40,9 @@ public async Task Ancestor_Nested_PageBinding()
var setup = new AncestorBindingTest();
await UnitTestUIContentHelperEx.SetContentAndWait(setup);

var lv = setup.FindFirstDescendant<ListView>("TopLevelListView") ?? throw new Exception("Failed to find TopLevelListView");
var lv = setup.GetFirstDescendant<ListView>(x => x.Name == "TopLevelListView") ?? throw new Exception("Failed to find TopLevelListView");
var container = lv.ContainerFromIndex(0);
var sut = (container as FrameworkElement)?.FindFirstDescendant<TextBlock>("NestedLvTextBlock1") ?? throw new Exception("Failed to find NestedLvTextBlock1");
var sut = (container as FrameworkElement)?.GetFirstDescendant<TextBlock>(x => x.Name == "NestedLvTextBlock1") ?? throw new Exception("Failed to find NestedLvTextBlock1");

Assert.AreEqual(sut.Text, setup.Tag);
}
Expand All @@ -53,9 +53,9 @@ public async Task Ancestor_Nested_LvBinding()
var setup = new AncestorBindingTest();
await UnitTestUIContentHelperEx.SetContentAndWait(setup);

var lv = setup.FindFirstDescendant<ListView>("TopLevelListView") ?? throw new Exception("Failed to find TopLevelListView");
var lv = setup.GetFirstDescendant<ListView>(x => x.Name == "TopLevelListView") ?? throw new Exception("Failed to find TopLevelListView");
var container = lv.ContainerFromIndex(0);
var sut = (container as FrameworkElement)?.FindFirstDescendant<TextBlock>("NestedLvTextBlock2") ?? throw new Exception("Failed to find NestedLvTextBlock2");
var sut = (container as FrameworkElement)?.GetFirstDescendant<TextBlock>(x => x.Name == "NestedLvTextBlock2") ?? throw new Exception("Failed to find NestedLvTextBlock2");
Assert.AreEqual(sut.Text, lv.Tag);
}
}
2 changes: 1 addition & 1 deletion src/Uno.Toolkit.RuntimeTests/Tests/DrawerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ await Task.Run(async () =>
await UIHelper.WaitForIdle();
await UnitTestUIContentHelperEx.WaitFor(() => drawer.AnimationStoryboard?.GetCurrentState() == ClockState.Stopped);

var lightDismissOverlay = drawer.FindFirstDescendant<Border>(x => x.Name == DrawerControl.TemplateParts.LightDismissOverlayName) ??
var lightDismissOverlay = drawer.GetFirstDescendant<Border>(x => x.Name == DrawerControl.TemplateParts.LightDismissOverlayName) ??
throw new Exception($"Failed to find {DrawerControl.TemplateParts.LightDismissOverlayName}");

await UnitTestUIContentHelperEx.WaitFor(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public async Task Smoke_Test()
var host = await ExtendedSplashScreen.GetNativeSplashScreen().ConfigureAwait(false) ?? throw new Exception("Failed to load native splash screen");

#if !__MOBILE__ // ignore native platforms impl: ios,droid,macos
var sut = host.FindFirstDescendant<Image>() ?? throw new Exception("Failed to find splash image control");
var sut = host.GetFirstDescendant<Image>() ?? throw new Exception("Failed to find splash image control");
var tcs = new TaskCompletionSource<(bool Success, string? Message)>();

sut.ImageOpened += (s, e) => tcs.SetResult((Success: true, null));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ public async Task ProvideValue_Orientation_SizeChange()
Assert.AreEqual(Orientation.Horizontal, sut.Orientation);
}
}
#endif

[TestClass]
[RunsOnUIThread]
Expand Down Expand Up @@ -207,3 +206,4 @@ public async Task Setup_And_Teardown()
}
}
}
#endif
Loading