mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 21:07:18 +09:00
Fix storyboard test not actually working due to incorrect track referencing
This commit is contained in:
parent
308d9f5967
commit
4239e9f684
@ -22,19 +22,32 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestSceneStoryboard : OsuTestScene
|
public class TestSceneStoryboard : OsuTestScene
|
||||||
{
|
{
|
||||||
private readonly Container<DrawableStoryboard> storyboardContainer;
|
private Container<DrawableStoryboard> storyboardContainer;
|
||||||
private DrawableStoryboard storyboard;
|
private DrawableStoryboard storyboard;
|
||||||
|
|
||||||
[Cached]
|
[Test]
|
||||||
private MusicController musicController = new MusicController();
|
public void TestStoryboard()
|
||||||
|
{
|
||||||
|
AddStep("Restart", restart);
|
||||||
|
AddToggleStep("Passing", passing =>
|
||||||
|
{
|
||||||
|
if (storyboard != null) storyboard.Passing = passing;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public TestSceneStoryboard()
|
[Test]
|
||||||
|
public void TestStoryboardMissingVideo()
|
||||||
|
{
|
||||||
|
AddStep("Load storyboard with missing video", loadStoryboardNoVideo);
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load()
|
||||||
{
|
{
|
||||||
Clock = new FramedClock();
|
Clock = new FramedClock();
|
||||||
|
|
||||||
AddRange(new Drawable[]
|
AddRange(new Drawable[]
|
||||||
{
|
{
|
||||||
musicController,
|
|
||||||
new Container
|
new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -58,32 +71,11 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
State = { Value = Visibility.Visible },
|
State = { Value = Visibility.Visible },
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Beatmap.BindValueChanged(beatmapChanged, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
private void beatmapChanged(ValueChangedEvent<WorkingBeatmap> e) => loadStoryboard(e.NewValue);
|
||||||
public void TestStoryboard()
|
|
||||||
{
|
|
||||||
AddStep("Restart", restart);
|
|
||||||
AddToggleStep("Passing", passing =>
|
|
||||||
{
|
|
||||||
if (storyboard != null) storyboard.Passing = passing;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void TestStoryboardMissingVideo()
|
|
||||||
{
|
|
||||||
AddStep("Load storyboard with missing video", loadStoryboardNoVideo);
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load()
|
|
||||||
{
|
|
||||||
Beatmap.ValueChanged += beatmapChanged;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void beatmapChanged(ValueChangedEvent<WorkingBeatmap> e)
|
|
||||||
=> loadStoryboard(e.NewValue);
|
|
||||||
|
|
||||||
private void restart()
|
private void restart()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user