Update spacetime-client bindings and frontend
Large update across server and web clients: regenerated/added many spacetime-client module bindings and input types (including new delete/work_delete input types and numerous procedure/reducer files), updates to server-rs API modules (bark_battle, jump_hop, wooden_fish, auth, module-runtime and shared contracts), and fixes in module-runtime behavior and domain logic. Frontend changes include new/updated components and tests (creative audio helpers, bark-battle/jump-hop/wooden-fish clients and views, unified generation pages, RPG entry views, and runtime shells), plus CSS and service updates. Documentation and operational notes updated (.hermes pitfalls and multiple PRD/docs) to cover daily-task refresh, banner asset fallback, recommend-key bug, and other platform behaviors. Tests and verification steps added/updated alongside these changes.
This commit is contained in:
@@ -319,6 +319,35 @@ mod tests {
|
||||
assert_eq!(banners, default_creation_entry_event_banner_snapshots());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn creation_entry_event_banners_none_returns_default_announcements() {
|
||||
let legacy_banner = CreationEntryEventBannerSnapshot {
|
||||
title: "旧结构化横幅".to_string(),
|
||||
description: "旧库单条字段".to_string(),
|
||||
cover_image_src:
|
||||
"/branding/taonier-logo-spiral-reference-concepts/taonier-spiral-bouncy-clay.png"
|
||||
.to_string(),
|
||||
prize_pool_mud_points: 58_000,
|
||||
starts_at_text: "2024.10.20 10:00".to_string(),
|
||||
ends_at_text: "2024.11.20 23:59".to_string(),
|
||||
render_mode: "structured".to_string(),
|
||||
html_code: None,
|
||||
};
|
||||
|
||||
let banners = resolve_creation_entry_event_banner_responses(None, &legacy_banner);
|
||||
|
||||
assert_eq!(banners.len(), 1);
|
||||
assert_eq!(banners[0].render_mode, "html");
|
||||
assert_eq!(banners[0].title, "创作公告");
|
||||
assert!(banners[0].html_code.as_deref().unwrap_or("").contains("创作公告"));
|
||||
assert!(banners[0]
|
||||
.html_code
|
||||
.as_deref()
|
||||
.unwrap_or("")
|
||||
.contains("/creation-type-references/puzzle.webp"));
|
||||
assert_ne!(banners[0].cover_image_src, legacy_banner.cover_image_src);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn creation_entry_event_banners_json_accepts_announcement_html_code() {
|
||||
let normalized = normalize_creation_entry_event_banners_json(
|
||||
|
||||
Reference in New Issue
Block a user