1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-27 12:22:54 +08:00
osu-lazer/osu.Game.Tests/Visual/Online/TestSceneCommentsHeader.cs

38 lines
1.3 KiB
C#
Raw Normal View History

2019-10-10 17:06:25 +08:00
// 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.
2022-06-17 15:37:17 +08:00
#nullable disable
2019-10-10 17:06:25 +08:00
using NUnit.Framework;
2020-01-27 19:58:27 +08:00
using osu.Framework.Allocation;
2019-10-10 17:06:25 +08:00
using osu.Framework.Bindables;
2020-01-27 19:58:27 +08:00
using osu.Game.Overlays;
2019-10-10 17:06:25 +08:00
using osu.Game.Overlays.Comments;
namespace osu.Game.Tests.Visual.Online
{
[TestFixture]
public class TestSceneCommentsHeader : OsuTestScene
{
2020-01-27 19:58:27 +08:00
[Cached]
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
private readonly Bindable<CommentsSortCriteria> sort = new Bindable<CommentsSortCriteria>();
2019-10-10 17:06:25 +08:00
private readonly BindableBool showDeleted = new BindableBool();
public TestSceneCommentsHeader()
{
Add(new CommentsHeader
{
Sort = { BindTarget = sort },
ShowDeleted = { BindTarget = showDeleted }
});
AddStep("Trigger ShowDeleted", () => showDeleted.Value = !showDeleted.Value);
AddStep("Select old", () => sort.Value = CommentsSortCriteria.Old);
AddStep("Select new", () => sort.Value = CommentsSortCriteria.New);
AddStep("Select top", () => sort.Value = CommentsSortCriteria.Top);
2019-10-10 17:06:25 +08:00
}
}
}