Avoid test failures on non-triangle intro tests

This commit is contained in:
Dean Herbert 2022-01-30 18:59:18 +09:00
parent 52f1c2bfdb
commit 6a21d58325
4 changed files with 8 additions and 1 deletions

View File

@ -20,6 +20,8 @@ public abstract class IntroTestScene : OsuTestScene
[Cached]
private OsuLogo logo;
protected abstract bool IntroReliesOnTrack { get; }
protected OsuScreenStack IntroStack;
private IntroScreen intro;
@ -103,6 +105,8 @@ public virtual void TestPlayIntroWithFailingAudioDevice()
});
AddUntilStep("wait for menu", () => intro.DidLoadMenu);
if (IntroReliesOnTrack)
AddUntilStep("wait for notification", () => notifications.UnreadCount.Value == 1);
AddStep("uninstall delegate", () => trackResetDelegate?.Cancel());

View File

@ -9,6 +9,7 @@ namespace osu.Game.Tests.Visual.Menus
[TestFixture]
public class TestSceneIntroCircles : IntroTestScene
{
protected override bool IntroReliesOnTrack => false;
protected override IntroScreen CreateScreen() => new IntroCircles();
}
}

View File

@ -9,6 +9,7 @@ namespace osu.Game.Tests.Visual.Menus
[TestFixture]
public class TestSceneIntroTriangles : IntroTestScene
{
protected override bool IntroReliesOnTrack => true;
protected override IntroScreen CreateScreen() => new IntroTriangles();
}
}

View File

@ -10,6 +10,7 @@ namespace osu.Game.Tests.Visual.Menus
[TestFixture]
public class TestSceneIntroWelcome : IntroTestScene
{
protected override bool IntroReliesOnTrack => false;
protected override IntroScreen CreateScreen() => new IntroWelcome();
public override void TestPlayIntro()