mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 17:17:24 +08:00
Fix tests maybe
This commit is contained in:
parent
b46f3c97da
commit
b77a10b6db
@ -76,8 +76,12 @@ namespace osu.Game.Tests.Visual.DailyChallenge
|
||||
AddStep("set daily challenge info", () => metadataClient.DailyChallengeInfo.Value = new DailyChallengeInfo { RoomID = 1234 });
|
||||
AddStep("push screen", () => LoadScreen(new Screens.OnlinePlay.DailyChallenge.DailyChallenge(room)));
|
||||
AddStep("daily challenge ended", () => metadataClient.DailyChallengeInfo.Value = null);
|
||||
|
||||
Func<APIRequest, bool>? previousHandler = null;
|
||||
|
||||
AddStep("install custom handler", () =>
|
||||
{
|
||||
previousHandler = ((DummyAPIAccess)API).HandleRequest;
|
||||
((DummyAPIAccess)API).HandleRequest = req =>
|
||||
{
|
||||
switch (req)
|
||||
@ -108,6 +112,8 @@ namespace osu.Game.Tests.Visual.DailyChallenge
|
||||
};
|
||||
});
|
||||
AddStep("next daily challenge started", () => metadataClient.DailyChallengeInfo.Value = new DailyChallengeInfo { RoomID = 1235 });
|
||||
|
||||
AddStep("restore previous handler", () => ((DummyAPIAccess)API).HandleRequest = previousHandler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user