v0.2.6-pre.014

This commit is contained in:
2026-08-22 00:21:14 +02:00
parent c07db925b1
commit 6907e4bbb8
39 changed files with 1544 additions and 370 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-app-wallet-desk/tests/desktop_contract.rs
// version: 14
// version: 15
//! Desktop build, shell and Config-status contract audits for Wallet Desk.
@@ -31,9 +31,13 @@ fn tauri_shell_uses_reserved_wallet_desk_ports_and_template_windows() {
let root = app_root();
let tauri = read_json(root.join("tauri.conf.json").as_path());
assert_eq!(tauri.pointer("/build/devUrl").and_then(serde_json::Value::as_str), std::option::Option::Some("http://localhost:1432"));
assert_eq!(tauri.pointer("/build/beforeDevCommand").and_then(serde_json::Value::as_str), std::option::Option::Some("npm run dev"));
assert_eq!(tauri.pointer("/build/beforeBuildCommand").and_then(serde_json::Value::as_str), std::option::Option::Some("npm run build"));
assert_eq!(tauri.pointer("/build/beforeDevCommand/script").and_then(serde_json::Value::as_str), std::option::Option::Some("npm run dev"));
assert_eq!(tauri.pointer("/build/beforeDevCommand/cwd").and_then(serde_json::Value::as_str), std::option::Option::Some("."));
assert_eq!(tauri.pointer("/build/beforeBuildCommand/script").and_then(serde_json::Value::as_str), std::option::Option::Some("npm run build"));
assert_eq!(tauri.pointer("/build/beforeBuildCommand/cwd").and_then(serde_json::Value::as_str), std::option::Option::Some("."));
assert_eq!(tauri.pointer("/app/security/csp"), std::option::Option::Some(&serde_json::Value::Null));
let manifest = read_text(root.join("Cargo.toml").as_path());
assert!(manifest.contains("name = \"ksp-app-wallet-desk\""));
let windows = tauri.pointer("/app/windows").and_then(serde_json::Value::as_array);
assert!(windows.is_some());
let windows = match windows {
@@ -347,3 +351,24 @@ fn pre_013_integration_compliance_and_devnet_smoke_are_durable_release_gates() {
assert!(smoke.contains("#[ignore"));
assert!(validation.contains("Config -> Wallet -> Transport -> Devnet getBalance"));
}
#[test]
fn pre_014_template_has_normalized_html_headers_light_header_and_kbot_style_splash_contract() {
let root = app_root();
let main = read_text(root.join("frontend/main.html").as_path());
let splash = read_text(root.join("frontend/splash.html").as_path());
let splash_style = read_text(root.join("frontend/sass/splash.scss").as_path());
let splash_ts = read_text(root.join("frontend/ts/splash.ts").as_path());
assert!(main.starts_with("<!-- file: crates/ksp-app-wallet-desk/frontend/main.html -->"));
assert!(main.contains("navbar h-100 py-0 bg-light text-dark"));
assert!(main.contains("app-sidebar"));
assert!(splash.starts_with("<!-- file: crates/ksp-app-wallet-desk/frontend/splash.html -->"));
assert!(splash.contains("id=\"debug-info\""));
assert!(splash.contains("id=\"messages-container\""));
assert!(splash.contains("sass/splash.scss"));
assert!(splash_style.contains("overflow: hidden"));
assert!(splash_style.contains("user-select: none"));
assert!(splash_ts.contains("add_debug"));
assert!(splash_ts.contains("add_message"));
assert!(!splash_ts.contains("../sass/splash.scss"));
}