Update remaining tests to use new base class (and tidy up `V2` suffixes)

This commit is contained in:
Dean Herbert 2024-08-14 21:09:28 +09:00
parent 1665d9a93e
commit e603888130
No known key found for this signature in database
5 changed files with 14 additions and 31 deletions

View File

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

View File

@ -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()
{

View File

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

View File

@ -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[]
{

View File

@ -9,7 +9,7 @@
namespace osu.Game.Tests.Visual.SongSelectV2
{
public partial class TestSceneSongSelectV2Navigation : OsuGameTestScene
public partial class TestSceneSongSelectNavigation : OsuGameTestScene
{
public override void SetUpSteps()
{