8000 Show remaining attempts again on playlist screen by peppy · Pull Request #15307 · ppy/osu · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Show remaining attempts again on playlist screen #15307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Oct 27, 2021

Conversation

peppy
Copy link
Member
@peppy peppy commented Oct 26, 2021

Also adds tooltips and disabled state to the ready button in the case of exhausted attempts.

No tests yet because the existing test scenes aren't flexible enough to add them. I'll look into adding tests later today unless it's deemed that they aren't required.

Closes #15274.

@bdach
Copy link
Collaborator
bdach commented Oct 26, 2021

Read the source and tested manually, seems fine. Would have preferred to have tests obviously but if it's prohibitively difficult to get them in place I'm not going to insist on it.

@peppy
Copy link
Member Author
peppy commented Oct 27, 2021

Still aren't able to add tests for this, but here's a diff on top of #15316 for the display portion. Ready button still needs testing but I don't even want to start on that until the playlist online tests are in a better state. Still recommending this PR is merged as-is and tests are added as a follow-up, since it's a pretty annoying regression that I would like to get out in this week's release.

diff --git a/osu.Game.Tests/Visual/Playlists/TestScenePlaylistCreation.cs b/osu.Game.Tests/Visual/Playlists/TestScenePlaylistCreation.cs
index c4e6f41f27..8b07719d6b 100644
--- a/osu.Game.Tests/Visual/Playlists/TestScenePlaylistCreation.cs
+++ b/osu.Game.Tests/Visual/Playlists/TestScenePlaylistCreation.cs
@@ -15,6 +15,7 @@
 using osu.Game.Online.Rooms;
 using osu.Game.Rulesets;
 using osu.Game.Rulesets.Osu;
+using osu.Game.Screens.OnlinePlay.Components;
 using osu.Game.Screens.OnlinePlay.Playlists;
 using osu.Game.Screens.Play;
 using osu.Game.Tests.Visual.OnlinePlay;
@@ -66,6 +67,32 @@ public void TestLoadSimpleMatch()
                 });
             });
 
+            AddUntilStep("Progress details are hidden", () => match.ChildrenOfType<RoomLocalUserInfo>().FirstOrDefault()?.Parent.Alpha == 0);
+
+            AddStep("start match", () => match.ChildrenOfType<PlaylistsReadyButton>().First().TriggerClick());
+            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);
+
             AddStep("start match", () => match.ChildrenOfType<PlaylistsReadyButton>().First().TriggerClick());
             AddUntilStep("player loader loaded", () => Stack.CurrentScreen is PlayerLoader);
         }

@peppy peppy merged commit a920883 into ppy:master Oct 27, 2021
@peppy peppy deleted the playlist-remaining-attempt-display branch October 28, 2021 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attempts remaining in playlists are no longer shown in the new design
2 participants
0