mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:18:22 +08:00
Fix regressed screen test cases
This commit is contained in:
parent
31bbefb9a8
commit
65721a01ab
@ -2,27 +2,16 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Screens.Menu;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
public class TestCaseDisclaimer : OsuTestCase
|
||||
public class TestCaseDisclaimer : ScreenTestCase
|
||||
{
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Color4.Black,
|
||||
},
|
||||
new Disclaimer()
|
||||
};
|
||||
LoadScreen(new Disclaimer());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,11 +9,11 @@ using osu.Game.Screens.Tournament.Teams;
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
[Description("for tournament use")]
|
||||
public class TestCaseDrawings : OsuTestCase
|
||||
public class TestCaseDrawings : ScreenTestCase
|
||||
{
|
||||
public TestCaseDrawings()
|
||||
{
|
||||
Add(new Drawings
|
||||
LoadScreen(new Drawings
|
||||
{
|
||||
TeamList = new TestTeamList(),
|
||||
});
|
||||
|
@ -40,10 +40,10 @@ namespace osu.Game.Tests.Visual
|
||||
Room.RoomID.Value = 1;
|
||||
Room.Name.Value = "an awesome room";
|
||||
|
||||
Child = new TestMatchResults(new ScoreInfo
|
||||
LoadScreen(new TestMatchResults(new ScoreInfo
|
||||
{
|
||||
User = new User { Id = 10 },
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
private class TestMatchResults : MatchResults
|
||||
|
@ -12,7 +12,7 @@ using osu.Game.Screens.Multi.Lounge.Components;
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestCaseMultiScreen : OsuTestCase
|
||||
public class TestCaseMultiScreen : ScreenTestCase
|
||||
{
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
||||
@ -25,7 +25,7 @@ namespace osu.Game.Tests.Visual
|
||||
{
|
||||
Multiplayer multi = new Multiplayer();
|
||||
|
||||
AddStep(@"show", () => Add(multi));
|
||||
AddStep(@"show", () => LoadScreen(multi));
|
||||
AddWaitStep(5);
|
||||
AddStep(@"exit", multi.Exit);
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
|
||||
@ -14,7 +16,10 @@ namespace osu.Game.Tests.Visual
|
||||
|
||||
Add(parallax = new ParallaxContainer
|
||||
{
|
||||
Child = new BackgroundScreenDefault { Alpha = 0.8f }
|
||||
Child = new ScreenStack(new BackgroundScreenDefault { Alpha = 0.8f })
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
}
|
||||
});
|
||||
|
||||
AddStep("default parallax", () => parallax.ParallaxAmount = ParallaxContainer.DEFAULT_PARALLAX_AMOUNT);
|
||||
|
@ -12,6 +12,7 @@ using osu.Framework.Configuration;
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Rulesets;
|
||||
@ -25,7 +26,7 @@ using osu.Game.Screens.Select.Filter;
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestCasePlaySongSelect : OsuTestCase
|
||||
public class TestCasePlaySongSelect : ScreenTestCase
|
||||
{
|
||||
private BeatmapManager manager;
|
||||
|
||||
@ -107,7 +108,8 @@ namespace osu.Game.Tests.Visual
|
||||
Schedule(() =>
|
||||
{
|
||||
manager?.Delete(manager.GetAllUsableBeatmapSets());
|
||||
Child = songSelect = new TestSongSelect();
|
||||
LoadScreen(songSelect = new TestSongSelect());
|
||||
AddUntilStep(() => songSelect.IsPresent, "wait for present");
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ using osu.Game.Users;
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestCaseResults : OsuTestCase
|
||||
public class TestCaseResults : ScreenTestCase
|
||||
{
|
||||
private BeatmapManager beatmaps;
|
||||
|
||||
@ -43,7 +43,7 @@ namespace osu.Game.Tests.Visual
|
||||
if (beatmapInfo != null)
|
||||
Beatmap.Value = beatmaps.GetWorkingBeatmap(beatmapInfo);
|
||||
|
||||
Add(new SoloResults(new ScoreInfo
|
||||
LoadScreen(new SoloResults(new ScoreInfo
|
||||
{
|
||||
TotalScore = 2845370,
|
||||
Accuracy = 0.98,
|
||||
|
@ -1,7 +1,9 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
@ -14,10 +16,10 @@ namespace osu.Game.Tests
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
LoadComponentAsync(new BackgroundScreenDefault
|
||||
LoadComponentAsync(new ScreenStack(new BackgroundScreenDefault { Colour = OsuColour.Gray(0.5f) })
|
||||
{
|
||||
Colour = OsuColour.Gray(0.5f),
|
||||
Depth = 10
|
||||
Depth = 10,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
}, AddInternal);
|
||||
|
||||
// Have to construct this here, rather than in the constructor, because
|
||||
|
@ -7,7 +7,7 @@ using osu.Game.Online.Multiplayer;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
public abstract class MultiplayerTestCase : OsuTestCase
|
||||
public abstract class MultiplayerTestCase : ScreenTestCase
|
||||
{
|
||||
[Cached]
|
||||
private readonly Bindable<Room> currentRoom = new Bindable<Room>(new Room());
|
||||
|
Loading…
Reference in New Issue
Block a user