mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 17:47:29 +08:00
Fix news/wiki tests checking against incorrect constant string
This commit is contained in:
parent
51b056bf66
commit
6a8c16d3ef
@ -29,7 +29,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestControl()
|
public void TestControl()
|
||||||
{
|
{
|
||||||
AddAssert("Front page selected", () => header.Current.Value == "frontpage");
|
AddAssert("Front page selected", () => header.Current.Value == NewsHeader.FrontPageString);
|
||||||
AddAssert("1 tab total", () => header.TabCount == 1);
|
AddAssert("1 tab total", () => header.TabCount == 1);
|
||||||
|
|
||||||
AddStep("Set article 1", () => header.SetArticle("1"));
|
AddStep("Set article 1", () => header.SetArticle("1"));
|
||||||
@ -41,7 +41,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
AddAssert("2 tabs total", () => header.TabCount == 2);
|
AddAssert("2 tabs total", () => header.TabCount == 2);
|
||||||
|
|
||||||
AddStep("Set front page", () => header.SetFrontPage());
|
AddStep("Set front page", () => header.SetFrontPage());
|
||||||
AddAssert("Front page selected", () => header.Current.Value == "frontpage");
|
AddAssert("Front page selected", () => header.Current.Value == NewsHeader.FrontPageString);
|
||||||
AddAssert("1 tab total", () => header.TabCount == 1);
|
AddAssert("1 tab total", () => header.TabCount == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestWikiHeader()
|
public void TestWikiHeader()
|
||||||
{
|
{
|
||||||
AddAssert("Current is index", () => checkCurrent("index"));
|
AddAssert("Current is index", () => checkCurrent(WikiHeader.IndexPageString));
|
||||||
|
|
||||||
AddStep("Change wiki page data", () => wikiPageData.Value = new APIWikiPage
|
AddStep("Change wiki page data", () => wikiPageData.Value = new APIWikiPage
|
||||||
{
|
{
|
||||||
@ -54,8 +54,8 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
AddAssert("Current is welcome", () => checkCurrent("Welcome"));
|
AddAssert("Current is welcome", () => checkCurrent("Welcome"));
|
||||||
AddAssert("Check breadcrumb", checkBreadcrumb);
|
AddAssert("Check breadcrumb", checkBreadcrumb);
|
||||||
|
|
||||||
AddStep("Change current to index", () => header.Current.Value = "index");
|
AddStep("Change current to index", () => header.Current.Value = WikiHeader.IndexPageString);
|
||||||
AddAssert("Current is index", () => checkCurrent("index"));
|
AddAssert("Current is index", () => checkCurrent(WikiHeader.IndexPageString));
|
||||||
|
|
||||||
AddStep("Change wiki page data", () => wikiPageData.Value = new APIWikiPage
|
AddStep("Change wiki page data", () => wikiPageData.Value = new APIWikiPage
|
||||||
{
|
{
|
||||||
@ -71,7 +71,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
AddAssert("Check breadcrumb", checkBreadcrumb);
|
AddAssert("Check breadcrumb", checkBreadcrumb);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool checkCurrent(string expectedCurrent) => header.Current.Value == expectedCurrent;
|
private bool checkCurrent(LocalisableString expectedCurrent) => header.Current.Value == expectedCurrent;
|
||||||
|
|
||||||
private bool checkBreadcrumb()
|
private bool checkBreadcrumb()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user