-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/ppy/osu into menu-button-…
…tweaks
- Loading branch information
Showing
12 changed files
with
97 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,33 +3,40 @@ | |
|
||
using System.Linq; | ||
using NUnit.Framework; | ||
using osu.Framework.Graphics.Containers; | ||
using osu.Framework.Testing; | ||
using osu.Game.Online.API.Requests.Responses; | ||
using osu.Game.Screens.Menu; | ||
using osuTK.Input; | ||
|
||
namespace osu.Game.Tests.Visual.Menus | ||
{ | ||
public partial class TestSceneMainMenu : OsuGameTestScene | ||
{ | ||
private SystemTitle systemTitle => Game.ChildrenOfType<SystemTitle>().Single(); | ||
|
||
[Test] | ||
public void TestSystemTitle() | ||
{ | ||
AddStep("set system title", () => Game.ChildrenOfType<SystemTitle>().Single().Current.Value = new APISystemTitle | ||
AddStep("set system title", () => systemTitle.Current.Value = new APISystemTitle | ||
{ | ||
Image = @"https://assets.ppy.sh/main-menu/[email protected]", | ||
Url = @"https://osu.ppy.sh/home/news/2023-12-21-project-loved-december-2023", | ||
}); | ||
AddStep("set another title", () => Game.ChildrenOfType<SystemTitle>().Single().Current.Value = new APISystemTitle | ||
AddAssert("system title not visible", () => systemTitle.State.Value, () => Is.EqualTo(Visibility.Hidden)); | ||
AddStep("enter menu", () => InputManager.Key(Key.Enter)); | ||
AddUntilStep("system title visible", () => systemTitle.State.Value, () => Is.EqualTo(Visibility.Visible)); | ||
AddStep("set another title", () => systemTitle.Current.Value = new APISystemTitle | ||
{ | ||
Image = @"https://assets.ppy.sh/main-menu/[email protected]", | ||
Url = @"https://osu.ppy.sh/community/contests/189", | ||
}); | ||
AddStep("set title with nonexistent image", () => Game.ChildrenOfType<SystemTitle>().Single().Current.Value = new APISystemTitle | ||
AddStep("set title with nonexistent image", () => systemTitle.Current.Value = new APISystemTitle | ||
{ | ||
Image = @"https://test.invalid/@2x", // .invalid TLD reserved by https://datatracker.ietf.org/doc/html/rfc2606#section-2 | ||
Url = @"https://osu.ppy.sh/community/contests/189", | ||
}); | ||
AddStep("unset system title", () => Game.ChildrenOfType<SystemTitle>().Single().Current.Value = null); | ||
AddStep("unset system title", () => systemTitle.Current.Value = null); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters