I don't know what this test was trying to do, but it was wrong. Any
offset which is applied should be invisible to the clock's final
`CurrentTime` (and to the user).
Came up as a failure when locally running tests for
ppy/osu-framework#6001 - but the test is actually a previously-known
flaky that I couldn't reproduce the failure of until the aforementioned
PR.
This appears to be a simple race; the test scene queries the track
length from update thread, but the length is actually set on the audio
thread. So it's not unreasonable that given unlucky timing, the length
will not be set by `TrackBass` before it is queried.
To fix, switch assert to until step. I'm generally not really willing
to give this more time of day until this change is proven insufficient.
As it turns out, the tightening of hitcircle lifetimes in editor caused
the test to fail, since the objects were too far apart and at the
starting time of the test, the first object was fully faded out and as
such not alive, therefore leading cyclic selection to fail to select it.
To fix, bring all three objects closer together time-wise so that this
does not happen and the test can continue to exercise its original
behaviour.
`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.