mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 08:13:31 +08:00
Attempt to fix flaky TestHoldForMenuDoesWorkWhenHidden
Seems like the most likely cause.
This commit is contained in:
parent
005ce1c438
commit
1bb32ec24d
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
@ -187,18 +188,22 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
[Test]
|
||||
public void TestInputDoesntWorkWhenHUDHidden()
|
||||
{
|
||||
SongProgressBar getSongProgress() => hudOverlay.ChildrenOfType<SongProgressBar>().Single();
|
||||
SongProgressBar? getSongProgress() => hudOverlay.ChildrenOfType<SongProgressBar>().SingleOrDefault();
|
||||
|
||||
bool seeked = false;
|
||||
|
||||
createNew();
|
||||
|
||||
AddUntilStep("wait for song progress", () => getSongProgress() != null);
|
||||
|
||||
AddStep("bind seek", () =>
|
||||
{
|
||||
seeked = false;
|
||||
|
||||
var progress = getSongProgress();
|
||||
|
||||
Debug.Assert(progress != null);
|
||||
|
||||
progress.ShowHandle = true;
|
||||
progress.OnSeek += _ => seeked = true;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user