1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 00:42:55 +08:00

Fix test not actually testing desired scenario anymore

The test was checking the test scene's own `SelectedMods` bindable
rather than the multiplayer screen's, and the former was never actually
being mutated by anything. Therefore the case would pass even on
`master` with the fix reverted.
This commit is contained in:
Bartłomiej Dach 2022-03-22 19:04:32 +01:00
parent 804e856160
commit 94c5207f36
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -269,8 +269,9 @@ namespace osu.Game.Tests.Visual.Navigation
AddStep("Enable autoplay", () => { Game.SelectedMods.Value = new[] { osuAutomationMod }; });
PushAndConfirm(() => new Screens.OnlinePlay.Multiplayer.Multiplayer());
AddUntilStep("Mods are removed", () => SelectedMods.Value.Count == 0);
Screens.OnlinePlay.Multiplayer.Multiplayer multiplayer = null;
PushAndConfirm(() => multiplayer = new Screens.OnlinePlay.Multiplayer.Multiplayer());
AddUntilStep("Mods are removed", () => multiplayer.Mods.Value.Count == 0);
AddStep("Return to menu", () => Game.ScreenStack.CurrentScreen.Exit());
AddUntilStep("Mods are restored", () => Game.SelectedMods.Value.Contains(osuAutomationMod));