mirror of
https://github.com/ppy/osu.git
synced 2025-03-05 10:53:10 +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()
|
protected override void AddCheckSteps()
|
||||||
{
|
{
|
||||||
|
AddUntilStep("player is playing", () => Player.LocalUserPlaying.Value);
|
||||||
AddUntilStep("wait for fail", () => Player.GameplayState.HasFailed);
|
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);
|
AddUntilStep("wait for multiple judgements", () => ((FailPlayer)Player).ScoreProcessor.JudgedHits > 1);
|
||||||
AddAssert("total number of results == 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)));
|
AddStep("move cursor outside", () => InputManager.MoveMouseTo(Player.ScreenSpaceDrawQuad.TopLeft - new Vector2(10)));
|
||||||
pauseAndConfirm();
|
pauseAndConfirm();
|
||||||
|
AddAssert("player not playing", () => !Player.LocalUserPlaying.Value);
|
||||||
|
|
||||||
resumeAndConfirm();
|
resumeAndConfirm();
|
||||||
|
AddUntilStep("player playing", () => Player.LocalUserPlaying.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
Loading…
Reference in New Issue
Block a user