v0.3.7-pre.004
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-backfill-desk/tests/desktop_contract.rs
|
||||
// version: 3
|
||||
// version: 4
|
||||
|
||||
//! Structural desktop contract checks for the Backfill Desk scaffold.
|
||||
|
||||
@@ -99,13 +99,7 @@ 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());
|
||||
@@ -113,9 +107,7 @@ 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);
|
||||
}
|
||||
|
||||
@@ -179,7 +171,7 @@ fn pre_003_composite_packaging_follows_atomic_config_registry_contract() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_003_bootstrap_uses_composite_logging_without_opening_transport_or_store() {
|
||||
fn pre_003_bootstrap_keeps_logging_composition_separate_from_transport_runtime() {
|
||||
let root = app_root();
|
||||
let bootstrap = read_text(root.join("src/bootstrap.rs").as_path());
|
||||
assert!(bootstrap.contains("FILE_ID_COMPOSITE_KSP_APP_BACKFILL_DESK"));
|
||||
@@ -188,6 +180,23 @@ fn pre_003_bootstrap_uses_composite_logging_without_opening_transport_or_store()
|
||||
assert!(bootstrap.contains("COMPOSITE_COMPONENT_ID_STORE"));
|
||||
assert!(bootstrap.contains("LogFilterLevel::Trace"));
|
||||
for forbidden in ["HttpTransportPool", "Store::open", "BackfillJobRuntime", "BackfillRequest"] {
|
||||
assert!(!bootstrap.contains(forbidden), "pre.003 opens later runtime surface {forbidden}");
|
||||
assert!(!bootstrap.contains(forbidden), "bootstrap.rs absorbs another runtime responsibility: {forbidden}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_004_transport_runtime_builds_pool_and_validates_both_required_rpc_methods() {
|
||||
let root = app_root();
|
||||
let transport = read_text(root.join("src/transport_runtime.rs").as_path());
|
||||
assert!(transport.contains("HttpTransportPool::new"));
|
||||
assert!(transport.contains("getSignaturesForAddress"));
|
||||
assert!(transport.contains("getTransaction"));
|
||||
assert!(transport.contains("select_for_method"));
|
||||
assert!(transport.contains("configured_networks"));
|
||||
assert!(transport.contains("compatible_backfill_roles"));
|
||||
for forbidden in ["provider()", "url()", "Store::open", "BackfillJobRuntime", "BackfillRequest"] {
|
||||
assert!(!transport.contains(forbidden), "pre.004 opens or projects forbidden surface {forbidden}");
|
||||
}
|
||||
let tauri = read_text(root.join("src/tauri.rs").as_path());
|
||||
assert!(tauri.contains("backfill_options"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user