1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Fix test container lookup failure

This commit is contained in:
Dean Herbert 2023-02-15 17:47:34 +09:00
parent ca75f0ec77
commit d9b4d932c9

View File

@ -56,8 +56,8 @@ namespace osu.Game.Tests.Visual.Gameplay
protected bool AssertComponentsFromExpectedSource(GlobalSkinComponentLookup.LookupType target, ISkin expectedSource) protected bool AssertComponentsFromExpectedSource(GlobalSkinComponentLookup.LookupType target, ISkin expectedSource)
{ {
var actualComponentsContainer = Player.ChildrenOfType<SkinnableTargetContainer>().First(s => s.Target == target) var targetContainer = Player.ChildrenOfType<SkinnableTargetContainer>().First(s => s.Target == target);
.ChildrenOfType<Container>().SingleOrDefault(); var actualComponentsContainer = targetContainer.ChildrenOfType<Container>().SingleOrDefault(c => c.Parent == targetContainer);
if (actualComponentsContainer == null) if (actualComponentsContainer == null)
return false; return false;