mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 21:52:55 +08:00
Add isolated test for daily challenge intro flag
This commit is contained in:
parent
236a273e09
commit
9b9986b6f2
@ -5,6 +5,7 @@ using System;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Metadata;
|
using osu.Game.Online.Metadata;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
@ -42,6 +43,19 @@ namespace osu.Game.Tests.Visual.DailyChallenge
|
|||||||
AddStep("push screen", () => LoadScreen(new DailyChallengeIntro(room)));
|
AddStep("push screen", () => LoadScreen(new DailyChallengeIntro(room)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestPlayIntroOnceFlag()
|
||||||
|
{
|
||||||
|
AddStep("set intro played flag", () => Dependencies.Get<SessionStatics>().SetValue(Static.DailyChallengeIntroPlayed, true));
|
||||||
|
|
||||||
|
startChallenge();
|
||||||
|
|
||||||
|
AddAssert("intro played flag reset", () => Dependencies.Get<SessionStatics>().Get<bool>(Static.DailyChallengeIntroPlayed), () => Is.False);
|
||||||
|
|
||||||
|
AddStep("push screen", () => LoadScreen(new DailyChallengeIntro(room)));
|
||||||
|
AddUntilStep("intro played flag set", () => Dependencies.Get<SessionStatics>().Get<bool>(Static.DailyChallengeIntroPlayed), () => Is.True);
|
||||||
|
}
|
||||||
|
|
||||||
private void startChallenge()
|
private void startChallenge()
|
||||||
{
|
{
|
||||||
room = new Room
|
room = new Room
|
||||||
|
Loading…
Reference in New Issue
Block a user