1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 04:19:53 +08:00

Add realm refresh steps in an attempt to stabilise failing test

I think this is required because there is a higher chance of batched
updates with the new structure (and less calls to `BeatmapSetsChanged`
which causes re-selection).
This commit is contained in:
Dean Herbert
2023-12-19 02:08:25 +09:00
Unverified
parent d81cabc063
commit 41485c19cf
@@ -464,6 +464,8 @@ namespace osu.Game.Tests.Visual.SongSelect
manager.Import(testBeatmapSetInfo);
}, 10);
AddStep("Force realm refresh", () => Realm.Run(r => r.Refresh()));
AddUntilStep("has selection", () => songSelect!.Carousel.SelectedBeatmapInfo?.BeatmapSet?.OnlineID == originalOnlineSetID);
Task<Live<BeatmapSetInfo>?> updateTask = null!;
@@ -476,6 +478,8 @@ namespace osu.Game.Tests.Visual.SongSelect
});
AddUntilStep("wait for update completion", () => updateTask.IsCompleted);
AddStep("Force realm refresh", () => Realm.Run(r => r.Refresh()));
AddUntilStep("retained selection", () => songSelect!.Carousel.SelectedBeatmapInfo?.BeatmapSet?.OnlineID == originalOnlineSetID);
}