v0.2.6-pre.018

This commit is contained in:
2026-08-22 10:56:26 +02:00
parent 362123f357
commit ba8f42f9b1
36 changed files with 1238 additions and 150 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-app-wallet-desk/tests/desktop_contract.rs
// version: 19
// version: 20
//! Desktop build, shell and Config-status contract audits for Wallet Desk.
@@ -417,3 +417,31 @@ fn pre_017_wallet_desk_open_paths_remain_non_migrating() {
assert!(state.contains("ksp_wallet_lib::open_wallet_owner_file"));
assert!(inventory.contains("ksp_wallet_lib::inspect_locked_wallet_file"));
}
#[test]
fn pre_018_packaged_runtime_bundles_config_resources_and_keeps_wallet_desk_version_current() {
let root = app_root();
let tauri = read_json(root.join("tauri.conf.json").as_path());
assert_eq!(tauri.pointer("/version").and_then(serde_json::Value::as_str), std::option::Option::Some("0.2.6-pre.18"));
let package = read_json(root.join("package.json").as_path());
assert_eq!(package.pointer("/version").and_then(serde_json::Value::as_str), std::option::Option::Some("0.2.6-pre.18"));
let resources = tauri.pointer("/bundle/resources").and_then(serde_json::Value::as_object);
assert!(resources.is_some(), "packaged Wallet Desk Config resources map must exist");
if let std::option::Option::Some(resources) = resources {
assert_eq!(resources.len(), 8);
assert_eq!(
resources.get("../../config/composite.ksp-app-wallet-desk.json").and_then(serde_json::Value::as_str),
std::option::Option::Some("config/composite.ksp-app-wallet-desk.json"),
);
assert_eq!(
resources.get("../../config/schemas/composite.schema.json").and_then(serde_json::Value::as_str),
std::option::Option::Some("config/schemas/composite.schema.json"),
);
}
let main = read_text(root.join("frontend/main.html").as_path());
assert!(main.contains("0.2.6-pre.18"));
let tauri_source = read_text(root.join("src/tauri.rs").as_path());
assert!(tauri_source.contains("ksp_config_lib::prepare_packaged_runtime"));
assert!(tauri_source.contains("tauri::utils::platform::resource_dir"));
assert!(tauri_source.contains("std::env::set_current_dir(layout.runtime_root())"));
}