8000 SongSelectV2: Refactor test scenes to have a place for non-filtering tests by frenzibyte · Pull Request #33105 · ppy/osu · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

SongSelectV2: Refactor test scenes to have a place for non-filtering tests #33105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 13, 2025

Conversation

frenzibyte
Copy link
Member

Goal is to move TestDeleteHotkey away from the filtering test scene, and have a house for upcoming hotkey and non-filtering tests, all which depend on isolated database (not only for beatmap import, but also to not fail due to local key binding reconfigurations).

Comment on lines +78 to +92
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
{
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));

// These DI caches are required to ensure for interactive runs this test scene doesn't nuke all user beatmaps in the local install.
// At a point we have isolated interactive test runs enough, this can likely be removed.
dependencies.Cache(Rulesets = new RealmRulesetStore(Realm));
dependencies.Cache(Realm);
dependencies.Cache(Beatmaps = new BeatmapManager(LocalStorage, Realm, null, Dependencies.Get<AudioManager>(), Resources, Dependencies.Get<GameHost>(), Beatmap.Default));
dependencies.Cache(Config = new OsuConfigManager(LocalStorage));

dependencies.CacheAs<BeatmapStore>(beatmapStore = new RealmDetachedBeatmapStore());

return dependencies;
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has intentionally been moved from BDL as this is an early spot to cache dependencies before components of the test scene are loaded (particularly the nested GlobalActionContainer inside of the manual input manager, so that default keybinds are matched when inputting keys in tests).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i still think this is far too much coupling to other components for song select testing. things like toolbar, footer, etc.

but it is what it is for now i don't have the time or energy to improve things.

@peppy peppy merged commit 74a3ac4 into ppy:master May 13, 2025
7 of 9 checks passed
@frenzibyte frenzibyte deleted the ssv2-refactor-tests branch May 13, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0