mirror of
https://github.com/ppy/osu.git
synced 2025-03-25 03:07:34 +08:00
Update outdated assertions
This commit is contained in:
parent
88311f5442
commit
cd07ddfe28
@ -17,6 +17,7 @@ using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Screens;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using osu.Game.Screens.Edit;
|
||||
using osu.Game.Screens.Edit.Components.Timelines.Summary;
|
||||
@ -80,15 +81,7 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
AddUntilStep("player pushed", () => (editorPlayer = Stack.CurrentScreen as EditorPlayer) != null);
|
||||
AddStep("exit player", () => editorPlayer.Exit());
|
||||
AddUntilStep("current screen is editor", () => Stack.CurrentScreen is Editor);
|
||||
AddUntilStep("background has correct params", () =>
|
||||
{
|
||||
// the test gameplay player's beatmap may be the "same" beatmap as the one being edited, *but* the `BeatmapInfo` references may differ
|
||||
// due to the beatmap refetch logic ran on editor suspend.
|
||||
// this test cares about checking the background belonging to the editor specifically, so check that using reference equality
|
||||
// (as `.Equals()` cannot discern between the two, as they technically share the same database GUID).
|
||||
var background = this.ChildrenOfType<BackgroundScreenBeatmap>().Single(b => ReferenceEquals(b.Beatmap.BeatmapInfo, EditorBeatmap.BeatmapInfo));
|
||||
return background.DimWhenUserSettingsIgnored.Value == editorDim.Value && background.BlurAmount.Value == 0;
|
||||
});
|
||||
AddUntilStep("background is correct", () => this.ChildrenOfType<BackgroundScreenStack>().Single().CurrentScreen is EditorBackgroundScreen);
|
||||
AddAssert("no mods selected", () => SelectedMods.Value.Count == 0);
|
||||
}
|
||||
|
||||
@ -113,15 +106,7 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
|
||||
AddStep("exit player", () => editorPlayer.Exit());
|
||||
AddUntilStep("current screen is editor", () => Stack.CurrentScreen is Editor);
|
||||
AddUntilStep("background has correct params", () =>
|
||||
{
|
||||
// the test gameplay player's beatmap may be the "same" beatmap as the one being edited, *but* the `BeatmapInfo` references may differ
|
||||
// due to the beatmap refetch logic ran on editor suspend.
|
||||
// this test cares about checking the background belonging to the editor specifically, so check that using reference equality
|
||||
// (as `.Equals()` cannot discern between the two, as they technically share the same database GUID).
|
||||
var background = this.ChildrenOfType<BackgroundScreenBeatmap>().Single(b => ReferenceEquals(b.Beatmap.BeatmapInfo, EditorBeatmap.BeatmapInfo));
|
||||
return background.DimWhenUserSettingsIgnored.Value == editorDim.Value && background.BlurAmount.Value == 0;
|
||||
});
|
||||
AddUntilStep("background is correct", () => this.ChildrenOfType<BackgroundScreenStack>().Single().CurrentScreen is EditorBackgroundScreen);
|
||||
|
||||
AddStep("start track", () => EditorClock.Start());
|
||||
AddAssert("sample playback re-enabled", () => !Editor.SamplePlaybackDisabled.Value);
|
||||
|
Loading…
x
Reference in New Issue
Block a user