mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 18:42:56 +08:00
Add more tests
This commit is contained in:
parent
95828b07ef
commit
d610c90371
@ -24,6 +24,18 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
HeaderFlag flag;
|
HeaderFlag flag;
|
||||||
SpriteText text;
|
SpriteText text;
|
||||||
|
|
||||||
|
var countryA = new Country
|
||||||
|
{
|
||||||
|
FlagName = "BY",
|
||||||
|
FullName = "Belarus"
|
||||||
|
};
|
||||||
|
|
||||||
|
var countryB = new Country
|
||||||
|
{
|
||||||
|
FlagName = "US",
|
||||||
|
FullName = "United States"
|
||||||
|
};
|
||||||
|
|
||||||
AddRange(new Drawable[]
|
AddRange(new Drawable[]
|
||||||
{
|
{
|
||||||
flag = new HeaderFlag
|
flag = new HeaderFlag
|
||||||
@ -31,11 +43,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Size = new Vector2(30, 20),
|
Size = new Vector2(30, 20),
|
||||||
Country = new Country
|
Country = countryA,
|
||||||
{
|
|
||||||
FlagName = "BY",
|
|
||||||
FullName = "Belarus"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
text = new SpriteText
|
text = new SpriteText
|
||||||
{
|
{
|
||||||
@ -50,6 +58,8 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
flag.Action += () => text.FadeIn().Then().FadeOut(1000, Easing.OutQuint);
|
flag.Action += () => text.FadeIn().Then().FadeOut(1000, Easing.OutQuint);
|
||||||
|
|
||||||
AddStep("Trigger click", () => flag.Click());
|
AddStep("Trigger click", () => flag.Click());
|
||||||
|
AddStep("Change to country 2", () => flag.Country = countryB);
|
||||||
|
AddStep("Change to country 1", () => flag.Country = countryA);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user