mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:42:57 +08:00
Add test coverage of IsPlaying
state during fail and pause
This commit is contained in:
parent
ed894d6428
commit
d310886c26
@ -21,7 +21,9 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
|
||||
protected override void AddCheckSteps()
|
||||
{
|
||||
AddUntilStep("player is playing", () => Player.LocalUserPlaying.Value);
|
||||
AddUntilStep("wait for fail", () => Player.GameplayState.HasFailed);
|
||||
AddAssert("player is not playing", () => !Player.LocalUserPlaying.Value);
|
||||
AddUntilStep("wait for multiple judgements", () => ((FailPlayer)Player).ScoreProcessor.JudgedHits > 1);
|
||||
AddAssert("total number of results == 1", () =>
|
||||
{
|
||||
|
@ -85,7 +85,10 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
{
|
||||
AddStep("move cursor outside", () => InputManager.MoveMouseTo(Player.ScreenSpaceDrawQuad.TopLeft - new Vector2(10)));
|
||||
pauseAndConfirm();
|
||||
AddAssert("player not playing", () => !Player.LocalUserPlaying.Value);
|
||||
|
||||
resumeAndConfirm();
|
||||
AddUntilStep("player playing", () => Player.LocalUserPlaying.Value);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
Loading…
Reference in New Issue
Block a user