mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 12:33:01 +08:00
Add test coverage
This commit is contained in:
parent
98b420ee6f
commit
d0cc68bc97
@ -163,6 +163,25 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
AddUntilStep("second user crown visible", () => this.ChildrenOfType<ParticipantPanel>().ElementAt(1).ChildrenOfType<SpriteIcon>().First().Alpha == 1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestHostGetsPinnedToTop()
|
||||
{
|
||||
AddStep("add user", () => MultiplayerClient.AddUser(new APIUser
|
||||
{
|
||||
Id = 3,
|
||||
Username = "Second",
|
||||
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c3.jpg",
|
||||
}));
|
||||
|
||||
AddStep("make second user host", () => MultiplayerClient.TransferHost(3));
|
||||
AddAssert("second user above first", () =>
|
||||
{
|
||||
var first = this.ChildrenOfType<ParticipantPanel>().ElementAt(0);
|
||||
var second = this.ChildrenOfType<ParticipantPanel>().ElementAt(1);
|
||||
return second.Y < first.Y;
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestKickButtonOnlyPresentWhenHost()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user