v0.3.8-pre.00-fix.001
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-store-desk/tests/desktop_contract.rs
|
||||
// version: 4
|
||||
// version: 5
|
||||
|
||||
//! Desktop template and frontend contract tests for the Store Desk scaffold.
|
||||
|
||||
@@ -88,8 +88,7 @@ fn pre_007_shell_exposes_transaction_filters_detail_and_keeps_account_skeleton_u
|
||||
}
|
||||
assert!(html.contains("id=\"rawTransactionsTable\""));
|
||||
assert!(html.contains("id=\"rawAccountsTable\""));
|
||||
for overview_id in ["refreshOverview", "overviewStoreProfile", "overviewStoreTarget", "overviewStoreHealth", "overviewStorePool", "overviewStoreMigration"]
|
||||
{
|
||||
for overview_id in ["refreshOverview", "overviewStoreProfile", "overviewStoreTarget", "overviewStoreHealth", "overviewStorePool", "overviewStoreMigration"] {
|
||||
assert!(html.contains(&format!("id=\"{overview_id}\"")), "missing Store Overview field: {overview_id}");
|
||||
}
|
||||
for transaction_id in ["refreshTransactions", "transactionSlotMin", "transactionSlotMax", "transactionDirection", "transactionDetailModal"] {
|
||||
@@ -197,3 +196,20 @@ fn pre_007_transaction_ipc_maps_datatables_offset_limit_counts_and_detail_withou
|
||||
assert!(!dto.contains("RawPageCursor"));
|
||||
assert!(!frontend.contains("storePager"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_007_fix_001_long_transaction_identifiers_are_truncated_tooltipped_and_copyable() {
|
||||
let frontend = include_str!("../frontend/ts/main.ts");
|
||||
let sass = include_str!("../frontend/sass/_app.scss");
|
||||
assert!(frontend.contains("truncateLongText"));
|
||||
assert!(frontend.contains("renderCopyableLongText(String(data), "transaction-signature")"));
|
||||
assert!(frontend.contains("renderCopyableLongText(String(data), "transaction-content-hash")"));
|
||||
assert!(frontend.contains("setCopyableLongText("transactionDetailSignature""));
|
||||
assert!(frontend.contains("setCopyableLongText("transactionDetailContentHash""));
|
||||
assert!(frontend.contains("title="${escapedValue}""));
|
||||
assert!(frontend.contains("data-copy-long-text"));
|
||||
assert!(frontend.contains("navigator.clipboard.writeText"));
|
||||
assert!(frontend.contains("document.execCommand("copy")"));
|
||||
assert!(sass.contains(".app-copyable-long-text__value"));
|
||||
assert!(sass.contains("text-overflow: ellipsis"));
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-store-desk/tests/desktop_security.rs
|
||||
// version: 5
|
||||
// version: 6
|
||||
|
||||
//! Security boundary tests for the Store Desk scaffold.
|
||||
|
||||
@@ -128,3 +128,22 @@ fn pre_007_transaction_request_rejects_datatables_search_order_draw_and_physical
|
||||
assert!(runtime.contains("\"ascending\" =>"));
|
||||
assert!(runtime.contains("\"descending\" =>"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_007_fix_001_copy_tracing_never_logs_long_identifier_values() {
|
||||
let frontend = include_str!("../frontend/ts/main.ts");
|
||||
assert!(frontend.contains("Store Desk long text copy requested"));
|
||||
assert!(frontend.contains("Store Desk long text copy completed"));
|
||||
assert!(frontend.contains("Store Desk long text copy failed"));
|
||||
assert!(frontend.contains("{ fieldId }"));
|
||||
for forbidden in [
|
||||
"copy requested", { value",
|
||||
"copy completed", { value",
|
||||
"copy failed", { value",
|
||||
"copy requested", { signature",
|
||||
"copy completed", { signature",
|
||||
"copy failed", { signature",
|
||||
] {
|
||||
assert!(!frontend.contains(forbidden), "long identifier value leaked into copy tracing: {forbidden}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user