1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-17 22:17:25 +08:00

Fix CI issues (pass #2)

This commit is contained in:
Dean Herbert 2017-07-08 18:17:47 +09:00
parent 3c425dd07f
commit bb8efcc12f
16 changed files with 43 additions and 47 deletions

View File

@ -13,7 +13,7 @@ namespace osu.Desktop.VisualTests.Tests
{
public override string Description => "BeatmapDetails tab of BeatmapDetailArea";
private BeatmapDetails details;
private readonly BeatmapDetails details;
public TestCaseBeatmapDetails()
{

View File

@ -21,10 +21,10 @@ namespace osu.Desktop.VisualTests.Tests
private const int start_time = 0;
private const int duration = 1000;
private MyContextMenuContainer container;
public TestCaseContextMenu()
{
MyContextMenuContainer container;
Add(container = new MyContextMenuContainer
{
Size = new Vector2(200),

View File

@ -12,10 +12,10 @@ namespace osu.Desktop.VisualTests.Tests
{
public override string Description => @"Display dialogs";
private DialogOverlay overlay;
public TestCaseDialogOverlay()
{
DialogOverlay overlay;
Add(overlay = new DialogOverlay());
AddStep("dialog #1", () => overlay.Push(new PopupDialog

View File

@ -13,10 +13,10 @@ namespace osu.Desktop.VisualTests.Tests
{
public override string Description => "graph";
private BarGraph graph;
public TestCaseGraph()
{
BarGraph graph;
Children = new[]
{
graph = new BarGraph

View File

@ -77,8 +77,8 @@ namespace osu.Desktop.VisualTests.Tests
private HitObjectType mode = HitObjectType.Slider;
private readonly BindableNumber<double> playbackSpeed = new BindableDouble(0.5) { MinValue = 0, MaxValue = 1 };
private Container playfieldContainer;
private Container approachContainer;
private readonly Container playfieldContainer;
private readonly Container approachContainer;
private void loadHitobjects(HitObjectType mode)
{

View File

@ -16,7 +16,7 @@ namespace osu.Desktop.VisualTests.Tests
{
public override string Description => @"From song select";
private Leaderboard leaderboard;
private readonly Leaderboard leaderboard;
private void newScores()
{

View File

@ -12,13 +12,12 @@ namespace osu.Desktop.VisualTests.Tests
{
public override string Description => @"Tests pause and fail overlays";
private PauseContainer.PauseOverlay pauseOverlay;
private FailOverlay failOverlay;
private int retryCount;
public TestCaseMenuOverlays()
{
retryCount = 0;
FailOverlay failOverlay;
PauseContainer.PauseOverlay pauseOverlay;
var retryCount = 0;
Add(pauseOverlay = new PauseContainer.PauseOverlay
{
@ -32,14 +31,16 @@ namespace osu.Desktop.VisualTests.Tests
OnQuit = () => Logger.Log(@"Quit"),
});
AddStep(@"Pause", delegate {
AddStep(@"Pause", delegate
{
if (failOverlay.State == Visibility.Visible)
{
failOverlay.Hide();
}
pauseOverlay.Show();
});
AddStep("Fail", delegate {
AddStep("Fail", delegate
{
if (pauseOverlay.State == Visibility.Visible)
{
pauseOverlay.Hide();

View File

@ -13,13 +13,11 @@ namespace osu.Desktop.VisualTests.Tests
{
public override string Description => @"Tests music controller ui.";
private MusicController mc;
public TestCaseMusicController()
{
Clock = new FramedClock();
mc = new MusicController
var mc = new MusicController
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre

View File

@ -16,7 +16,7 @@ namespace osu.Desktop.VisualTests.Tests
{
public override string Description => @"I handle notifications";
private NotificationManager manager;
private readonly NotificationManager manager;
public TestCaseNotificationManager()
{

View File

@ -13,19 +13,19 @@ namespace osu.Desktop.VisualTests.Tests
{
internal class TestCasePlaySongSelect : TestCase
{
private BeatmapDatabase db;
private TestStorage storage;
private PlaySongSelect songSelect;
private readonly BeatmapDatabase db;
public override string Description => @"with fake data";
private RulesetDatabase rulesets;
private readonly RulesetDatabase rulesets;
public TestCasePlaySongSelect()
{
PlaySongSelect songSelect;
if (db == null)
{
storage = new TestStorage(@"TestCasePlaySongSelect");
var storage = new TestStorage(@"TestCasePlaySongSelect");
var backingDatabase = storage.GetDatabase(@"client");

View File

@ -20,24 +20,20 @@ namespace osu.Desktop.VisualTests.Tests
internal class TestCasePlayer : TestCase
{
protected Player Player;
private BeatmapDatabase db;
private RulesetDatabase rulesets;
public override string Description => @"Showing everything to play the game.";
[BackgroundDependencyLoader]
private void load(BeatmapDatabase db, RulesetDatabase rulesets)
private void load(RulesetDatabase rulesets)
{
this.rulesets = rulesets;
this.db = db;
}
protected override void LoadComplete()
{
base.LoadComplete();
WorkingBeatmap beatmap = null;
var objects = new List<HitObject>();
int time = 1500;
@ -70,7 +66,7 @@ namespace osu.Desktop.VisualTests.Tests
}
};
beatmap = new TestWorkingBeatmap(b);
WorkingBeatmap beatmap = new TestWorkingBeatmap(b);
Add(new Box
{

View File

@ -13,11 +13,11 @@ namespace osu.Desktop.VisualTests.Tests
{
public override string Description => @"Settings visible in replay/auto";
private ExampleContainer container;
public TestCaseReplaySettingsOverlay()
{
Add(new ReplaySettingsOverlay()
ExampleContainer container;
Add(new ReplaySettingsOverlay
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,

View File

@ -21,15 +21,16 @@ namespace osu.Desktop.VisualTests.Tests
{
public override string Description => "SpeedAdjustmentContainer/DrawableTimingSection";
private SpeedAdjustmentCollection adjustmentCollection;
private BindableDouble timeRangeBindable;
private OsuSpriteText timeRangeText;
private OsuSpriteText bottomLabel;
private SpriteText topTime, bottomTime;
private readonly BindableDouble timeRangeBindable;
private readonly OsuSpriteText bottomLabel;
private readonly SpriteText topTime;
private readonly SpriteText bottomTime;
public TestCaseScrollingHitObjects()
{
OsuSpriteText timeRangeText;
SpeedAdjustmentCollection adjustmentCollection;
timeRangeBindable = new BindableDouble(2000)
{
MinValue = 200,

View File

@ -10,7 +10,7 @@ namespace osu.Desktop.VisualTests.Tests
{
public override string Description => @"Tests the settings overlay";
private SettingsOverlay settings;
private readonly SettingsOverlay settings;
public TestCaseSettings()
{

View File

@ -15,10 +15,10 @@ namespace osu.Desktop.VisualTests.Tests
{
public override string Description => @"With fake data";
private SongProgress progress;
private SongProgressGraph graph;
private readonly SongProgress progress;
private readonly SongProgressGraph graph;
private StopwatchClock clock;
private readonly StopwatchClock clock;
public TestCaseSongProgress()
{

View File

@ -26,8 +26,8 @@ namespace osu.Desktop.VisualTests.Tests
protected override double TimePerAction => default_duration * 2;
private readonly Random rng = new Random(1337);
private TaikoPlayfield playfield;
private Container playfieldContainer;
private readonly TaikoPlayfield playfield;
private readonly Container playfieldContainer;
public TestCaseTaikoPlayfield()
{