feat(worlds): add metadata cards and quick launch

This commit is contained in:
objz committed 2026-08-01 16:47:33 +02:00
1 parent 4eed312c3d
commit ea7478eb27
22 files changed
+585 -88

No files matched your search

+35
View File
@@ -32,6 +32,41 @@ fn global_navigation_returns_from_log_overlay() {
assert!(ui.app.exit);
}
#[test]
fn worlds_reserves_q_for_available_quick_launch() {
let mut ui = UiHarness::new();
ui.add_instance("Test Instance");
ui.app.focused = FocusedArea::Content;
ui.app.content_tab = ContentTab::Worlds;
ui.key(KeyCode::Char('q'));
assert!(!ui.app.exit, "unsupported Quick Play must not quit rmcl");
let meta = serde_json::json!({
"id": "1.21.1",
"mainClass": "net.minecraft.client.main.Main",
"arguments": {
"game": [{
"rules": [{
"action": "allow",
"features": { "is_quick_play_singleplayer": true }
}],
"value": ["--quickPlaySingleplayer", "${quickPlaySingleplayer}"]
}],
"jvm": []
}
});
let meta_path = crate::storage::MetadataPaths::new(&ui.app.instance_manager.meta_dir)
.versions()
.join("1.21.1/meta.json");
std::fs::create_dir_all(meta_path.parent().unwrap()).unwrap();
std::fs::write(meta_path, serde_json::to_vec(&meta).unwrap()).unwrap();
ui.app.world_quick_play_support = None;
ui.draw();
assert!(ui.screen().contains("quick launch"));
}
#[test]
fn mouse_wheel_uses_the_focused_views_scroll_navigation() {
let mut ui = UiHarness::new();