mirror of https://github.com/ppy/osu
Fix news/wiki tests checking against incorrect constant string
This commit is contained in:
parent
51b056bf66
commit
6a8c16d3ef
|
@ -29,7 +29,7 @@ public void Setup() => Schedule(() =>
|
|||
[Test]
|
||||
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);
|
||||
|
||||
AddStep("Set article 1", () => header.SetArticle("1"));
|
||||
|
@ -41,7 +41,7 @@ public void TestControl()
|
|||
AddAssert("2 tabs total", () => header.TabCount == 2);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ public void SetUp() => Schedule(() =>
|
|||
[Test]
|
||||
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
|
||||
{
|
||||
|
@ -54,8 +54,8 @@ public void TestWikiHeader()
|
|||
AddAssert("Current is welcome", () => checkCurrent("Welcome"));
|
||||
AddAssert("Check breadcrumb", checkBreadcrumb);
|
||||
|
||||
AddStep("Change current to index", () => header.Current.Value = "index");
|
||||
AddAssert("Current is index", () => checkCurrent("index"));
|
||||
AddStep("Change current to index", () => header.Current.Value = WikiHeader.IndexPageString);
|
||||
AddAssert("Current is index", () => checkCurrent(WikiHeader.IndexPageString));
|
||||
|
||||
AddStep("Change wiki page data", () => wikiPageData.Value = new APIWikiPage
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ public void TestWikiHeader()
|
|||
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()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue