From d610c903716356593f9b774c5e768412583e13c5 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Wed, 11 Sep 2019 10:43:51 +0300 Subject: [PATCH] Add more tests --- .../Online/TestSceneRankingsHeaderFlag.cs | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneRankingsHeaderFlag.cs b/osu.Game.Tests/Visual/Online/TestSceneRankingsHeaderFlag.cs index d31e3011b8..c9531e1016 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneRankingsHeaderFlag.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneRankingsHeaderFlag.cs @@ -24,6 +24,18 @@ namespace osu.Game.Tests.Visual.Online HeaderFlag flag; SpriteText text; + var countryA = new Country + { + FlagName = "BY", + FullName = "Belarus" + }; + + var countryB = new Country + { + FlagName = "US", + FullName = "United States" + }; + AddRange(new Drawable[] { flag = new HeaderFlag @@ -31,11 +43,7 @@ namespace osu.Game.Tests.Visual.Online Anchor = Anchor.Centre, Origin = Anchor.Centre, Size = new Vector2(30, 20), - Country = new Country - { - FlagName = "BY", - FullName = "Belarus" - } + Country = countryA, }, text = new SpriteText { @@ -50,6 +58,8 @@ namespace osu.Game.Tests.Visual.Online flag.Action += () => text.FadeIn().Then().FadeOut(1000, Easing.OutQuint); AddStep("Trigger click", () => flag.Click()); + AddStep("Change to country 2", () => flag.Country = countryB); + AddStep("Change to country 1", () => flag.Country = countryA); } } }