mirror of
https://github.com/ppy/osu.git
synced 2025-02-19 07:04:15 +08:00
Fix most remaining test issues
This commit is contained in:
parent
b7ee6d1866
commit
7dba3c3551
@ -50,6 +50,7 @@ namespace osu.Game.Tests.Visual.Background
|
|||||||
Dependencies.Cache(rulesets = new RulesetStore(ContextFactory));
|
Dependencies.Cache(rulesets = new RulesetStore(ContextFactory));
|
||||||
Dependencies.Cache(manager = new BeatmapManager(LocalStorage, ContextFactory, rulesets, null, audio, Resources, host, Beatmap.Default));
|
Dependencies.Cache(manager = new BeatmapManager(LocalStorage, ContextFactory, rulesets, null, audio, Resources, host, Beatmap.Default));
|
||||||
Dependencies.Cache(new OsuConfigManager(LocalStorage));
|
Dependencies.Cache(new OsuConfigManager(LocalStorage));
|
||||||
|
Dependencies.Cache(ContextFactory);
|
||||||
|
|
||||||
manager.Import(TestResources.GetQuickTestBeatmapForImport()).WaitSafely();
|
manager.Import(TestResources.GetQuickTestBeatmapForImport()).WaitSafely();
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
{
|
{
|
||||||
Dependencies.Cache(rulesets = new RulesetStore(ContextFactory));
|
Dependencies.Cache(rulesets = new RulesetStore(ContextFactory));
|
||||||
Dependencies.Cache(beatmaps = new BeatmapManager(LocalStorage, ContextFactory, rulesets, null, audio, Resources, host, Beatmap.Default));
|
Dependencies.Cache(beatmaps = new BeatmapManager(LocalStorage, ContextFactory, rulesets, null, audio, Resources, host, Beatmap.Default));
|
||||||
|
Dependencies.Cache(ContextFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void SetUpSteps()
|
public override void SetUpSteps()
|
||||||
|
@ -90,7 +90,7 @@ namespace osu.Game.Online.Rooms
|
|||||||
|
|
||||||
private void updateAvailability()
|
private void updateAvailability()
|
||||||
{
|
{
|
||||||
if (downloadTracker == null)
|
if (downloadTracker == null || SelectedItem.Value == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (downloadTracker.State.Value)
|
switch (downloadTracker.State.Value)
|
||||||
|
@ -223,7 +223,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
if (!resuming)
|
if (!resuming)
|
||||||
{
|
{
|
||||||
beatmap.Value = initialBeatmap;
|
beatmap.Value = initialBeatmap;
|
||||||
Track = initialBeatmap.Track;
|
Track = beatmap.Value.Track;
|
||||||
|
|
||||||
// ensure the track starts at maximum volume
|
// ensure the track starts at maximum volume
|
||||||
musicController.CurrentTrack.FinishTransforms();
|
musicController.CurrentTrack.FinishTransforms();
|
||||||
|
@ -676,10 +676,6 @@ namespace osu.Game.Screens.Select
|
|||||||
if (beatmapSet?.IsManaged == true)
|
if (beatmapSet?.IsManaged == true)
|
||||||
beatmapSet = beatmapSet.Detach();
|
beatmapSet = beatmapSet.Detach();
|
||||||
|
|
||||||
// todo: probably not required any more.
|
|
||||||
// foreach (var b in beatmapSet.Beatmaps)
|
|
||||||
// b.Metadata ??= beatmapSet.Metadata;
|
|
||||||
|
|
||||||
var set = new CarouselBeatmapSet(beatmapSet)
|
var set = new CarouselBeatmapSet(beatmapSet)
|
||||||
{
|
{
|
||||||
GetRecommendedBeatmap = beatmaps => GetRecommendedBeatmap?.Invoke(beatmaps)
|
GetRecommendedBeatmap = beatmaps => GetRecommendedBeatmap?.Invoke(beatmaps)
|
||||||
|
@ -34,7 +34,7 @@ namespace osu.Game.Stores
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void DeleteFile(TModel item, RealmNamedFileUsage file) =>
|
public void DeleteFile(TModel item, RealmNamedFileUsage file) =>
|
||||||
performFileOperation(item, managed => DeleteFile(managed, file, managed.Realm));
|
performFileOperation(item, managed => DeleteFile(managed, managed.Files.First(f => f.Filename == file.Filename), managed.Realm));
|
||||||
|
|
||||||
public void ReplaceFile(TModel item, RealmNamedFileUsage file, Stream contents) =>
|
public void ReplaceFile(TModel item, RealmNamedFileUsage file, Stream contents) =>
|
||||||
performFileOperation(item, managed => ReplaceFile(file, contents, managed.Realm));
|
performFileOperation(item, managed => ReplaceFile(file, contents, managed.Realm));
|
||||||
|
Loading…
Reference in New Issue
Block a user