Part of the `ScreenFooter` refactor, which intends to move the footer
content handling to `OsuScreen`. This commit updates the `ScreenFooter`
test to operate on entire `OsuScreen`s, in order to better test the
entire flow of pushing a screen, and having it create and add its own
content to the footer.
This should be 80-90% identical to the original test case structure
wise, just that instead of manually manipulating the footer with
`SetButtons()`, various screens with the appropriate buttons are being
moved around the screen stack.
Additionally this adds some more tests handling common use cases, as
well as removes `TestLoadOverlayAfterFooterIsDisplayed()`, since as far
as I understand the behaviour described in it doesn't actually happen in
production code. From what I can see, Screens instantiate their overlays
in `load()`, and then register them in `LoadComplete()`. There seems to
be no case where a `ShearedOverlayContainer` is created in the middle of
a screen's lifecycle.
Part of the screen footer refactor.
Once footer content is being managed by `OsuScreen`, the current tests
which simply create the tested overlay and `ScreenFooter` in a container
will no longer work.
This PR refactors them to use `ScreenTestScene` with the setup being
creating a dedicated testing `OsuScreen` which does the bare minimum to
create the tested overlay and necessary components (eg.
`FooterButtonFreeModsV2` for `TestSceneFreeModsOverlay`).
Most of the changes here can be described as
`%s/<...>Overlay/screen.Overlay/g`, with some minor touchups as
necessary, given that we're now testing a more complete flow which
checks more things that were previously not handled by the tests.
## [Move footer to front in
ScreenTestScene](https://github.com/ppy/osu/commit/f8740e0403b3c0badd60d394c737f2aa912a9ed6)
Self-explanatory. Without it the footer would show below the actual
overlay, breaking tests depending on manual input. For the sake of tests
not breaking in CI, both #36718 and this have this included - would
prefer the former to be merged first since it was already reviewed
there.
## `TestSceneModSelectOverlay`
There were a few tests (`TestColumnHidingOnIsValidChange`,
`TestColumnHidingOnTextFilterChange`, and
`TestHidingOverlayClearsTextSearch`) that would create a custom overlay
instance instead of the globally provided one. I've tested both and the
tests run fine with the default overlay, so they're now using that
instead.
## `TestSceneFreeModSelectOverlay`
Updated to use footer v2.
---------
Co-authored-by: Dean Herbert <pe@ppy.sh>
This is still a workaround but arguably it's something we could leave in
place without much loss. I think this at least feels better than the
previous code.
Notably, you could argue the test coverage of the fail case is lower
since made it implicit that all tests will avoid the "backwards seek"
detections. But we never really had tests correctly- fail on the original
so I don't see any loss of value.
This continues on https://github.com/ppy/osu/pull/32770 via adding test
cases which cover treatment of hit windows in stable in osu!, taiko, and
mania. The test cases are exportable to beatmap `.osu` files and replay
`.osr` files for stable crosscheck by setting `ExportLocation` on the
test scene classes to a non-null path.
For the most part, osu! and taiko ground truth matches previous findings
- hit windows in those rulesets are floored to the nearest integer.
The real "star" of this diff is mania, because:
- The hit windows in mania depend on:
- overall difficulty (as expected)
- whether Score V2 is active
- if Score V2 is not active, the hit windows also depend on whether
the map was converted from another ruleset or not
- Regardless of all aforementioned factors, mania hitwindows are *not
symmetrical*. Due to what *appears* to be a straight-up bug, it is
*not possible to achieve a MEH / 50 hit result when hitting late*.
There is specific code that coerces late hits beyond 100 hit window
range to full misses:
https://github.com/peppy/osu-stable-reference/blob/996648fba06baf4e7d2e0b248959399444017895/osu!/GameplayElements/HitObjectManagerMania.cs#L737-L751
Note that despite the fact that I'm PRing these test cases, none of this
is a promise that all of stable behaviours will be returning unchanged
when I PR something to actually do something about this and the other
issue of replay instability. This is just coverage, to be used for
awareness of what's still broken. The extent of how much stable is going
to be humored here going forward will be subject to negotiation.
Beyond isolation, this stuff is also used to test (de-)serialisation.
Much-of-a-muchness in this case since it isn't too thoroughly tested,
but best do it anyway.
Removes storage of `selectedBeatmap` that was referenced through
multiple class-level methods.
To expound a bit, this structure felt better (or otherwise passing
`APIBeatmap` through methods) alongside removal of the `#nullable
disable`, otherwise each method would check `selectedBeatmap != null`.