`TestSceneEditorTestGameplay` is not isolated from database, and one of
the tests exiting editor when seeked to 60000 milliseconds
(`TestClockTimeTransferIsOneDirectional()`) ended up changing
`EditorTimestamp` to the same value, causing
`TestSaveChangesBeforeGameplayTest()` to fail due to changing initial
state.
To fix, perform a direct deletion of imported beatmaps in realm to avert
this scenario, contrary to the soft-deletion via `BeatmapManager` done
previously.
`TestSceneHitObjectComposer.TestPlacementFailsWhenClickingButton()` was
attempting to cover the case of the user clicking a toolbox button which
was in front of the playfield, and ensure that the click did not result
in a placement. However, since the paddings in
67f83f246b were added, it is impossible
for a toolbox button to be in front of the playfield in the collapsed
state, which the test was relying on.
The test scenario is still however relevant in the case of the toolbox
being expanded, as in that state the toolbux buttons may very well end
up being in front of the playfield, and they still should not result in
a hitobject being placed. To ensure that this is the case, add a few
extra test steps ensuring that the toolbox is expanded first before
trying to retrieve an overlapping button.
The online ID will be reset unconditionally after any local change is
made to any beatmap. That behaviour no longer depends on online lookups
succeeding or failing.
This may change at a later date when beatmap submission is integrated
into lazer - the idea is that online IDs would get re-populated on local
beatmaps once they are submitted to web.
This test scene passes at e58e1151f3 and
fails at current master, due to an inadvertent regression caused by
e72f103c17.
As it turns out, the online lookup flow that was causing UI thread
freezes when saving beatmaps in the editor, was also responsible for
resetting the online ID of locally-modified beatmaps if online lookup
failed.
Fixes#22306.
Changes beatmap saving so that by default it does not transfer
the hashes in collections, and only transfers them when saving the same
difficulty in the editor.
Issue seems to have been introduced in https://github.com/ppy/osu/pull/20641.