mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 07:22:55 +08:00
Fix wedge load test again
Initial load was not being waited on for long enough.
This commit is contained in:
parent
a6da1b49e7
commit
f4c2d6b1a3
@ -52,6 +52,9 @@ namespace osu.Game.Tests.Visual
|
|||||||
infoWedge.UpdateBeatmap(beatmap);
|
infoWedge.UpdateBeatmap(beatmap);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// select part is redundant, but wait for load isn't
|
||||||
|
selectBeatmap(beatmap.Value.Beatmap);
|
||||||
|
|
||||||
AddWaitStep(3);
|
AddWaitStep(3);
|
||||||
|
|
||||||
AddStep("hide", () => { infoWedge.State = Visibility.Hidden; });
|
AddStep("hide", () => { infoWedge.State = Visibility.Hidden; });
|
||||||
@ -63,10 +66,11 @@ namespace osu.Game.Tests.Visual
|
|||||||
foreach (var rulesetInfo in rulesets.AvailableRulesets)
|
foreach (var rulesetInfo in rulesets.AvailableRulesets)
|
||||||
{
|
{
|
||||||
var ruleset = rulesetInfo.CreateInstance();
|
var ruleset = rulesetInfo.CreateInstance();
|
||||||
beatmaps.Add(createTestBeatmap(rulesetInfo));
|
var beatmap = createTestBeatmap(rulesetInfo);
|
||||||
|
|
||||||
var name = rulesetInfo.ShortName;
|
beatmaps.Add(beatmap);
|
||||||
selectBeatmap(name);
|
|
||||||
|
selectBeatmap(beatmap);
|
||||||
|
|
||||||
// TODO: adjust cases once more info is shown for other gamemodes
|
// TODO: adjust cases once more info is shown for other gamemodes
|
||||||
switch (ruleset)
|
switch (ruleset)
|
||||||
@ -108,16 +112,14 @@ namespace osu.Game.Tests.Visual
|
|||||||
AddAssert("check no infolabels", () => !infoWedge.Info.InfoLabelContainer.Children.Any());
|
AddAssert("check no infolabels", () => !infoWedge.Info.InfoLabelContainer.Children.Any());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selectBeatmap(string name)
|
private void selectBeatmap(Beatmap b)
|
||||||
{
|
{
|
||||||
BeatmapInfoWedge.BufferedWedgeInfo infoBefore = null;
|
BeatmapInfoWedge.BufferedWedgeInfo infoBefore = null;
|
||||||
|
|
||||||
AddStep($"select {name} beatmap", () =>
|
AddStep($"select {b.Metadata.Title} beatmap", () =>
|
||||||
{
|
{
|
||||||
infoBefore = infoWedge.Info;
|
infoBefore = infoWedge.Info;
|
||||||
WorkingBeatmap bm = new TestWorkingBeatmap(beatmaps.First(b => b.BeatmapInfo.Ruleset.ShortName == name));
|
infoWedge.UpdateBeatmap(beatmap.Value = new TestWorkingBeatmap(b));
|
||||||
beatmap.Value = bm;
|
|
||||||
infoWedge.UpdateBeatmap(beatmap);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
AddUntilStep(() => infoWedge.Info != infoBefore, "wait for async load");
|
AddUntilStep(() => infoWedge.Info != infoBefore, "wait for async load");
|
||||||
|
Loading…
Reference in New Issue
Block a user