mirror of https://github.com/ppy/osu
Avoid test failures on non-triangle intro tests
This commit is contained in:
parent
52f1c2bfdb
commit
6a21d58325
|
@ -20,6 +20,8 @@ public abstract class IntroTestScene : OsuTestScene
|
||||||
[Cached]
|
[Cached]
|
||||||
private OsuLogo logo;
|
private OsuLogo logo;
|
||||||
|
|
||||||
|
protected abstract bool IntroReliesOnTrack { get; }
|
||||||
|
|
||||||
protected OsuScreenStack IntroStack;
|
protected OsuScreenStack IntroStack;
|
||||||
|
|
||||||
private IntroScreen intro;
|
private IntroScreen intro;
|
||||||
|
@ -103,6 +105,8 @@ public virtual void TestPlayIntroWithFailingAudioDevice()
|
||||||
});
|
});
|
||||||
|
|
||||||
AddUntilStep("wait for menu", () => intro.DidLoadMenu);
|
AddUntilStep("wait for menu", () => intro.DidLoadMenu);
|
||||||
|
|
||||||
|
if (IntroReliesOnTrack)
|
||||||
AddUntilStep("wait for notification", () => notifications.UnreadCount.Value == 1);
|
AddUntilStep("wait for notification", () => notifications.UnreadCount.Value == 1);
|
||||||
|
|
||||||
AddStep("uninstall delegate", () => trackResetDelegate?.Cancel());
|
AddStep("uninstall delegate", () => trackResetDelegate?.Cancel());
|
||||||
|
|
|
@ -9,6 +9,7 @@ namespace osu.Game.Tests.Visual.Menus
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestSceneIntroCircles : IntroTestScene
|
public class TestSceneIntroCircles : IntroTestScene
|
||||||
{
|
{
|
||||||
|
protected override bool IntroReliesOnTrack => false;
|
||||||
protected override IntroScreen CreateScreen() => new IntroCircles();
|
protected override IntroScreen CreateScreen() => new IntroCircles();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ namespace osu.Game.Tests.Visual.Menus
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestSceneIntroTriangles : IntroTestScene
|
public class TestSceneIntroTriangles : IntroTestScene
|
||||||
{
|
{
|
||||||
|
protected override bool IntroReliesOnTrack => true;
|
||||||
protected override IntroScreen CreateScreen() => new IntroTriangles();
|
protected override IntroScreen CreateScreen() => new IntroTriangles();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ namespace osu.Game.Tests.Visual.Menus
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestSceneIntroWelcome : IntroTestScene
|
public class TestSceneIntroWelcome : IntroTestScene
|
||||||
{
|
{
|
||||||
|
protected override bool IntroReliesOnTrack => false;
|
||||||
protected override IntroScreen CreateScreen() => new IntroWelcome();
|
protected override IntroScreen CreateScreen() => new IntroWelcome();
|
||||||
|
|
||||||
public override void TestPlayIntro()
|
public override void TestPlayIntro()
|
||||||
|
|
Loading…
Reference in New Issue