diff --git a/osu.Game.Tests/Visual/SongSelectV2/SongSelectComponentsTestScene.cs b/osu.Game.Tests/Visual/SongSelectV2/SongSelectComponentsTestScene.cs index c7f159705172..b7b0101a7c34 100644 --- a/osu.Game.Tests/Visual/SongSelectV2/SongSelectComponentsTestScene.cs +++ b/osu.Game.Tests/Visual/SongSelectV2/SongSelectComponentsTestScene.cs @@ -45,7 +45,7 @@ private void load() } }; - AddSliderStep("change relative width", 0, 1f, 0.5f, v => + AddSliderStep("change relative width", 0, 1f, 1f, v => { if (resizeContainer != null) resizeContainer.Width = v; diff --git a/osu.Game.Tests/Visual/SongSelectV2/TestSceneBeatmapInfoWedgeV2.cs b/osu.Game.Tests/Visual/SongSelectV2/TestSceneBeatmapInfoWedge.cs similarity index 97% rename from osu.Game.Tests/Visual/SongSelectV2/TestSceneBeatmapInfoWedgeV2.cs rename to osu.Game.Tests/Visual/SongSelectV2/TestSceneBeatmapInfoWedge.cs index aad2bd6334ae..35bd4ee9583a 100644 --- a/osu.Game.Tests/Visual/SongSelectV2/TestSceneBeatmapInfoWedgeV2.cs +++ b/osu.Game.Tests/Visual/SongSelectV2/TestSceneBeatmapInfoWedge.cs @@ -20,8 +20,7 @@ namespace osu.Game.Tests.Visual.SongSelectV2 { - [TestFixture] - public partial class TestSceneBeatmapInfoWedgeV2 : OsuTestScene + public partial class TestSceneBeatmapInfoWedge : SongSelectComponentsTestScene { private RulesetStore rulesets = null!; private TestBeatmapInfoWedgeV2 infoWedge = null!; @@ -33,6 +32,13 @@ private void load(RulesetStore rulesets) this.rulesets = rulesets; } + public override void SetUpSteps() + { + base.SetUpSteps(); + + AddStep("reset mods", () => SelectedMods.SetDefault()); + } + protected override void LoadComplete() { base.LoadComplete(); @@ -107,12 +113,6 @@ private void testBeatmapLabels(Ruleset ruleset) AddAssert("check artist", () => infoWedge.Info!.ArtistLabel.Current.Value == $"{ruleset.ShortName}Artist"); } - [SetUpSteps] - public void SetUpSteps() - { - AddStep("reset mods", () => SelectedMods.SetDefault()); - } - [Test] public void TestTruncation() { diff --git a/osu.Game.Tests/Visual/SongSelectV2/TestSceneLeaderboardScoreV2.cs b/osu.Game.Tests/Visual/SongSelectV2/TestSceneLeaderboardScore.cs similarity index 91% rename from osu.Game.Tests/Visual/SongSelectV2/TestSceneLeaderboardScoreV2.cs rename to osu.Game.Tests/Visual/SongSelectV2/TestSceneLeaderboardScore.cs index 4a733b2cbef9..a7d0d70c03a9 100644 --- a/osu.Game.Tests/Visual/SongSelectV2/TestSceneLeaderboardScoreV2.cs +++ b/osu.Game.Tests/Visual/SongSelectV2/TestSceneLeaderboardScore.cs @@ -7,7 +7,6 @@ using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; -using osu.Framework.Testing; using osu.Framework.Utils; using osu.Game.Configuration; using osu.Game.Graphics.Sprites; @@ -26,7 +25,7 @@ namespace osu.Game.Tests.Visual.SongSelectV2 { - public partial class TestSceneLeaderboardScoreV2 : OsuTestScene + public partial class TestSceneLeaderboardScore : SongSelectComponentsTestScene { [Cached] private OverlayColourProvider colourProvider { get; set; } = new OverlayColourProvider(OverlayColourScheme.Aquamarine); @@ -36,19 +35,6 @@ public partial class TestSceneLeaderboardScoreV2 : OsuTestScene private FillFlowContainer? fillFlow; private OsuSpriteText? drawWidthText; - private float relativeWidth; - - [BackgroundDependencyLoader] - private void load() - { - // TODO: invalidation seems to be one-off when clicking slider to a certain value, so drag for now - // doesn't seem to happen in-game (when toggling window mode) - AddSliderStep("change relative width", 0, 1f, 0.6f, v => - { - relativeWidth = v; - if (fillFlow != null) fillFlow.Width = v; - }); - } [Test] public void TestSheared() @@ -59,7 +45,6 @@ public void TestSheared() { fillFlow = new FillFlowContainer { - Width = relativeWidth, Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.X, @@ -94,7 +79,6 @@ public void TestNonSheared() { fillFlow = new FillFlowContainer { - Width = relativeWidth, Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.X, @@ -118,8 +102,7 @@ public void TestNonSheared() }); } - [SetUpSteps] - public void SetUpSteps() + public override void SetUpSteps() { AddToggleStep("toggle scoring mode", v => config.SetValue(OsuSetting.ScoreDisplayMode, v ? ScoringMode.Classic : ScoringMode.Standardised)); } diff --git a/osu.Game.Tests/Visual/SongSelectV2/TestSceneSongSelectV2.cs b/osu.Game.Tests/Visual/SongSelectV2/TestSceneSongSelect.cs similarity index 98% rename from osu.Game.Tests/Visual/SongSelectV2/TestSceneSongSelectV2.cs rename to osu.Game.Tests/Visual/SongSelectV2/TestSceneSongSelect.cs index c93c41d558a0..d43026c9609d 100644 --- a/osu.Game.Tests/Visual/SongSelectV2/TestSceneSongSelectV2.cs +++ b/osu.Game.Tests/Visual/SongSelectV2/TestSceneSongSelect.cs @@ -22,7 +22,7 @@ namespace osu.Game.Tests.Visual.SongSelectV2 { - public partial class TestSceneSongSelectV2 : ScreenTestScene + public partial class TestSceneSongSelect : ScreenTestScene { [Cached] private readonly ScreenFooter screenScreenFooter; @@ -30,7 +30,7 @@ public partial class TestSceneSongSelectV2 : ScreenTestScene [Cached] private readonly OsuLogo logo; - public TestSceneSongSelectV2() + public TestSceneSongSelect() { Children = new Drawable[] { diff --git a/osu.Game.Tests/Visual/SongSelectV2/TestSceneSongSelectV2Navigation.cs b/osu.Game.Tests/Visual/SongSelectV2/TestSceneSongSelectNavigation.cs similarity index 92% rename from osu.Game.Tests/Visual/SongSelectV2/TestSceneSongSelectV2Navigation.cs rename to osu.Game.Tests/Visual/SongSelectV2/TestSceneSongSelectNavigation.cs index a72146352e7f..5173cb56730a 100644 --- a/osu.Game.Tests/Visual/SongSelectV2/TestSceneSongSelectV2Navigation.cs +++ b/osu.Game.Tests/Visual/SongSelectV2/TestSceneSongSelectNavigation.cs @@ -9,7 +9,7 @@ namespace osu.Game.Tests.Visual.SongSelectV2 { - public partial class TestSceneSongSelectV2Navigation : OsuGameTestScene + public partial class TestSceneSongSelectNavigation : OsuGameTestScene { public override void SetUpSteps() {