mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
Add failing pinned comment replies state test
This commit is contained in:
parent
d49cd717d6
commit
f0b2176c30
@ -17,6 +17,7 @@ using osu.Game.Online.API;
|
|||||||
using osu.Game.Online.API.Requests;
|
using osu.Game.Online.API.Requests;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Overlays.Comments;
|
using osu.Game.Overlays.Comments;
|
||||||
|
using osu.Game.Overlays.Comments.Buttons;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Online
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
@ -58,6 +59,11 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
AddStep("show comments", () => commentsContainer.ShowComments(CommentableType.Beatmapset, 123));
|
AddStep("show comments", () => commentsContainer.ShowComments(CommentableType.Beatmapset, 123));
|
||||||
AddUntilStep("show more button hidden",
|
AddUntilStep("show more button hidden",
|
||||||
() => commentsContainer.ChildrenOfType<CommentsShowMoreButton>().Single().Alpha == 0);
|
() => commentsContainer.ChildrenOfType<CommentsShowMoreButton>().Single().Alpha == 0);
|
||||||
|
|
||||||
|
if (withPinned)
|
||||||
|
AddAssert("pinned comment replies collapsed", () => commentsContainer.ChildrenOfType<ShowRepliesButton>().First().Expanded.Value, () => Is.False);
|
||||||
|
else
|
||||||
|
AddAssert("first comment replies expanded", () => commentsContainer.ChildrenOfType<ShowRepliesButton>().First().Expanded.Value, () => Is.True);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase(false)]
|
[TestCase(false)]
|
||||||
@ -302,7 +308,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
bundle.Comments.Add(new Comment
|
bundle.Comments.Add(new Comment
|
||||||
{
|
{
|
||||||
Id = 20,
|
Id = 20,
|
||||||
Message = "Reply to pinned comment",
|
Message = "Reply to pinned comment initially hidden",
|
||||||
LegacyName = "AbandonedUser",
|
LegacyName = "AbandonedUser",
|
||||||
CreatedAt = DateTimeOffset.Now,
|
CreatedAt = DateTimeOffset.Now,
|
||||||
VotesCount = 0,
|
VotesCount = 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user