mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 02:22:55 +08:00
Adjust test to work better when running in sequence
This commit is contained in:
parent
cde8e7b82e
commit
56dfe4a231
@ -33,17 +33,21 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
});
|
});
|
||||||
|
|
||||||
AddStep("start playing", () => localUserPlayingState.Value = LocalUserPlayingState.Playing);
|
AddStep("start playing", () => localUserPlayingState.Value = LocalUserPlayingState.Playing);
|
||||||
AddStep("add a user", () =>
|
|
||||||
|
AddRepeatStep("add a user", () =>
|
||||||
{
|
{
|
||||||
int id = Interlocked.Increment(ref counter);
|
int id = Interlocked.Increment(ref counter);
|
||||||
spectators.Add(new SpectatorList.Spectator(id, $"User {id}"));
|
spectators.Add(new SpectatorList.Spectator(id, $"User {id}"));
|
||||||
});
|
}, 10);
|
||||||
AddStep("remove random user", () => spectators.RemoveAt(RNG.Next(0, spectators.Count)));
|
|
||||||
AddStep("enter break", () => localUserPlayingState.Value = LocalUserPlayingState.Break);
|
AddRepeatStep("remove random user", () => spectators.RemoveAt(RNG.Next(0, spectators.Count)), 5);
|
||||||
AddStep("stop playing", () => localUserPlayingState.Value = LocalUserPlayingState.NotPlaying);
|
|
||||||
AddStep("change font to venera", () => list.Font.Value = Typeface.Venera);
|
AddStep("change font to venera", () => list.Font.Value = Typeface.Venera);
|
||||||
AddStep("change font to torus", () => list.Font.Value = Typeface.Torus);
|
AddStep("change font to torus", () => list.Font.Value = Typeface.Torus);
|
||||||
AddStep("change header colour", () => list.HeaderColour.Value = new Colour4(RNG.NextSingle(), RNG.NextSingle(), RNG.NextSingle(), 1));
|
AddStep("change header colour", () => list.HeaderColour.Value = new Colour4(RNG.NextSingle(), RNG.NextSingle(), RNG.NextSingle(), 1));
|
||||||
|
|
||||||
|
AddStep("enter break", () => localUserPlayingState.Value = LocalUserPlayingState.Break);
|
||||||
|
AddStep("stop playing", () => localUserPlayingState.Value = LocalUserPlayingState.NotPlaying);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user