v0.3.7-pre.003-fix.001

This commit is contained in:
2026-09-02 10:55:57 +02:00
parent 862f40ad26
commit 03a94f4fb6
8 changed files with 200 additions and 26 deletions

View File

@@ -1,5 +1,5 @@
// file: crates/ksp-app-backfill-desk/tests/desktop_contract.rs
// version: 2
// version: 3
//! Structural desktop contract checks for the Backfill Desk scaffold.
@@ -99,7 +99,13 @@ fn pre_002_package_dependencies_match_desk_baseline() {
fn pre_002_splash_assets_and_styles_match_existing_desk_template() {
let root = app_root();
let reference = workspace_root().join("crates/ksp-app-solprices-desk");
for relative in ["frontend/fonts/DOS_Amazigh.ttf", "frontend/imgs/logo.png", "frontend/imgs/splash.png", "icons/favicon.png", "icons/favicon.ico"] {
for relative in [
"frontend/fonts/DOS_Amazigh.ttf",
"frontend/imgs/logo.png",
"frontend/imgs/splash.png",
"icons/favicon.png",
"icons/favicon.ico",
] {
assert_eq!(read_bytes(root.join(relative).as_path()), read_bytes(reference.join(relative).as_path()), "Desk asset differs: {relative}");
}
let splash = read_text(root.join("frontend/splash.html").as_path());
@@ -107,7 +113,9 @@ fn pre_002_splash_assets_and_styles_match_existing_desk_template() {
assert!(splash.contains("Backfill Desk"));
let splash_style = read_text(root.join("frontend/sass/splash.scss").as_path());
let reference_style = read_text(reference.join("frontend/sass/splash.scss").as_path());
let normalized = splash_style.replace("crates/ksp-app-backfill-desk", "crates/ksp-app-solprices-desk").replace("// version: 1", "// version: 2");
let normalized = splash_style
.replace("crates/ksp-app-backfill-desk", "crates/ksp-app-solprices-desk")
.replace("// version: 1", "// version: 2");
assert_eq!(normalized, reference_style);
}
@@ -134,7 +142,12 @@ fn pre_002_shell_and_splash_use_shared_frontend_tooling() {
fn pre_003_composite_packaging_follows_atomic_config_registry_contract() {
let root = app_root();
let config = read_json(root.join("tauri.conf.json").as_path());
let resources = config.get("bundle").and_then(|value| value.get("resources")).and_then(serde_json::Value::as_object);
let resources = config
.get("bundle")
.and_then(|value| {
return value.get("resources");
})
.and_then(serde_json::Value::as_object);
assert!(resources.is_some());
let resources = match resources {
std::option::Option::Some(value) => value,