mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Add missing test coverage for attempt count display
This commit is contained in:
@ -15,6 +15,7 @@ using osu.Game.Database;
|
|||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Rulesets.Osu;
|
using osu.Game.Rulesets.Osu;
|
||||||
|
using osu.Game.Screens.OnlinePlay.Components;
|
||||||
using osu.Game.Screens.OnlinePlay.Playlists;
|
using osu.Game.Screens.OnlinePlay.Playlists;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
using osu.Game.Tests.Visual.OnlinePlay;
|
using osu.Game.Tests.Visual.OnlinePlay;
|
||||||
@ -65,10 +66,33 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
AddUntilStep("Progress details are hidden", () => match.ChildrenOfType<RoomLocalUserInfo>().FirstOrDefault()?.Parent.Alpha == 0);
|
||||||
|
|
||||||
AddStep("start match", () => match.ChildrenOfType<PlaylistsReadyButton>().First().TriggerClick());
|
AddStep("start match", () => match.ChildrenOfType<PlaylistsReadyButton>().First().TriggerClick());
|
||||||
AddUntilStep("player loader loaded", () => Stack.CurrentScreen is PlayerLoader);
|
AddUntilStep("player loader loaded", () => Stack.CurrentScreen is PlayerLoader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestAttemptLimitedMatch()
|
||||||
|
{
|
||||||
|
setupAndCreateRoom(room =>
|
||||||
|
{
|
||||||
|
room.RoomID.Value = 1; // forces room creation.
|
||||||
|
room.Name.Value = "my awesome room";
|
||||||
|
room.MaxAttempts.Value = 5;
|
||||||
|
room.Host.Value = API.LocalUser.Value;
|
||||||
|
room.RecentParticipants.Add(room.Host.Value);
|
||||||
|
room.EndDate.Value = DateTimeOffset.Now.AddMinutes(5);
|
||||||
|
room.Playlist.Add(new PlaylistItem
|
||||||
|
{
|
||||||
|
Beatmap = { Value = importedBeatmap.Value.Beatmaps.First() },
|
||||||
|
Ruleset = { Value = new OsuRuleset().RulesetInfo }
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
AddUntilStep("Progress details are visible", () => match.ChildrenOfType<RoomLocalUserInfo>().FirstOrDefault()?.Parent.Alpha == 1);
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestPlaylistItemSelectedOnCreate()
|
public void TestPlaylistItemSelectedOnCreate()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user