mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Update Tests with dependencies on LeaderboardScore. Added its dependency on DialogOverlay for the tests. Added test for deleting individual local score
This commit is contained in:
@ -1,11 +1,13 @@
|
||||
// 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.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osuTK.Graphics;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Rulesets.Osu.Mods;
|
||||
using osu.Game.Screens.Select.Leaderboards;
|
||||
@ -15,11 +17,19 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
{
|
||||
public class TestSceneUserTopScoreContainer : OsuTestScene
|
||||
{
|
||||
private DialogOverlay dialogOverlay;
|
||||
private Container container;
|
||||
|
||||
public TestSceneUserTopScoreContainer()
|
||||
{
|
||||
UserTopScoreContainer topScoreContainer;
|
||||
|
||||
Add(new Container
|
||||
Add(dialogOverlay = new DialogOverlay()
|
||||
{
|
||||
Depth = -1
|
||||
});
|
||||
|
||||
container = new Container
|
||||
{
|
||||
Origin = Anchor.BottomCentre,
|
||||
Anchor = Anchor.Centre,
|
||||
@ -38,7 +48,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
Anchor = Anchor.BottomCentre,
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var scores = new[]
|
||||
{
|
||||
@ -114,5 +124,13 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
AddStep(@"Add score(rank 22333)", () => topScoreContainer.Score.Value = scores[2]);
|
||||
AddStep(@"Add null score", () => topScoreContainer.Score.Value = null);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
Dependencies.Cache(dialogOverlay);
|
||||
|
||||
Add(container);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user