1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 06:42:56 +08:00

add test for notice box

This commit is contained in:
Gagah Pangeran Rosfatiputra 2021-05-23 17:29:48 +07:00
parent 292f314fee
commit 8f1b48d766
No known key found for this signature in database
GPG Key ID: 25F6F17FD29031E2

View File

@ -67,6 +67,40 @@ namespace osu.Game.Tests.Visual.Online
AddAssert("check url", () => markdownContainer.Link.Url == $"{api.WebsiteRootUrl}/wiki/Article_styling_criteria/Formatting");
}
[Test]
public void TestOutdatedNoticeBox()
{
AddStep("Add outdated yaml header", () =>
{
markdownContainer.Text = @"---
outdated: true
---";
});
}
[Test]
public void TestNeedsCleanupNoticeBox()
{
AddStep("Add needs cleanup yaml header", () =>
{
markdownContainer.Text = @"---
needs_cleanup: true
---";
});
}
[Test]
public void TestOnlyShowOutdatedNoticeBox()
{
AddStep("Add outdated and needs cleanup yaml", () =>
{
markdownContainer.Text = @"---
outdated: true
needs_cleanup: true
---";
});
}
private class TestMarkdownContainer : WikiMarkdownContainer
{
public LinkInline Link;