Commit Graph

127 Commits

Author SHA1 Message Date
Krzysztof Gutkowski
105342e5bf Migrate sheared overlay tests to ScreenTestScene (#36736)
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](f8740e0403)

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>
2026-02-28 04:22:58 +09:00
Dan Balasescu
79c367d208 Fix test scene leaks through RealmRulesetStore/RealmAccess 2025-10-09 15:28:15 +09:00
Dan Balasescu
8c244134d5 Add failing test 2025-03-27 19:05:11 +09:00
Dan Balasescu
9272ada859 Fix intermittent mod customisation panel test 2025-03-19 16:13:56 +09:00
Dean Herbert
dff354247e Change ModSelectOverlay.ShowPresets to init 2025-03-04 22:32:13 +09:00
Bartłomiej Dach
16c2c14037 Adjust tests further to match new UX 2024-09-02 14:46:40 +02:00
Bartłomiej Dach
518c1aa5a0 Remove weird Expanded / ExpandedState duality 2024-08-07 14:01:30 +02:00
Caiyi Shyu
051d52c23f Update ModCustomisationPanel to use ExpandedState enum 2024-08-01 19:25:45 +08:00
Caiyi Shyu
bd017aea38 fix TestPreexistingSelection failing 2024-07-26 23:58:52 +08:00
Salman Ahmed
ed1f3a1eb4 Merge branch 'master' into footer-v2-integration 2024-07-09 13:48:40 +03:00
Salman Ahmed
1d94c96a8e Display customisation header in disabled state when no customisable mod selected 2024-07-02 14:40:16 +03:00
Salman Ahmed
901663b3ff Fix test failure 2024-06-30 11:00:00 +03:00
Salman Ahmed
48bf3f1385 Migrate mod select overlay footer content 2024-06-30 06:50:36 +03:00
Salman Ahmed
f462aa59df Add test coverage for the issues that were pointed out recently 2024-06-28 11:23:52 +03:00
Salman Ahmed
2efafcaf5b Remove stale comment 2024-06-23 08:46:55 +03:00
Salman Ahmed
1298b98534 Update test coverage 2024-06-23 08:22:54 +03:00
Dean Herbert
093be3d723 Cast remaining test usages to IFocusManager to remove obsolete notice 2024-05-22 21:55:53 +08:00
Bartłomiej Dach
9d04b44a88 Add failing test case 2024-04-19 11:04:05 +02:00
Salman Ahmed
9543908c7a Fix mod select overlay settings order not always matching panels order 2024-03-04 23:36:45 +03:00
Bartłomiej Dach
b08fcbd4e9 Adjust tests to new behaviour 2024-02-22 11:02:49 +01:00
Bartłomiej Dach
966093f7ce Transform score multiplier display to also show ranked state 2024-02-01 21:32:37 +01:00
Bartłomiej Dach
c0d4ed4789 Add test coverage of select-all-text-in-search when nothing matched 2024-01-15 19:07:52 +01:00
Bartłomiej Dach
e8394e6f74 Add test coverage 2024-01-15 19:05:33 +01:00
Bartłomiej Dach
d793d1cea1 Add test coverage of desired input handling behaviour 2023-12-19 14:52:16 +01:00
Bartłomiej Dach
839a080247 Add test coverage for desired mod overlay search box behaviour 2023-12-14 09:52:38 +01:00
Bartłomiej Dach
e865de7a6b Update test assertions in line with half time mod multiplier changes 2023-12-13 09:25:56 +01:00
Dean Herbert
8c067dc584 Fix mod tests not waiting for presets to finish loading
See https://github.com/ppy/osu/actions/runs/6692350567/job/18181352850.
2023-10-31 14:53:07 +09:00
Dean Herbert
32946413de Change display text from "difficulty" to "score" multiplier 2023-09-13 20:01:19 +09:00
Bartłomiej Dach
53c30dca64 Fix data flow being sometimes incorrect 2023-09-11 09:53:58 +02:00
Bartłomiej Dach
f66093d3cf Revert failing test to prior assertions too 2023-07-26 21:51:32 +02:00
Bartłomiej Dach
cdbb6f90be Merge pull request #24199 from peppy/revert-to-default-design-change
Update design of "revert to default" button
2023-07-13 23:44:24 +02:00
Dean Herbert
f5c472c0fe Don't hide mod select overlay when pressing select binding with no search 2023-07-13 17:50:07 +09:00
Dean Herbert
1bfe5a18cb Rename RestoreDefaultValueButton to RevertToDefaultButton
Because I can't find it every time I search.
2023-07-13 13:46:50 +09:00
Dean Herbert
a98a36872e Bring realm library up-to-date 2023-07-06 13:37:43 +09:00
Dean Herbert
3585c3f1d5 Apply required nullability changes 2023-06-24 09:58:36 +09:00
Bartłomiej Dach
75300ca229 Switch search box to initially unfocused
Done primarily to keep mod hotkeys working without any behavioural
changes when mod select is opened.
2023-06-18 15:58:50 +02:00
Bartłomiej Dach
b9156b1df3 Reword/rename some stuff in test 2023-06-18 14:24:35 +02:00
Cootz
71e6f80c40 Add hotkey for switching search bar focus 2023-06-05 15:54:19 +03:00
Cootz
3ebc801484 Move (de)select all mods hotkeys handling to ModSelectOverlay 2023-06-05 13:49:07 +03:00
Cootz
fd554033db Update tests 2023-06-04 17:11:04 +03:00
Cootz
4c7cca101e Rename IsValid to Visible 2023-06-02 11:33:38 +03:00
Cootz
c3f06ad2db Merge branch 'master' into add-mod-search-option 2023-05-23 08:55:57 +03:00
Cootz
67bf1b4dfe Select/deselect first visible mod when GlobalAction.Select is triggered 2023-05-21 11:05:01 +03:00
Cootz
6647d95ea7 Kill search focus when clicking on ModColumn 2023-05-14 18:32:16 +03:00
Cootz
2467813d81 Block deselect all short key when using the search box 2023-05-09 16:14:42 +03:00
Cootz
4c3af6ecfe Add test coverage for deselect all with filtered mods selected 2023-05-07 15:50:21 +03:00
Cootz
5aca3a78da Add basic tests for external search 2023-05-06 12:21:32 +03:00
Cootz
7422b5285c Fix wrong filtering in testing 2023-05-05 22:41:30 +03:00
Dean Herbert
698baa78bf Merge pull request #22711 from Terochi/keep-shared-settings-ruleset-change
Keep shared mod settings when changing ruleset
2023-05-05 13:29:55 +09:00
Bartłomiej Dach
99e8b2ce70 Make getMod() method generally better 2023-05-04 19:12:22 +02:00