1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +08:00

Add more tests

This commit is contained in:
Andrei Zavatski 2019-09-11 10:43:51 +03:00
parent 95828b07ef
commit d610c90371

View File

@ -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);
}
}
}