mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 05:02:55 +08:00
Merge remote-tracking branch 'Joehuu/master' into update-beatmap-scores-design
# Conflicts: # osu.Game.Tests/Visual/SongSelect/TestCaseBeatmapScoresContainer.cs
This commit is contained in:
commit
6a9f005ed4
@ -27,8 +27,8 @@
|
|||||||
<ItemGroup Label="Package References">
|
<ItemGroup Label="Package References">
|
||||||
<PackageReference Include="System.IO.Packaging" Version="4.5.0" />
|
<PackageReference Include="System.IO.Packaging" Version="4.5.0" />
|
||||||
<PackageReference Include="ppy.squirrel.windows" Version="1.9.0.3" />
|
<PackageReference Include="ppy.squirrel.windows" Version="1.9.0.3" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.3" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Label="Resources">
|
<ItemGroup Label="Resources">
|
||||||
<EmbeddedResource Include="lazer.ico" />
|
<EmbeddedResource Include="lazer.ico" />
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<Import Project="..\osu.TestProject.props" />
|
<Import Project="..\osu.TestProject.props" />
|
||||||
<ItemGroup Label="Package References">
|
<ItemGroup Label="Package References">
|
||||||
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
|
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
|
||||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||||
<PackageReference Include="NUnit3TestAdapter" Version="3.12.0" />
|
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
|
||||||
<PackageReference Update="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
|
<PackageReference Update="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<Import Project="..\osu.TestProject.props" />
|
<Import Project="..\osu.TestProject.props" />
|
||||||
<ItemGroup Label="Package References">
|
<ItemGroup Label="Package References">
|
||||||
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
|
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
|
||||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||||
<PackageReference Include="NUnit3TestAdapter" Version="3.12.0" />
|
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
|
||||||
<PackageReference Update="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
|
<PackageReference Update="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<Import Project="..\osu.TestProject.props" />
|
<Import Project="..\osu.TestProject.props" />
|
||||||
<ItemGroup Label="Package References">
|
<ItemGroup Label="Package References">
|
||||||
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
|
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
|
||||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||||
<PackageReference Include="NUnit3TestAdapter" Version="3.12.0" />
|
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
|
||||||
<PackageReference Update="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
|
<PackageReference Update="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Graphics.Cursor;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Rulesets.Osu.UI;
|
using osu.Game.Rulesets.Osu.UI;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
@ -19,10 +20,7 @@ namespace osu.Game.Rulesets.Osu.Edit
|
|||||||
|
|
||||||
private class OsuPlayfieldNoCursor : OsuPlayfield
|
private class OsuPlayfieldNoCursor : OsuPlayfield
|
||||||
{
|
{
|
||||||
public OsuPlayfieldNoCursor()
|
protected override CursorContainer CreateCursor() => null;
|
||||||
{
|
|
||||||
Cursor?.Expire();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<Import Project="..\osu.TestProject.props" />
|
<Import Project="..\osu.TestProject.props" />
|
||||||
<ItemGroup Label="Package References">
|
<ItemGroup Label="Package References">
|
||||||
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
|
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
|
||||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||||
<PackageReference Include="NUnit3TestAdapter" Version="3.12.0" />
|
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
|
||||||
<PackageReference Update="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
|
<PackageReference Update="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Project">
|
<PropertyGroup Label="Project">
|
||||||
|
@ -9,7 +9,6 @@ using NUnit.Framework;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Framework.Input.States;
|
using osu.Framework.Input.States;
|
||||||
@ -33,7 +32,7 @@ using osu.Game.Users;
|
|||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Background
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseBackgroundScreenBeatmap : ManualInputManagerTestCase
|
public class TestCaseBackgroundScreenBeatmap : ManualInputManagerTestCase
|
||||||
@ -48,14 +47,12 @@ namespace osu.Game.Tests.Visual
|
|||||||
};
|
};
|
||||||
|
|
||||||
private DummySongSelect songSelect;
|
private DummySongSelect songSelect;
|
||||||
private DimAccessiblePlayerLoader playerLoader;
|
private TestPlayerLoader playerLoader;
|
||||||
private DimAccessiblePlayer player;
|
private TestPlayer player;
|
||||||
private DatabaseContextFactory factory;
|
private DatabaseContextFactory factory;
|
||||||
private BeatmapManager manager;
|
private BeatmapManager manager;
|
||||||
private RulesetStore rulesets;
|
private RulesetStore rulesets;
|
||||||
|
|
||||||
private ScreenStackCacheContainer screenStackContainer;
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(GameHost host)
|
private void load(GameHost host)
|
||||||
{
|
{
|
||||||
@ -74,30 +71,28 @@ namespace osu.Game.Tests.Visual
|
|||||||
Dependencies.Cache(manager = new BeatmapManager(LocalStorage, factory, rulesets, null, null, host, Beatmap.Default));
|
Dependencies.Cache(manager = new BeatmapManager(LocalStorage, factory, rulesets, null, null, host, Beatmap.Default));
|
||||||
Dependencies.Cache(new OsuConfigManager(LocalStorage));
|
Dependencies.Cache(new OsuConfigManager(LocalStorage));
|
||||||
|
|
||||||
|
manager.Import(TestResources.GetTestBeatmapForImport());
|
||||||
|
|
||||||
Beatmap.SetDefault();
|
Beatmap.SetDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
[SetUp]
|
[SetUp]
|
||||||
public virtual void SetUp()
|
public virtual void SetUp() => Schedule(() =>
|
||||||
{
|
{
|
||||||
Schedule(() =>
|
Child = new OsuScreenStack(songSelect = new DummySongSelect())
|
||||||
{
|
{
|
||||||
manager.Delete(manager.GetAllUsableBeatmapSets());
|
RelativeSizeAxes = Axes.Both
|
||||||
var temp = TestResources.GetTestBeatmapForImport();
|
};
|
||||||
manager.Import(temp);
|
|
||||||
Child = screenStackContainer = new ScreenStackCacheContainer { RelativeSizeAxes = Axes.Both };
|
|
||||||
screenStackContainer.ScreenStack.Push(songSelect = new DummySongSelect());
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Check if <see cref="PlayerLoader"/> properly triggers background dim previews when a user hovers over the visual settings panel.
|
/// Check if <see cref="PlayerLoader"/> properly triggers the visual settings preview when a user hovers over the visual settings panel.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Test]
|
[Test]
|
||||||
public void PlayerLoaderSettingsHoverTest()
|
public void PlayerLoaderSettingsHoverTest()
|
||||||
{
|
{
|
||||||
setupUserSettings();
|
setupUserSettings();
|
||||||
AddStep("Start player loader", () => songSelect.Push(playerLoader = new DimAccessiblePlayerLoader(player = new DimAccessiblePlayer())));
|
AddStep("Start player loader", () => songSelect.Push(playerLoader = new TestPlayerLoader(player = new TestPlayer())));
|
||||||
AddUntilStep("Wait for Player Loader to load", () => playerLoader?.IsLoaded ?? false);
|
AddUntilStep("Wait for Player Loader to load", () => playerLoader?.IsLoaded ?? false);
|
||||||
AddAssert("Background retained from song select", () => songSelect.IsBackgroundCurrent());
|
AddAssert("Background retained from song select", () => songSelect.IsBackgroundCurrent());
|
||||||
AddStep("Trigger background preview", () =>
|
AddStep("Trigger background preview", () =>
|
||||||
@ -106,16 +101,16 @@ namespace osu.Game.Tests.Visual
|
|||||||
InputManager.MoveMouseTo(playerLoader.VisualSettingsPos);
|
InputManager.MoveMouseTo(playerLoader.VisualSettingsPos);
|
||||||
});
|
});
|
||||||
waitForDim();
|
waitForDim();
|
||||||
AddAssert("Screen is dimmed", () => songSelect.IsBackgroundDimmed());
|
AddAssert("Screen is dimmed and blur applied", () => songSelect.IsBackgroundDimmed() && songSelect.IsUserBlurApplied());
|
||||||
AddStep("Stop background preview", () => InputManager.MoveMouseTo(playerLoader.ScreenPos));
|
AddStep("Stop background preview", () => InputManager.MoveMouseTo(playerLoader.ScreenPos));
|
||||||
waitForDim();
|
waitForDim();
|
||||||
AddAssert("Screen is undimmed", () => songSelect.IsBackgroundUndimmed());
|
AddAssert("Screen is undimmed and user blur removed", () => songSelect.IsBackgroundUndimmed() && playerLoader.IsBlurCorrect());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// In the case of a user triggering the dim preview the instant player gets loaded, then moving the cursor off of the visual settings:
|
/// In the case of a user triggering the dim preview the instant player gets loaded, then moving the cursor off of the visual settings:
|
||||||
/// The OnHover of PlayerLoader will trigger, which could potentially trigger an undim unless checked for in PlayerLoader.
|
/// The OnHover of PlayerLoader will trigger, which could potentially cause visual settings to be unapplied unless checked for in PlayerLoader.
|
||||||
/// We need to check that in this scenario, the dim is still properly applied after entering player.
|
/// We need to check that in this scenario, the dim and blur is still properly applied after entering player.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Test]
|
[Test]
|
||||||
public void PlayerLoaderTransitionTest()
|
public void PlayerLoaderTransitionTest()
|
||||||
@ -124,7 +119,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
AddStep("Trigger hover event", () => playerLoader.TriggerOnHover());
|
AddStep("Trigger hover event", () => playerLoader.TriggerOnHover());
|
||||||
AddAssert("Background retained from song select", () => songSelect.IsBackgroundCurrent());
|
AddAssert("Background retained from song select", () => songSelect.IsBackgroundCurrent());
|
||||||
waitForDim();
|
waitForDim();
|
||||||
AddAssert("Screen is dimmed and unblurred", () => songSelect.IsBackgroundDimmed() && songSelect.IsBackgroundUnblurred());
|
AddAssert("Screen is dimmed and blur applied", () => songSelect.IsBackgroundDimmed() && songSelect.IsUserBlurApplied());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -165,51 +160,54 @@ namespace osu.Game.Tests.Visual
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Check if the <see cref="UserDimContainer"/> is properly accepting user dim changes at all.
|
/// Check if the <see cref="UserDimContainer"/> is properly accepting user-defined visual changes at all.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Test]
|
[Test]
|
||||||
public void DisableUserDimTest()
|
public void DisableUserDimTest()
|
||||||
{
|
{
|
||||||
performFullSetup();
|
performFullSetup();
|
||||||
waitForDim();
|
waitForDim();
|
||||||
AddAssert("Screen is dimmed", () => songSelect.IsBackgroundDimmed());
|
AddAssert("Screen is dimmed and blur applied", () => songSelect.IsBackgroundDimmed() && songSelect.IsUserBlurApplied());
|
||||||
AddStep("EnableUserDim disabled", () => songSelect.DimEnabled.Value = false);
|
AddStep("EnableUserDim disabled", () => songSelect.DimEnabled.Value = false);
|
||||||
waitForDim();
|
waitForDim();
|
||||||
AddAssert("Screen is undimmed", () => songSelect.IsBackgroundUndimmed());
|
AddAssert("Screen is undimmed and user blur removed", () => songSelect.IsBackgroundUndimmed() && songSelect.IsUserBlurDisabled());
|
||||||
AddStep("EnableUserDim enabled", () => songSelect.DimEnabled.Value = true);
|
AddStep("EnableUserDim enabled", () => songSelect.DimEnabled.Value = true);
|
||||||
waitForDim();
|
waitForDim();
|
||||||
AddAssert("Screen is dimmed", () => songSelect.IsBackgroundDimmed());
|
AddAssert("Screen is dimmed and blur applied", () => songSelect.IsBackgroundDimmed() && songSelect.IsUserBlurApplied());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Check if the fade container retains dim when pausing
|
/// Check if the visual settings container retains dim and blur when pausing
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Test]
|
[Test]
|
||||||
public void PauseTest()
|
public void PauseTest()
|
||||||
{
|
{
|
||||||
performFullSetup(true);
|
performFullSetup(true);
|
||||||
AddStep("Pause", () => player.CurrentPausableGameplayContainer.Pause());
|
AddStep("Pause", () => player.Pause());
|
||||||
waitForDim();
|
waitForDim();
|
||||||
AddAssert("Screen is dimmed", () => songSelect.IsBackgroundDimmed());
|
AddAssert("Screen is dimmed and blur applied", () => songSelect.IsBackgroundDimmed() && songSelect.IsUserBlurApplied());
|
||||||
AddStep("Unpause", () => player.CurrentPausableGameplayContainer.Resume());
|
AddStep("Unpause", () => player.Resume());
|
||||||
waitForDim();
|
waitForDim();
|
||||||
AddAssert("Screen is dimmed", () => songSelect.IsBackgroundDimmed());
|
AddAssert("Screen is dimmed and blur applied", () => songSelect.IsBackgroundDimmed() && songSelect.IsUserBlurApplied());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Check if the fade container removes user dim when suspending <see cref="Player"/> for <see cref="SoloResults"/>
|
/// Check if the visual settings container removes user dim when suspending <see cref="Player"/> for <see cref="SoloResults"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Test]
|
[Test]
|
||||||
public void TransitionTest()
|
public void TransitionTest()
|
||||||
{
|
{
|
||||||
performFullSetup();
|
performFullSetup();
|
||||||
AddStep("Transition to Results", () => player.Push(new FadeAccessibleResults(new ScoreInfo { User = new User { Username = "osu!" } })));
|
var results = new FadeAccessibleResults(new ScoreInfo { User = new User { Username = "osu!" } });
|
||||||
|
AddStep("Transition to Results", () => player.Push(results));
|
||||||
|
AddUntilStep("Wait for results is current", results.IsCurrentScreen);
|
||||||
waitForDim();
|
waitForDim();
|
||||||
AddAssert("Screen is undimmed and is original background", () => songSelect.IsBackgroundUndimmed() && songSelect.IsBackgroundCurrent());
|
AddAssert("Screen is undimmed, original background retained", () =>
|
||||||
|
songSelect.IsBackgroundUndimmed() && songSelect.IsBackgroundCurrent() && results.IsBlurCorrect());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Check if background gets undimmed when leaving <see cref="Player"/> for <see cref="PlaySongSelect"/>
|
/// Check if background gets undimmed and unblurred when leaving <see cref="Player"/> for <see cref="PlaySongSelect"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Test]
|
[Test]
|
||||||
public void TransitionOutTest()
|
public void TransitionOutTest()
|
||||||
@ -217,7 +215,23 @@ namespace osu.Game.Tests.Visual
|
|||||||
performFullSetup();
|
performFullSetup();
|
||||||
AddStep("Exit to song select", () => player.Exit());
|
AddStep("Exit to song select", () => player.Exit());
|
||||||
waitForDim();
|
waitForDim();
|
||||||
AddAssert("Screen is undimmed", () => songSelect.IsBackgroundUndimmed());
|
AddAssert("Screen is undimmed and user blur removed", () => songSelect.IsBackgroundUndimmed() && songSelect.IsBlurCorrect());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Check if hovering on the visual settings dialogue after resuming from player still previews the background dim.
|
||||||
|
/// </summary>
|
||||||
|
[Test]
|
||||||
|
public void ResumeFromPlayerTest()
|
||||||
|
{
|
||||||
|
performFullSetup();
|
||||||
|
AddStep("Move mouse to Visual Settings", () => InputManager.MoveMouseTo(playerLoader.VisualSettingsPos));
|
||||||
|
AddStep("Resume PlayerLoader", () => player.Restart());
|
||||||
|
waitForDim();
|
||||||
|
AddAssert("Screen is dimmed and blur applied", () => songSelect.IsBackgroundDimmed() && songSelect.IsUserBlurApplied());
|
||||||
|
AddStep("Move mouse to center of screen", () => InputManager.MoveMouseTo(playerLoader.ScreenPos));
|
||||||
|
waitForDim();
|
||||||
|
AddAssert("Screen is undimmed and user blur removed", () => songSelect.IsBackgroundUndimmed() && playerLoader.IsBlurCorrect());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void waitForDim() => AddWaitStep("Wait for dim", 5);
|
private void waitForDim() => AddWaitStep("Wait for dim", 5);
|
||||||
@ -243,7 +257,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
AddStep("Start player loader", () =>
|
AddStep("Start player loader", () =>
|
||||||
{
|
{
|
||||||
songSelect.Push(playerLoader = new DimAccessiblePlayerLoader(player = new DimAccessiblePlayer
|
songSelect.Push(playerLoader = new TestPlayerLoader(player = new TestPlayer
|
||||||
{
|
{
|
||||||
AllowPause = allowPause,
|
AllowPause = allowPause,
|
||||||
Ready = true,
|
Ready = true,
|
||||||
@ -261,7 +275,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
{
|
{
|
||||||
Beatmap.Value.Mods.Value = Beatmap.Value.Mods.Value.Concat(new[] { new OsuModNoFail() });
|
Beatmap.Value.Mods.Value = Beatmap.Value.Mods.Value.Concat(new[] { new OsuModNoFail() });
|
||||||
songSelect.DimLevel.Value = 0.7f;
|
songSelect.DimLevel.Value = 0.7f;
|
||||||
songSelect.BlurLevel.Value = 0.0f;
|
songSelect.BlurLevel.Value = 0.4f;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -289,14 +303,18 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
public bool IsBackgroundDimmed() => ((FadeAccessibleBackground)Background).CurrentColour == OsuColour.Gray(1 - (float)DimLevel.Value);
|
public bool IsBackgroundDimmed() => ((FadeAccessibleBackground)Background).CurrentColour == OsuColour.Gray(1 - (float)DimLevel.Value);
|
||||||
|
|
||||||
public bool IsBackgroundUnblurred() => ((FadeAccessibleBackground)Background).CurrentBlur == new Vector2(0);
|
|
||||||
|
|
||||||
public bool IsBackgroundUndimmed() => ((FadeAccessibleBackground)Background).CurrentColour == Color4.White;
|
public bool IsBackgroundUndimmed() => ((FadeAccessibleBackground)Background).CurrentColour == Color4.White;
|
||||||
|
|
||||||
|
public bool IsUserBlurApplied() => ((FadeAccessibleBackground)Background).CurrentBlur == new Vector2((float)BlurLevel.Value * 25);
|
||||||
|
|
||||||
|
public bool IsUserBlurDisabled() => ((FadeAccessibleBackground)Background).CurrentBlur == new Vector2(0);
|
||||||
|
|
||||||
public bool IsBackgroundInvisible() => ((FadeAccessibleBackground)Background).CurrentAlpha == 0;
|
public bool IsBackgroundInvisible() => ((FadeAccessibleBackground)Background).CurrentAlpha == 0;
|
||||||
|
|
||||||
public bool IsBackgroundVisible() => ((FadeAccessibleBackground)Background).CurrentAlpha == 1;
|
public bool IsBackgroundVisible() => ((FadeAccessibleBackground)Background).CurrentAlpha == 1;
|
||||||
|
|
||||||
|
public bool IsBlurCorrect() => ((FadeAccessibleBackground)Background).CurrentBlur == new Vector2(BACKGROUND_BLUR);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make sure every time a screen gets pushed, the background doesn't get replaced
|
/// Make sure every time a screen gets pushed, the background doesn't get replaced
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -312,9 +330,11 @@ namespace osu.Game.Tests.Visual
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override BackgroundScreen CreateBackground() => new FadeAccessibleBackground(Beatmap.Value);
|
protected override BackgroundScreen CreateBackground() => new FadeAccessibleBackground(Beatmap.Value);
|
||||||
|
|
||||||
|
public bool IsBlurCorrect() => ((FadeAccessibleBackground)Background).CurrentBlur == new Vector2(BACKGROUND_BLUR);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class DimAccessiblePlayer : Player
|
private class TestPlayer : Player
|
||||||
{
|
{
|
||||||
protected override BackgroundScreen CreateBackground() => new FadeAccessibleBackground(Beatmap.Value);
|
protected override BackgroundScreen CreateBackground() => new FadeAccessibleBackground(Beatmap.Value);
|
||||||
|
|
||||||
@ -328,8 +348,6 @@ namespace osu.Game.Tests.Visual
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public PausableGameplayContainer CurrentPausableGameplayContainer => PausableGameplayContainer;
|
|
||||||
|
|
||||||
public UserDimContainer CurrentStoryboardContainer => StoryboardContainer;
|
public UserDimContainer CurrentStoryboardContainer => StoryboardContainer;
|
||||||
|
|
||||||
// Whether or not the player should be allowed to load.
|
// Whether or not the player should be allowed to load.
|
||||||
@ -354,32 +372,20 @@ namespace osu.Game.Tests.Visual
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ScreenStackCacheContainer : Container
|
private class TestPlayerLoader : PlayerLoader
|
||||||
{
|
|
||||||
[Cached]
|
|
||||||
private BackgroundScreenStack backgroundScreenStack;
|
|
||||||
|
|
||||||
public readonly ScreenStack ScreenStack;
|
|
||||||
|
|
||||||
public ScreenStackCacheContainer()
|
|
||||||
{
|
|
||||||
Add(backgroundScreenStack = new BackgroundScreenStack { RelativeSizeAxes = Axes.Both });
|
|
||||||
Add(ScreenStack = new ScreenStack { RelativeSizeAxes = Axes.Both });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class DimAccessiblePlayerLoader : PlayerLoader
|
|
||||||
{
|
{
|
||||||
public VisualSettings VisualSettingsPos => VisualSettings;
|
public VisualSettings VisualSettingsPos => VisualSettings;
|
||||||
public BackgroundScreen ScreenPos => Background;
|
public BackgroundScreen ScreenPos => Background;
|
||||||
|
|
||||||
public DimAccessiblePlayerLoader(Player player)
|
public TestPlayerLoader(Player player)
|
||||||
: base(() => player)
|
: base(() => player)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TriggerOnHover() => OnHover(new HoverEvent(new InputState()));
|
public void TriggerOnHover() => OnHover(new HoverEvent(new InputState()));
|
||||||
|
|
||||||
|
public bool IsBlurCorrect() => ((FadeAccessibleBackground)Background).CurrentBlur == new Vector2(BACKGROUND_BLUR);
|
||||||
|
|
||||||
protected override BackgroundScreen CreateBackground() => new FadeAccessibleBackground(Beatmap.Value);
|
protected override BackgroundScreen CreateBackground() => new FadeAccessibleBackground(Beatmap.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -388,6 +394,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
protected override UserDimContainer CreateFadeContainer() => fadeContainer = new TestUserDimContainer { RelativeSizeAxes = Axes.Both };
|
protected override UserDimContainer CreateFadeContainer() => fadeContainer = new TestUserDimContainer { RelativeSizeAxes = Axes.Both };
|
||||||
|
|
||||||
public Color4 CurrentColour => fadeContainer.CurrentColour;
|
public Color4 CurrentColour => fadeContainer.CurrentColour;
|
||||||
|
|
||||||
public float CurrentAlpha => fadeContainer.CurrentAlpha;
|
public float CurrentAlpha => fadeContainer.CurrentAlpha;
|
||||||
|
|
||||||
public Vector2 CurrentBlur => Background.BlurSigma;
|
public Vector2 CurrentBlur => Background.BlurSigma;
|
@ -9,7 +9,7 @@ using osu.Game.Input;
|
|||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Components
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseIdleTracker : ManualInputManagerTestCase
|
public class TestCaseIdleTracker : ManualInputManagerTestCase
|
@ -13,7 +13,7 @@ using osu.Game.Online;
|
|||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Components
|
||||||
{
|
{
|
||||||
public class TestCasePollingComponent : OsuTestCase
|
public class TestCasePollingComponent : OsuTestCase
|
||||||
{
|
{
|
@ -8,7 +8,7 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Game.Audio;
|
using osu.Game.Audio;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Components
|
||||||
{
|
{
|
||||||
public class TestCasePreviewTrackManager : OsuTestCase, IPreviewTrackOwner
|
public class TestCasePreviewTrackManager : OsuTestCase, IPreviewTrackOwner
|
||||||
{
|
{
|
@ -9,7 +9,7 @@ using osu.Game.Screens.Edit;
|
|||||||
using osu.Game.Screens.Edit.Compose.Components;
|
using osu.Game.Screens.Edit.Compose.Components;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Editor
|
||||||
{
|
{
|
||||||
public class TestCaseBeatDivisorControl : OsuTestCase
|
public class TestCaseBeatDivisorControl : OsuTestCase
|
||||||
{
|
{
|
@ -9,7 +9,7 @@ using osu.Game.Rulesets.Osu;
|
|||||||
using osu.Game.Screens.Edit.Compose;
|
using osu.Game.Screens.Edit.Compose;
|
||||||
using osu.Game.Tests.Beatmaps;
|
using osu.Game.Tests.Beatmaps;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Editor
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseEditorCompose : EditorClockTestCase
|
public class TestCaseEditorCompose : EditorClockTestCase
|
@ -7,7 +7,7 @@ using NUnit.Framework;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Screens.Edit.Components.RadioButtons;
|
using osu.Game.Screens.Edit.Components.RadioButtons;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Editor
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseEditorComposeRadioButtons : OsuTestCase
|
public class TestCaseEditorComposeRadioButtons : OsuTestCase
|
@ -6,7 +6,6 @@ using System.Collections.Generic;
|
|||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osuTK;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
@ -14,9 +13,10 @@ using osu.Framework.Graphics.UserInterface;
|
|||||||
using osu.Framework.Timing;
|
using osu.Framework.Timing;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Screens.Edit.Compose.Components.Timeline;
|
using osu.Game.Screens.Edit.Compose.Components.Timeline;
|
||||||
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Editor
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseEditorComposeTimeline : EditorClockTestCase
|
public class TestCaseEditorComposeTimeline : EditorClockTestCase
|
@ -10,7 +10,7 @@ using osu.Framework.Graphics.UserInterface;
|
|||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Screens.Edit.Components.Menus;
|
using osu.Game.Screens.Edit.Components.Menus;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Editor
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseEditorMenuBar : OsuTestCase
|
public class TestCaseEditorMenuBar : OsuTestCase
|
@ -14,7 +14,7 @@ using osu.Game.Tests.Beatmaps;
|
|||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Editor
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseEditorSeekSnapping : EditorClockTestCase
|
public class TestCaseEditorSeekSnapping : EditorClockTestCase
|
@ -6,12 +6,12 @@ using System.Collections.Generic;
|
|||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osuTK;
|
|
||||||
using osu.Game.Screens.Edit.Components.Timelines.Summary;
|
|
||||||
using osu.Game.Rulesets.Osu;
|
using osu.Game.Rulesets.Osu;
|
||||||
|
using osu.Game.Screens.Edit.Components.Timelines.Summary;
|
||||||
using osu.Game.Tests.Beatmaps;
|
using osu.Game.Tests.Beatmaps;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Editor
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseEditorSummaryTimeline : EditorClockTestCase
|
public class TestCaseEditorSummaryTimeline : EditorClockTestCase
|
@ -7,7 +7,6 @@ using JetBrains.Annotations;
|
|||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Timing;
|
using osu.Framework.Timing;
|
||||||
using osuTK;
|
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Rulesets.Edit;
|
using osu.Game.Rulesets.Edit;
|
||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
@ -20,8 +19,9 @@ using osu.Game.Rulesets.Osu.Objects;
|
|||||||
using osu.Game.Screens.Edit.Compose;
|
using osu.Game.Screens.Edit.Compose;
|
||||||
using osu.Game.Screens.Edit.Compose.Components;
|
using osu.Game.Screens.Edit.Compose.Components;
|
||||||
using osu.Game.Tests.Beatmaps;
|
using osu.Game.Tests.Beatmaps;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Editor
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
[Cached(Type = typeof(IPlacementHandler))]
|
[Cached(Type = typeof(IPlacementHandler))]
|
@ -10,7 +10,7 @@ using osu.Game.Screens.Edit.Components;
|
|||||||
using osu.Game.Tests.Beatmaps;
|
using osu.Game.Tests.Beatmaps;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Editor
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCasePlaybackControl : OsuTestCase
|
public class TestCasePlaybackControl : OsuTestCase
|
@ -12,7 +12,7 @@ using osu.Game.Graphics.Sprites;
|
|||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Editor
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseWaveContainer : OsuTestCase
|
public class TestCaseWaveContainer : OsuTestCase
|
@ -2,16 +2,16 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osuTK;
|
|
||||||
using osuTK.Graphics;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Audio;
|
using osu.Framework.Graphics.Audio;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
|
using osuTK;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Editor
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseWaveform : OsuTestCase
|
public class TestCaseWaveform : OsuTestCase
|
@ -14,7 +14,7 @@ using osu.Game.Screens.Edit.Compose.Components.Timeline;
|
|||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Editor
|
||||||
{
|
{
|
||||||
public class TestCaseZoomableScrollContainer : ManualInputManagerTestCase
|
public class TestCaseZoomableScrollContainer : ManualInputManagerTestCase
|
||||||
{
|
{
|
@ -7,7 +7,7 @@ using osu.Game.Rulesets;
|
|||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
{
|
{
|
||||||
[Description("Player instantiated with an autoplay mod.")]
|
[Description("Player instantiated with an autoplay mod.")]
|
||||||
public class TestCaseAutoplay : AllPlayersTestCase
|
public class TestCaseAutoplay : AllPlayersTestCase
|
@ -1,12 +1,12 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osu.Game.Beatmaps.Timing;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
using osu.Game.Beatmaps.Timing;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseBreakOverlay : OsuTestCase
|
public class TestCaseBreakOverlay : OsuTestCase
|
@ -5,38 +5,48 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osuTK.Input;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
|
using osu.Game.Input.Bindings;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
using osuTK.Input;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
{
|
{
|
||||||
[Description("player pause/fail screens")]
|
[Description("player pause/fail screens")]
|
||||||
public class TestCaseGameplayMenuOverlay : ManualInputManagerTestCase
|
public class TestCaseGameplayMenuOverlay : ManualInputManagerTestCase
|
||||||
{
|
{
|
||||||
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(FailOverlay), typeof(PausableGameplayContainer) };
|
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(FailOverlay), typeof(PauseOverlay) };
|
||||||
|
|
||||||
private FailOverlay failOverlay;
|
private FailOverlay failOverlay;
|
||||||
private PausableGameplayContainer.PauseOverlay pauseOverlay;
|
private PauseOverlay pauseOverlay;
|
||||||
|
|
||||||
|
private GlobalActionContainer globalActionContainer;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load(OsuGameBase game)
|
||||||
{
|
{
|
||||||
Add(pauseOverlay = new PausableGameplayContainer.PauseOverlay
|
Child = globalActionContainer = new GlobalActionContainer(game)
|
||||||
|
{
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
pauseOverlay = new PauseOverlay
|
||||||
{
|
{
|
||||||
OnResume = () => Logger.Log(@"Resume"),
|
OnResume = () => Logger.Log(@"Resume"),
|
||||||
OnRetry = () => Logger.Log(@"Retry"),
|
OnRetry = () => Logger.Log(@"Retry"),
|
||||||
OnQuit = () => Logger.Log(@"Quit"),
|
OnQuit = () => Logger.Log(@"Quit"),
|
||||||
});
|
},
|
||||||
|
failOverlay = new FailOverlay
|
||||||
|
|
||||||
Add(failOverlay = new FailOverlay
|
|
||||||
{
|
{
|
||||||
OnRetry = () => Logger.Log(@"Retry"),
|
OnRetry = () => Logger.Log(@"Retry"),
|
||||||
OnQuit = () => Logger.Log(@"Quit"),
|
OnQuit = () => Logger.Log(@"Quit"),
|
||||||
});
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
var retryCount = 0;
|
var retryCount = 0;
|
||||||
|
|
||||||
@ -79,12 +89,6 @@ namespace osu.Game.Tests.Visual
|
|||||||
AddAssert("Overlay state is reset", () => !failOverlay.Buttons.Any(b => b.Selected.Value));
|
AddAssert("Overlay state is reset", () => !failOverlay.Buttons.Any(b => b.Selected.Value));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void press(Key key)
|
|
||||||
{
|
|
||||||
InputManager.PressKey(key);
|
|
||||||
InputManager.ReleaseKey(key);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Tests that pressing enter after an overlay shows doesn't trigger an event because a selection hasn't occurred.
|
/// Tests that pressing enter after an overlay shows doesn't trigger an event because a selection hasn't occurred.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -92,7 +96,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
{
|
{
|
||||||
AddStep("Show overlay", () => pauseOverlay.Show());
|
AddStep("Show overlay", () => pauseOverlay.Show());
|
||||||
|
|
||||||
AddStep("Press enter", () => press(Key.Enter));
|
AddStep("Press select", () => press(GlobalAction.Select));
|
||||||
AddAssert("Overlay still open", () => pauseOverlay.State == Visibility.Visible);
|
AddAssert("Overlay still open", () => pauseOverlay.State == Visibility.Visible);
|
||||||
|
|
||||||
AddStep("Hide overlay", () => pauseOverlay.Hide());
|
AddStep("Hide overlay", () => pauseOverlay.Hide());
|
||||||
@ -270,5 +274,17 @@ namespace osu.Game.Tests.Visual
|
|||||||
});
|
});
|
||||||
AddAssert("Overlay is closed", () => pauseOverlay.State == Visibility.Hidden);
|
AddAssert("Overlay is closed", () => pauseOverlay.State == Visibility.Hidden);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void press(Key key)
|
||||||
|
{
|
||||||
|
InputManager.PressKey(key);
|
||||||
|
InputManager.ReleaseKey(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void press(GlobalAction action)
|
||||||
|
{
|
||||||
|
globalActionContainer.TriggerPressed(action);
|
||||||
|
globalActionContainer.TriggerReleased(action);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -10,7 +10,7 @@ using osu.Game.Screens.Play.HUD;
|
|||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Input;
|
using osuTK.Input;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
{
|
{
|
||||||
[Description("'Hold to Quit' UI element")]
|
[Description("'Hold to Quit' UI element")]
|
||||||
public class TestCaseHoldForMenuButton : ManualInputManagerTestCase
|
public class TestCaseHoldForMenuButton : ManualInputManagerTestCase
|
@ -11,7 +11,7 @@ using osu.Framework.Timing;
|
|||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
using osuTK.Input;
|
using osuTK.Input;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseKeyCounter : ManualInputManagerTestCase
|
public class TestCaseKeyCounter : ManualInputManagerTestCase
|
@ -8,7 +8,7 @@ using osu.Game.Overlays;
|
|||||||
using osu.Game.Overlays.MedalSplash;
|
using osu.Game.Overlays.MedalSplash;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseMedalOverlay : OsuTestCase
|
public class TestCaseMedalOverlay : OsuTestCase
|
152
osu.Game.Tests/Visual/Gameplay/TestCasePause.cs
Normal file
152
osu.Game.Tests/Visual/Gameplay/TestCasePause.cs
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Screens;
|
||||||
|
using osu.Game.Rulesets;
|
||||||
|
using osu.Game.Rulesets.Osu;
|
||||||
|
using osu.Game.Rulesets.Scoring;
|
||||||
|
using osu.Game.Screens.Play;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
|
{
|
||||||
|
public class TestCasePause : PlayerTestCase
|
||||||
|
{
|
||||||
|
protected new PausePlayer Player => (PausePlayer)base.Player;
|
||||||
|
|
||||||
|
public TestCasePause()
|
||||||
|
: base(new OsuRuleset())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestPauseResume()
|
||||||
|
{
|
||||||
|
pauseAndConfirm();
|
||||||
|
resumeAndConfirm();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestPauseTooSoon()
|
||||||
|
{
|
||||||
|
pauseAndConfirm();
|
||||||
|
resumeAndConfirm();
|
||||||
|
|
||||||
|
pause();
|
||||||
|
|
||||||
|
confirmClockRunning(true);
|
||||||
|
confirmPauseOverlayShown(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestExitTooSoon()
|
||||||
|
{
|
||||||
|
pauseAndConfirm();
|
||||||
|
|
||||||
|
resume();
|
||||||
|
|
||||||
|
AddStep("exit too soon", () => Player.Exit());
|
||||||
|
|
||||||
|
confirmClockRunning(true);
|
||||||
|
confirmPauseOverlayShown(false);
|
||||||
|
|
||||||
|
AddAssert("not exited", () => Player.IsCurrentScreen());
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestPauseAfterFail()
|
||||||
|
{
|
||||||
|
AddUntilStep("wait for fail", () => Player.HasFailed);
|
||||||
|
AddAssert("fail overlay shown", () => Player.FailOverlayVisible);
|
||||||
|
|
||||||
|
confirmClockRunning(false);
|
||||||
|
|
||||||
|
pause();
|
||||||
|
|
||||||
|
confirmClockRunning(false);
|
||||||
|
confirmPauseOverlayShown(false);
|
||||||
|
|
||||||
|
AddAssert("fail overlay still shown", () => Player.FailOverlayVisible);
|
||||||
|
|
||||||
|
exitAndConfirm();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestExitFromGameplay()
|
||||||
|
{
|
||||||
|
AddStep("exit", () => Player.Exit());
|
||||||
|
|
||||||
|
confirmPaused();
|
||||||
|
|
||||||
|
exitAndConfirm();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestExitFromPause()
|
||||||
|
{
|
||||||
|
pauseAndConfirm();
|
||||||
|
exitAndConfirm();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void pauseAndConfirm()
|
||||||
|
{
|
||||||
|
pause();
|
||||||
|
confirmPaused();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void resumeAndConfirm()
|
||||||
|
{
|
||||||
|
resume();
|
||||||
|
confirmResumed();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void exitAndConfirm()
|
||||||
|
{
|
||||||
|
AddUntilStep("player not exited", () => Player.IsCurrentScreen());
|
||||||
|
AddStep("exit", () => Player.Exit());
|
||||||
|
confirmExited();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void confirmPaused()
|
||||||
|
{
|
||||||
|
confirmClockRunning(false);
|
||||||
|
AddAssert("pause overlay shown", () => Player.PauseOverlayVisible);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void confirmResumed()
|
||||||
|
{
|
||||||
|
confirmClockRunning(true);
|
||||||
|
confirmPauseOverlayShown(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void confirmExited()
|
||||||
|
{
|
||||||
|
AddUntilStep("player exited", () => !Player.IsCurrentScreen());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void pause() => AddStep("pause", () => Player.Pause());
|
||||||
|
private void resume() => AddStep("resume", () => Player.Resume());
|
||||||
|
|
||||||
|
private void confirmPauseOverlayShown(bool isShown) =>
|
||||||
|
AddAssert("pause overlay " + (isShown ? "shown" : "hidden"), () => Player.PauseOverlayVisible == isShown);
|
||||||
|
|
||||||
|
private void confirmClockRunning(bool isRunning) =>
|
||||||
|
AddAssert("clock " + (isRunning ? "running" : "stopped"), () => Player.GameplayClockContainer.GameplayClock.IsRunning == isRunning);
|
||||||
|
|
||||||
|
protected override bool AllowFail => true;
|
||||||
|
|
||||||
|
protected override Player CreatePlayer(Ruleset ruleset) => new PausePlayer();
|
||||||
|
|
||||||
|
protected class PausePlayer : Player
|
||||||
|
{
|
||||||
|
public new GameplayClockContainer GameplayClockContainer => base.GameplayClockContainer;
|
||||||
|
|
||||||
|
public new ScoreProcessor ScoreProcessor => base.ScoreProcessor;
|
||||||
|
|
||||||
|
public bool FailOverlayVisible => FailOverlay.State == Visibility.Visible;
|
||||||
|
|
||||||
|
public bool PauseOverlayVisible => PauseOverlay.State == Visibility.Visible;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -9,20 +9,16 @@ using osu.Game.Beatmaps;
|
|||||||
using osu.Game.Screens;
|
using osu.Game.Screens;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
{
|
{
|
||||||
public class TestCasePlayerLoader : ManualInputManagerTestCase
|
public class TestCasePlayerLoader : ManualInputManagerTestCase
|
||||||
{
|
{
|
||||||
private PlayerLoader loader;
|
private PlayerLoader loader;
|
||||||
private readonly ScreenStack stack;
|
private readonly OsuScreenStack stack;
|
||||||
|
|
||||||
[Cached]
|
|
||||||
private BackgroundScreenStack backgroundStack;
|
|
||||||
|
|
||||||
public TestCasePlayerLoader()
|
public TestCasePlayerLoader()
|
||||||
{
|
{
|
||||||
InputManager.Add(backgroundStack = new BackgroundScreenStack { RelativeSizeAxes = Axes.Both });
|
InputManager.Add(stack = new OsuScreenStack { RelativeSizeAxes = Axes.Both });
|
||||||
InputManager.Add(stack = new ScreenStack { RelativeSizeAxes = Axes.Both });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
@ -8,7 +8,7 @@ using osu.Game.Beatmaps;
|
|||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
{
|
{
|
||||||
public class TestCasePlayerReferenceLeaking : AllPlayersTestCase
|
public class TestCasePlayerReferenceLeaking : AllPlayersTestCase
|
||||||
{
|
{
|
@ -8,7 +8,7 @@ using osu.Game.Rulesets.Scoring;
|
|||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
{
|
{
|
||||||
[Description("Player instantiated with a replay.")]
|
[Description("Player instantiated with a replay.")]
|
||||||
public class TestCaseReplay : AllPlayersTestCase
|
public class TestCaseReplay : AllPlayersTestCase
|
@ -7,7 +7,7 @@ using osu.Game.Graphics.UserInterface;
|
|||||||
using osu.Game.Screens.Play.HUD;
|
using osu.Game.Screens.Play.HUD;
|
||||||
using osu.Game.Screens.Play.PlayerSettings;
|
using osu.Game.Screens.Play.PlayerSettings;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseReplaySettingsOverlay : OsuTestCase
|
public class TestCaseReplaySettingsOverlay : OsuTestCase
|
@ -13,7 +13,7 @@ using osu.Game.Screens.Ranking;
|
|||||||
using osu.Game.Screens.Ranking.Pages;
|
using osu.Game.Screens.Ranking.Pages;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseResults : ScreenTestCase
|
public class TestCaseResults : ScreenTestCase
|
@ -9,7 +9,7 @@ using osu.Game.Graphics.UserInterface;
|
|||||||
using osu.Game.Screens.Play.HUD;
|
using osu.Game.Screens.Play.HUD;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseScoreCounter : OsuTestCase
|
public class TestCaseScoreCounter : OsuTestCase
|
@ -5,7 +5,6 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||||
using osuTK;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
@ -15,8 +14,9 @@ using osu.Game.Rulesets.Objects.Drawables;
|
|||||||
using osu.Game.Rulesets.Timing;
|
using osu.Game.Rulesets.Timing;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
using osu.Game.Rulesets.UI.Scrolling;
|
using osu.Game.Rulesets.UI.Scrolling;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseScrollingHitObjects : OsuTestCase
|
public class TestCaseScrollingHitObjects : OsuTestCase
|
@ -13,7 +13,7 @@ using osu.Game.Graphics;
|
|||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
{
|
{
|
||||||
public class TestCaseSkinReloadable : OsuTestCase
|
public class TestCaseSkinReloadable : OsuTestCase
|
||||||
{
|
{
|
@ -4,7 +4,7 @@
|
|||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseSkipOverlay : OsuTestCase
|
public class TestCaseSkipOverlay : OsuTestCase
|
@ -10,7 +10,7 @@ using osu.Framework.Timing;
|
|||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseSongProgress : OsuTestCase
|
public class TestCaseSongProgress : OsuTestCase
|
@ -13,7 +13,7 @@ using osu.Game.Overlays;
|
|||||||
using osu.Game.Storyboards.Drawables;
|
using osu.Game.Storyboards.Drawables;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Gameplay
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseStoryboard : OsuTestCase
|
public class TestCaseStoryboard : OsuTestCase
|
@ -6,7 +6,7 @@ using osu.Game.Online.API;
|
|||||||
using osu.Game.Screens.Menu;
|
using osu.Game.Screens.Menu;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Menus
|
||||||
{
|
{
|
||||||
public class TestCaseDisclaimer : ScreenTestCase
|
public class TestCaseDisclaimer : ScreenTestCase
|
||||||
{
|
{
|
||||||
@ -16,6 +16,8 @@ namespace osu.Game.Tests.Visual
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
|
Add(api);
|
||||||
|
|
||||||
AddStep("load disclaimer", () => LoadScreen(new Disclaimer()));
|
AddStep("load disclaimer", () => LoadScreen(new Disclaimer()));
|
||||||
|
|
||||||
AddStep("toggle support", () =>
|
AddStep("toggle support", () =>
|
@ -4,14 +4,14 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osuTK.Graphics;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Timing;
|
using osu.Framework.Timing;
|
||||||
using osu.Game.Screens.Menu;
|
using osu.Game.Screens.Menu;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Menus
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseIntroSequence : OsuTestCase
|
public class TestCaseIntroSequence : OsuTestCase
|
@ -9,7 +9,7 @@ using osu.Game.Screens;
|
|||||||
using osu.Game.Screens.Menu;
|
using osu.Game.Screens.Menu;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Menus
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseLoaderAnimation : OsuTestCase
|
public class TestCaseLoaderAnimation : OsuTestCase
|
@ -8,7 +8,7 @@ using NUnit.Framework;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Overlays.Toolbar;
|
using osu.Game.Overlays.Toolbar;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Menus
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseToolbar : OsuTestCase
|
public class TestCaseToolbar : OsuTestCase
|
@ -14,7 +14,7 @@ using osu.Game.Screens.Multi.Lounge.Components;
|
|||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Multiplayer
|
||||||
{
|
{
|
||||||
public class TestCaseLoungeRoomsContainer : MultiplayerTestCase
|
public class TestCaseLoungeRoomsContainer : MultiplayerTestCase
|
||||||
{
|
{
|
@ -10,7 +10,7 @@ using osu.Game.Rulesets.Osu;
|
|||||||
using osu.Game.Rulesets.Osu.Mods;
|
using osu.Game.Rulesets.Osu.Mods;
|
||||||
using osu.Game.Screens.Multi.Match.Components;
|
using osu.Game.Screens.Multi.Match.Components;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Multiplayer
|
||||||
{
|
{
|
||||||
public class TestCaseMatchHeader : MultiplayerTestCase
|
public class TestCaseMatchHeader : MultiplayerTestCase
|
||||||
{
|
{
|
@ -8,7 +8,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Game.Screens.Multi.Match.Components;
|
using osu.Game.Screens.Multi.Match.Components;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Multiplayer
|
||||||
{
|
{
|
||||||
public class TestCaseMatchHostInfo : OsuTestCase
|
public class TestCaseMatchHostInfo : OsuTestCase
|
||||||
{
|
{
|
@ -11,7 +11,7 @@ using osu.Game.Online.Multiplayer.RoomStatuses;
|
|||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Screens.Multi.Match.Components;
|
using osu.Game.Screens.Multi.Match.Components;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Multiplayer
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseMatchInfo : MultiplayerTestCase
|
public class TestCaseMatchInfo : MultiplayerTestCase
|
@ -10,7 +10,7 @@ using osu.Game.Screens.Multi.Match.Components;
|
|||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Multiplayer
|
||||||
{
|
{
|
||||||
public class TestCaseMatchLeaderboard : MultiplayerTestCase
|
public class TestCaseMatchLeaderboard : MultiplayerTestCase
|
||||||
{
|
{
|
@ -6,7 +6,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Game.Screens.Multi.Match.Components;
|
using osu.Game.Screens.Multi.Match.Components;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Multiplayer
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseMatchParticipants : MultiplayerTestCase
|
public class TestCaseMatchParticipants : MultiplayerTestCase
|
@ -16,7 +16,7 @@ using osu.Game.Screens.Multi.Ranking.Types;
|
|||||||
using osu.Game.Screens.Ranking;
|
using osu.Game.Screens.Ranking;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Multiplayer
|
||||||
{
|
{
|
||||||
public class TestCaseMatchResults : MultiplayerTestCase
|
public class TestCaseMatchResults : MultiplayerTestCase
|
||||||
{
|
{
|
@ -15,7 +15,7 @@ using osu.Game.Online.Multiplayer;
|
|||||||
using osu.Game.Screens.Multi;
|
using osu.Game.Screens.Multi;
|
||||||
using osu.Game.Screens.Multi.Match.Components;
|
using osu.Game.Screens.Multi.Match.Components;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Multiplayer
|
||||||
{
|
{
|
||||||
public class TestCaseMatchSettingsOverlay : MultiplayerTestCase
|
public class TestCaseMatchSettingsOverlay : MultiplayerTestCase
|
||||||
{
|
{
|
@ -7,7 +7,7 @@ using osu.Framework.Screens;
|
|||||||
using osu.Game.Screens;
|
using osu.Game.Screens;
|
||||||
using osu.Game.Screens.Multi;
|
using osu.Game.Screens.Multi;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Multiplayer
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseMultiHeader : OsuTestCase
|
public class TestCaseMultiHeader : OsuTestCase
|
||||||
@ -16,7 +16,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
{
|
{
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
|
||||||
ScreenStack screenStack = new ScreenStack(new TestMultiplayerSubScreen(index)) { RelativeSizeAxes = Axes.Both };
|
OsuScreenStack screenStack = new OsuScreenStack(new TestMultiplayerSubScreen(index)) { RelativeSizeAxes = Axes.Both };
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
@ -4,25 +4,24 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Game.Screens.Multi;
|
|
||||||
using osu.Game.Screens.Multi.Lounge;
|
using osu.Game.Screens.Multi.Lounge;
|
||||||
using osu.Game.Screens.Multi.Lounge.Components;
|
using osu.Game.Screens.Multi.Lounge.Components;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Multiplayer
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseMultiScreen : ScreenTestCase
|
public class TestCaseMultiScreen : ScreenTestCase
|
||||||
{
|
{
|
||||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||||
{
|
{
|
||||||
typeof(Multiplayer),
|
typeof(Screens.Multi.Multiplayer),
|
||||||
typeof(LoungeSubScreen),
|
typeof(LoungeSubScreen),
|
||||||
typeof(FilterControl)
|
typeof(FilterControl)
|
||||||
};
|
};
|
||||||
|
|
||||||
public TestCaseMultiScreen()
|
public TestCaseMultiScreen()
|
||||||
{
|
{
|
||||||
Multiplayer multi = new Multiplayer();
|
Screens.Multi.Multiplayer multi = new Screens.Multi.Multiplayer();
|
||||||
|
|
||||||
AddStep(@"show", () => LoadScreen(multi));
|
AddStep(@"show", () => LoadScreen(multi));
|
||||||
}
|
}
|
@ -9,7 +9,7 @@ using osu.Game.Online.Multiplayer;
|
|||||||
using osu.Game.Online.Multiplayer.RoomStatuses;
|
using osu.Game.Online.Multiplayer.RoomStatuses;
|
||||||
using osu.Game.Screens.Multi.Lounge.Components;
|
using osu.Game.Screens.Multi.Lounge.Components;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Multiplayer
|
||||||
{
|
{
|
||||||
public class TestCaseRoomStatus : OsuTestCase
|
public class TestCaseRoomStatus : OsuTestCase
|
||||||
{
|
{
|
@ -0,0 +1,56 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Game.Online.API;
|
||||||
|
using osu.Game.Overlays;
|
||||||
|
using osu.Game.Overlays.AccountCreation;
|
||||||
|
using osu.Game.Users;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual.Online
|
||||||
|
{
|
||||||
|
public class TestCaseAccountCreationOverlay : OsuTestCase
|
||||||
|
{
|
||||||
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||||
|
{
|
||||||
|
typeof(ErrorTextFlowContainer),
|
||||||
|
typeof(AccountCreationBackground),
|
||||||
|
typeof(ScreenEntry),
|
||||||
|
typeof(ScreenWarning),
|
||||||
|
typeof(ScreenWelcome),
|
||||||
|
typeof(AccountCreationScreen),
|
||||||
|
};
|
||||||
|
|
||||||
|
[Cached(typeof(IAPIProvider))]
|
||||||
|
private DummyAPIAccess api = new DummyAPIAccess();
|
||||||
|
|
||||||
|
public TestCaseAccountCreationOverlay()
|
||||||
|
{
|
||||||
|
Container userPanelArea;
|
||||||
|
AccountCreationOverlay accountCreation;
|
||||||
|
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
api,
|
||||||
|
accountCreation = new AccountCreationOverlay(),
|
||||||
|
userPanelArea = new Container
|
||||||
|
{
|
||||||
|
Padding = new MarginPadding(10),
|
||||||
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Anchor = Anchor.TopRight,
|
||||||
|
Origin = Anchor.TopRight,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
api.Logout();
|
||||||
|
api.LocalUser.BindValueChanged(user => { userPanelArea.Child = new UserPanel(user.NewValue) { Width = 200 }; }, true);
|
||||||
|
|
||||||
|
AddStep("show", () => accountCreation.State = Visibility.Visible);
|
||||||
|
AddStep("logout", () => api.Logout());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -9,7 +9,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Game.Overlays.Profile.Header;
|
using osu.Game.Overlays.Profile.Header;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseBadgeContainer : OsuTestCase
|
public class TestCaseBadgeContainer : OsuTestCase
|
@ -14,7 +14,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseBeatmapSetOverlay : OsuTestCase
|
public class TestCaseBeatmapSetOverlay : OsuTestCase
|
@ -15,7 +15,7 @@ using osu.Game.Overlays.Chat.Tabs;
|
|||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
public class TestCaseChannelTabControl : OsuTestCase
|
public class TestCaseChannelTabControl : OsuTestCase
|
||||||
{
|
{
|
@ -12,7 +12,7 @@ using osu.Game.Overlays;
|
|||||||
using osu.Game.Overlays.Chat;
|
using osu.Game.Overlays.Chat;
|
||||||
using osu.Game.Overlays.Chat.Tabs;
|
using osu.Game.Overlays.Chat.Tabs;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
[Description("Testing chat api and overlay")]
|
[Description("Testing chat api and overlay")]
|
||||||
public class TestCaseChatDisplay : OsuTestCase
|
public class TestCaseChatDisplay : OsuTestCase
|
@ -1,24 +1,24 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osuTK.Graphics;
|
|
||||||
using osu.Framework.Allocation;
|
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Game.Graphics;
|
|
||||||
using osu.Game.Online.Chat;
|
|
||||||
using osu.Game.Overlays.Chat;
|
|
||||||
using osu.Game.Users;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
|
using osu.Game.Online.Chat;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
|
using osu.Game.Overlays.Chat;
|
||||||
|
using osu.Game.Users;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseChatLink : OsuTestCase
|
public class TestCaseChatLink : OsuTestCase
|
@ -8,7 +8,7 @@ using osu.Game.Beatmaps;
|
|||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseDirect : OsuTestCase
|
public class TestCaseDirect : OsuTestCase
|
@ -11,7 +11,7 @@ using osu.Game.Rulesets.Osu;
|
|||||||
using osu.Game.Tests.Beatmaps;
|
using osu.Game.Tests.Beatmaps;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
public class TestCaseDirectPanel : OsuTestCase
|
public class TestCaseDirectPanel : OsuTestCase
|
||||||
{
|
{
|
@ -6,7 +6,7 @@ using System.Collections.Generic;
|
|||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
public class TestCaseExternalLinkButton : OsuTestCase
|
public class TestCaseExternalLinkButton : OsuTestCase
|
||||||
{
|
{
|
@ -7,7 +7,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseGraph : OsuTestCase
|
public class TestCaseGraph : OsuTestCase
|
@ -12,7 +12,7 @@ using osu.Game.Overlays.Profile.Sections;
|
|||||||
using osu.Game.Overlays.Profile.Sections.Historical;
|
using osu.Game.Overlays.Profile.Sections.Historical;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseHistoricalSection : OsuTestCase
|
public class TestCaseHistoricalSection : OsuTestCase
|
@ -1,19 +1,19 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using NUnit.Framework;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osuTK;
|
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Overlays.Profile.Header;
|
using osu.Game.Overlays.Profile.Header;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseRankGraph : OsuTestCase
|
public class TestCaseRankGraph : OsuTestCase
|
@ -8,7 +8,7 @@ using osu.Game.Overlays;
|
|||||||
using osu.Game.Overlays.Social;
|
using osu.Game.Overlays.Social;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseSocial : OsuTestCase
|
public class TestCaseSocial : OsuTestCase
|
@ -7,7 +7,7 @@ using osu.Game.Online.Chat;
|
|||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
public class TestCaseStandAloneChatDisplay : OsuTestCase
|
public class TestCaseStandAloneChatDisplay : OsuTestCase
|
||||||
{
|
{
|
@ -7,7 +7,7 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseUserPanel : OsuTestCase
|
public class TestCaseUserPanel : OsuTestCase
|
@ -13,7 +13,7 @@ using osu.Game.Overlays.Profile;
|
|||||||
using osu.Game.Overlays.Profile.Header;
|
using osu.Game.Overlays.Profile.Header;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseUserProfile : OsuTestCase
|
public class TestCaseUserProfile : OsuTestCase
|
@ -1,20 +1,20 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Online.API.Requests;
|
using osu.Game.Online.API.Requests;
|
||||||
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Overlays.Profile.Sections;
|
using osu.Game.Overlays.Profile.Sections;
|
||||||
using osu.Game.Overlays.Profile.Sections.Recent;
|
using osu.Game.Overlays.Profile.Sections.Recent;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseUserProfileRecentSection : OsuTestCase
|
public class TestCaseUserProfileRecentSection : OsuTestCase
|
@ -1,6 +1,9 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using NUnit.Framework;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
@ -8,11 +11,8 @@ using osu.Game.Graphics;
|
|||||||
using osu.Game.Overlays.Profile.Sections;
|
using osu.Game.Overlays.Profile.Sections;
|
||||||
using osu.Game.Overlays.Profile.Sections.Ranks;
|
using osu.Game.Overlays.Profile.Sections.Ranks;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using NUnit.Framework;
|
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Online
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseUserRanks : OsuTestCase
|
public class TestCaseUserRanks : OsuTestCase
|
@ -4,7 +4,7 @@
|
|||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Settings
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseKeyConfiguration : OsuTestCase
|
public class TestCaseKeyConfiguration : OsuTestCase
|
@ -6,7 +6,7 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Settings
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseSettings : OsuTestCase
|
public class TestCaseSettings : OsuTestCase
|
@ -17,7 +17,7 @@ using osu.Game.Screens.Select;
|
|||||||
using osu.Game.Screens.Select.Carousel;
|
using osu.Game.Screens.Select.Carousel;
|
||||||
using osu.Game.Screens.Select.Filter;
|
using osu.Game.Screens.Select.Filter;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.SongSelect
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseBeatmapCarousel : OsuTestCase
|
public class TestCaseBeatmapCarousel : OsuTestCase
|
@ -10,7 +10,7 @@ using osu.Game.Beatmaps;
|
|||||||
using osu.Game.Screens.Select;
|
using osu.Game.Screens.Select;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.SongSelect
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
[System.ComponentModel.Description("PlaySongSelect leaderboard/details area")]
|
[System.ComponentModel.Description("PlaySongSelect leaderboard/details area")]
|
@ -7,7 +7,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Screens.Select;
|
using osu.Game.Screens.Select;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.SongSelect
|
||||||
{
|
{
|
||||||
[Description("PlaySongSelect beatmap details")]
|
[Description("PlaySongSelect beatmap details")]
|
||||||
public class TestCaseBeatmapDetails : OsuTestCase
|
public class TestCaseBeatmapDetails : OsuTestCase
|
@ -5,7 +5,6 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osuTK;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
@ -20,8 +19,9 @@ using osu.Game.Rulesets.Osu;
|
|||||||
using osu.Game.Rulesets.Taiko;
|
using osu.Game.Rulesets.Taiko;
|
||||||
using osu.Game.Screens.Select;
|
using osu.Game.Screens.Select;
|
||||||
using osu.Game.Tests.Beatmaps;
|
using osu.Game.Tests.Beatmaps;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.SongSelect
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseBeatmapInfoWedge : OsuTestCase
|
public class TestCaseBeatmapInfoWedge : OsuTestCase
|
@ -7,7 +7,7 @@ using osu.Game.Screens.Select.Options;
|
|||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
using osuTK.Input;
|
using osuTK.Input;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.SongSelect
|
||||||
{
|
{
|
||||||
[Description("bottom beatmap details")]
|
[Description("bottom beatmap details")]
|
||||||
public class TestCaseBeatmapOptionsOverlay : OsuTestCase
|
public class TestCaseBeatmapOptionsOverlay : OsuTestCase
|
@ -1,23 +1,25 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.MathUtils;
|
using osu.Framework.MathUtils;
|
||||||
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Overlays.BeatmapSet.Scores;
|
using osu.Game.Overlays.BeatmapSet.Scores;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
|
using osu.Game.Rulesets.Osu;
|
||||||
using osu.Game.Rulesets.Osu.Mods;
|
using osu.Game.Rulesets.Osu.Mods;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Users;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
|
||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
|
using osu.Game.Users;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.SongSelect
|
||||||
{
|
{
|
||||||
[Description("in BeatmapOverlay")]
|
[Description("in BeatmapOverlay")]
|
||||||
public class TestCaseBeatmapScoresContainer : OsuTestCase
|
public class TestCaseBeatmapScoresContainer : OsuTestCase
|
@ -4,18 +4,18 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Game.Screens.Select.Leaderboards;
|
|
||||||
using osu.Game.Users;
|
|
||||||
using osu.Framework.Allocation;
|
|
||||||
using osuTK;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Online.Leaderboards;
|
using osu.Game.Online.Leaderboards;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
|
using osu.Game.Screens.Select.Leaderboards;
|
||||||
|
using osu.Game.Users;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.SongSelect
|
||||||
{
|
{
|
||||||
[Description("PlaySongSelect leaderboard")]
|
[Description("PlaySongSelect leaderboard")]
|
||||||
public class TestCaseLeaderboard : OsuTestCase
|
public class TestCaseLeaderboard : OsuTestCase
|
@ -23,7 +23,7 @@ using osu.Game.Screens.Select;
|
|||||||
using osu.Game.Screens.Select.Carousel;
|
using osu.Game.Screens.Select.Carousel;
|
||||||
using osu.Game.Screens.Select.Filter;
|
using osu.Game.Screens.Select.Filter;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.SongSelect
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCasePlaySongSelect : ScreenTestCase
|
public class TestCasePlaySongSelect : ScreenTestCase
|
||||||
@ -41,7 +41,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||||
{
|
{
|
||||||
typeof(SongSelect),
|
typeof(Screens.Select.SongSelect),
|
||||||
typeof(BeatmapCarousel),
|
typeof(BeatmapCarousel),
|
||||||
|
|
||||||
typeof(CarouselItem),
|
typeof(CarouselItem),
|
@ -1,32 +0,0 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using osu.Framework.Graphics.Containers;
|
|
||||||
using osu.Game.Overlays;
|
|
||||||
using osu.Game.Overlays.AccountCreation;
|
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
|
||||||
{
|
|
||||||
public class TestCaseAccountCreationOverlay : OsuTestCase
|
|
||||||
{
|
|
||||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
|
||||||
{
|
|
||||||
typeof(ErrorTextFlowContainer),
|
|
||||||
typeof(AccountCreationBackground),
|
|
||||||
typeof(ScreenEntry),
|
|
||||||
typeof(ScreenWarning),
|
|
||||||
typeof(ScreenWelcome),
|
|
||||||
typeof(AccountCreationScreen),
|
|
||||||
};
|
|
||||||
|
|
||||||
public TestCaseAccountCreationOverlay()
|
|
||||||
{
|
|
||||||
var accountCreation = new AccountCreationOverlay();
|
|
||||||
Child = accountCreation;
|
|
||||||
|
|
||||||
accountCreation.State = Visibility.Visible;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
82
osu.Game.Tests/Visual/TestCaseOsuScreenStack.cs
Normal file
82
osu.Game.Tests/Visual/TestCaseOsuScreenStack.cs
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using NUnit.Framework;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Framework.Screens;
|
||||||
|
using osu.Framework.Testing;
|
||||||
|
using osu.Game.Screens;
|
||||||
|
using osu.Game.Screens.Play;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
|
namespace osu.Game.Tests.Visual
|
||||||
|
{
|
||||||
|
[TestFixture]
|
||||||
|
public class TestCaseOsuScreenStack : OsuTestCase
|
||||||
|
{
|
||||||
|
private TestOsuScreenStack stack;
|
||||||
|
|
||||||
|
[SetUpSteps]
|
||||||
|
public void SetUpSteps()
|
||||||
|
{
|
||||||
|
AddStep("Create new screen stack", () => { Child = stack = new TestOsuScreenStack { RelativeSizeAxes = Axes.Both }; });
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void ParallaxAssignmentTest()
|
||||||
|
{
|
||||||
|
NoParallaxTestScreen noParallaxScreen = null;
|
||||||
|
TestScreen parallaxScreen = null;
|
||||||
|
|
||||||
|
AddStep("Push no parallax", () => stack.Push(noParallaxScreen = new NoParallaxTestScreen("NO PARALLAX")));
|
||||||
|
AddUntilStep("Wait for current", () => noParallaxScreen.IsLoaded);
|
||||||
|
AddAssert("Parallax is off", () => stack.ParallaxAmount == 0);
|
||||||
|
|
||||||
|
AddStep("Push parallax", () => noParallaxScreen.Push(parallaxScreen = new TestScreen("PARALLAX")));
|
||||||
|
AddUntilStep("Wait for current", () => parallaxScreen.IsLoaded);
|
||||||
|
AddAssert("Parallax is on", () => stack.ParallaxAmount > 0);
|
||||||
|
|
||||||
|
AddStep("Exit from new screen", () => { noParallaxScreen.MakeCurrent(); });
|
||||||
|
AddAssert("Parallax is off", () => stack.ParallaxAmount == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
private class TestScreen : ScreenWithBeatmapBackground
|
||||||
|
{
|
||||||
|
private readonly string screenText;
|
||||||
|
|
||||||
|
public TestScreen(string screenText)
|
||||||
|
{
|
||||||
|
this.screenText = screenText;
|
||||||
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load()
|
||||||
|
{
|
||||||
|
AddInternal(new SpriteText
|
||||||
|
{
|
||||||
|
Text = screenText,
|
||||||
|
Colour = Color4.White,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private class NoParallaxTestScreen : TestScreen
|
||||||
|
{
|
||||||
|
public NoParallaxTestScreen(string screenText)
|
||||||
|
: base(screenText)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override float BackgroundParallaxAmount => 0.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
private class TestOsuScreenStack : OsuScreenStack
|
||||||
|
{
|
||||||
|
public new float ParallaxAmount => base.ParallaxAmount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -6,7 +6,7 @@ using System.ComponentModel;
|
|||||||
using osu.Game.Screens.Tournament;
|
using osu.Game.Screens.Tournament;
|
||||||
using osu.Game.Screens.Tournament.Teams;
|
using osu.Game.Screens.Tournament.Teams;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.Tournament
|
||||||
{
|
{
|
||||||
[Description("for tournament use")]
|
[Description("for tournament use")]
|
||||||
public class TestCaseDrawings : ScreenTestCase
|
public class TestCaseDrawings : ScreenTestCase
|
@ -8,16 +8,16 @@ using osu.Framework.Extensions.Color4Extensions;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
using osu.Framework.Lists;
|
||||||
using osu.Framework.Timing;
|
using osu.Framework.Timing;
|
||||||
using osu.Game.Beatmaps.ControlPoints;
|
using osu.Game.Beatmaps.ControlPoints;
|
||||||
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
using osu.Framework.Lists;
|
|
||||||
using osu.Game.Graphics;
|
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseBeatSyncedContainer : OsuTestCase
|
public class TestCaseBeatSyncedContainer : OsuTestCase
|
@ -7,7 +7,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseBreadcrumbs : OsuTestCase
|
public class TestCaseBreadcrumbs : OsuTestCase
|
@ -11,7 +11,7 @@ using osu.Framework.Graphics.Shapes;
|
|||||||
using osu.Game.Screens.Menu;
|
using osu.Game.Screens.Menu;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseButtonSystem : OsuTestCase
|
public class TestCaseButtonSystem : OsuTestCase
|
@ -7,12 +7,12 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Graphics.Cursor;
|
using osu.Framework.Graphics.Cursor;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
|
using osu.Game.Graphics.Cursor;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
using osu.Game.Graphics.Cursor;
|
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseContextMenu : OsuTestCase
|
public class TestCaseContextMenu : OsuTestCase
|
@ -14,7 +14,7 @@ using osu.Game.Graphics.Sprites;
|
|||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseCursors : ManualInputManagerTestCase
|
public class TestCaseCursors : ManualInputManagerTestCase
|
@ -6,7 +6,7 @@ using osu.Game.Graphics;
|
|||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Overlays.Dialog;
|
using osu.Game.Overlays.Dialog;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseDialogOverlay : OsuTestCase
|
public class TestCaseDialogOverlay : OsuTestCase
|
@ -9,7 +9,7 @@ using osu.Game.Graphics;
|
|||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
{
|
{
|
||||||
public class TestCaseDrawableDate : OsuTestCase
|
public class TestCaseDrawableDate : OsuTestCase
|
||||||
{
|
{
|
@ -8,7 +8,7 @@ using osu.Game.Graphics;
|
|||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Screens.Menu;
|
using osu.Game.Screens.Menu;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
{
|
{
|
||||||
public class TestCaseHoldToConfirmOverlay : OsuTestCase
|
public class TestCaseHoldToConfirmOverlay : OsuTestCase
|
||||||
{
|
{
|
@ -2,16 +2,16 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osuTK;
|
|
||||||
using osuTK.Graphics;
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osuTK;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseIconButton : OsuTestCase
|
public class TestCaseIconButton : OsuTestCase
|
@ -1,15 +1,15 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using osu.Game.Screens.Edit.Setup.Components.LabelledComponents;
|
using osu.Game.Screens.Edit.Setup.Components.LabelledComponents;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseLabelledTextBox : OsuTestCase
|
public class TestCaseLabelledTextBox : OsuTestCase
|
@ -7,7 +7,7 @@ using osu.Framework.Testing;
|
|||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
{
|
{
|
||||||
public class TestCaseLoadingAnimation : GridTestCase
|
public class TestCaseLoadingAnimation : GridTestCase
|
||||||
{
|
{
|
@ -2,26 +2,26 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Game.Graphics.Sprites;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Overlays.Mods;
|
using osu.Game.Overlays.Mods;
|
||||||
|
using osu.Game.Overlays.Mods.Sections;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Screens.Play.HUD;
|
using osu.Game.Rulesets.Mania.Mods;
|
||||||
using osuTK;
|
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Rulesets.Osu.Mods;
|
using osu.Game.Rulesets.Osu.Mods;
|
||||||
using System.Linq;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using NUnit.Framework;
|
|
||||||
using osu.Framework.Bindables;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Overlays.Mods.Sections;
|
|
||||||
using osu.Game.Rulesets.Mania.Mods;
|
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
|
using osu.Game.Screens.Play.HUD;
|
||||||
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
{
|
{
|
||||||
[Description("mod select and icon display")]
|
[Description("mod select and icon display")]
|
||||||
public class TestCaseMods : OsuTestCase
|
public class TestCaseMods : OsuTestCase
|
@ -7,7 +7,7 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Timing;
|
using osu.Framework.Timing;
|
||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseMusicController : OsuTestCase
|
public class TestCaseMusicController : OsuTestCase
|
@ -12,7 +12,7 @@ using osu.Framework.MathUtils;
|
|||||||
using osu.Game.Overlays;
|
using osu.Game.Overlays;
|
||||||
using osu.Game.Overlays.Notifications;
|
using osu.Game.Overlays.Notifications;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual.UserInterface
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestCaseNotificationOverlay : OsuTestCase
|
public class TestCaseNotificationOverlay : OsuTestCase
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user