v0.2.12-pre.007
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-solprices-desk/tests/desktop_contract.rs
|
||||
// version: 6
|
||||
// version: 7
|
||||
|
||||
//! Desktop scaffold, shared-template and Config packaging contract audits for SOL Prices Desk `0.2.12`.
|
||||
|
||||
@@ -246,3 +246,46 @@ fn pre_006_market_price_runtime_adds_selected_and_global_refresh_without_polling
|
||||
assert!(!main_typescript.contains(forbidden), "pre.006 must not add consumer scheduling: {forbidden}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn pre_007_prices_view_is_responsive_and_projects_generic_states_without_price_coercion() {
|
||||
let root = app_root();
|
||||
let main_html = read_text(root.join("frontend/main.html").as_path());
|
||||
for required in [
|
||||
r#"id="pricesSummaryProviders""#,
|
||||
r#"id="pricesSummaryReady""#,
|
||||
r#"id="pricesSummaryObserved""#,
|
||||
r#"id="pricesSummaryAttention""#,
|
||||
r#"id="pricesSummaryLoading""#,
|
||||
r#"id="selectAllProviders""#,
|
||||
r#"id="clearSelectionButton""#,
|
||||
"Observation times",
|
||||
"app-market-table-container",
|
||||
"visually-hidden",
|
||||
] {
|
||||
assert!(main_html.contains(required), "pre.007 Prices UX is missing {required}");
|
||||
}
|
||||
let main_typescript = read_text(root.join("frontend/ts/main.ts").as_path());
|
||||
for required in [
|
||||
"availabilityPresentations",
|
||||
"Authentication unavailable",
|
||||
"Cooling down",
|
||||
"Quota unavailable",
|
||||
"Temporarily unavailable",
|
||||
"formatUnixMillis",
|
||||
"BigInt(value)",
|
||||
"Not supplied",
|
||||
"selectAllProviders",
|
||||
"clearProviderSelection",
|
||||
"pricesSummaryObserved",
|
||||
"app-market-row-loading",
|
||||
] {
|
||||
assert!(main_typescript.contains(required), "pre.007 Prices UX is missing {required}");
|
||||
}
|
||||
assert!(!main_typescript.contains("parseFloat("));
|
||||
assert!(!main_typescript.contains("Number(provider.price"));
|
||||
let app_scss = read_text(root.join("frontend/sass/_app.scss").as_path());
|
||||
for required in ["position: sticky", "font-variant-numeric: tabular-nums", "app-market-summary-card", "app-market-table-container"] {
|
||||
assert!(app_scss.contains(required), "pre.007 responsive styling is missing {required}");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user