Browse Source

fix popup tests.

pull/3962/head
Dan Walmsley 6 years ago
parent
commit
4bc1801c2a
  1. 9
      tests/Avalonia.Controls.UnitTests/Primitives/PopupRootTests.cs
  2. 4
      tests/Avalonia.Controls.UnitTests/Primitives/PopupTests.cs

9
tests/Avalonia.Controls.UnitTests/Primitives/PopupRootTests.cs

@ -77,8 +77,13 @@ namespace Avalonia.Controls.UnitTests.Primitives
var templatedChild = ((Visual)target.Host).GetVisualChildren().Single();
Assert.IsType<VisualLayerManager>(templatedChild);
var contentPresenter = templatedChild.VisualChildren.Single();
Assert.IsType<Panel>(templatedChild);
var visualLayerManager = templatedChild.GetVisualChildren().Skip(1).Single();
Assert.IsType<VisualLayerManager>(visualLayerManager);
var contentPresenter = visualLayerManager.VisualChildren.Single();
Assert.IsType<ContentPresenter>(contentPresenter);

4
tests/Avalonia.Controls.UnitTests/Primitives/PopupTests.cs

@ -275,6 +275,8 @@ namespace Avalonia.Controls.UnitTests.Primitives
Assert.Equal(
new[]
{
"Panel",
"Border",
"VisualLayerManager",
"ContentPresenter",
"ContentPresenter",
@ -289,6 +291,8 @@ namespace Avalonia.Controls.UnitTests.Primitives
Assert.Equal(
new object[]
{
popupRoot,
popupRoot,
popupRoot,
popupRoot,
target,

Loading…
Cancel
Save