mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 09:57:21 +09: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);
|
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]
|
[Test]
|
||||||
public void TestKickButtonOnlyPresentWhenHost()
|
public void TestKickButtonOnlyPresentWhenHost()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user