Redesign exam and CCS experiences
This commit is contained in:
@@ -13,6 +13,12 @@ func _initialize() -> void:
|
||||
_assert(history.has_active_simulation({}, {"state": "block_active"}), "a loaded active block should be resumable")
|
||||
_assert(history.has_active_simulation({}, {"state": "between_blocks"}), "a loaded between-block simulation should be resumable")
|
||||
_assert(not history.has_active_simulation({}, {"state": "completed"}), "completed simulations should not appear active")
|
||||
_assert(history.completed_blocks({"state": "block_active", "currentBlock": 3, "totalBlocks": 12}) == 3, "active block progress should count only finished blocks")
|
||||
_assert(history.completed_blocks({"state": "between_blocks", "currentBlock": 3, "totalBlocks": 12}) == 4, "between-block progress should include the submitted block")
|
||||
_assert(history.completed_blocks({"state": "completed", "currentBlock": 11, "totalBlocks": 12}) == 12, "completed simulations should show every block")
|
||||
_assert(history.progress_percent(3, 12) == 25, "progress percentage should use floating-point division")
|
||||
_assert(history.remaining_time_text({"state": "between_blocks", "currentBlock": 2, "totalBlocks": 12}) == "~4h 30m remaining", "remaining time should reflect unstarted blocks")
|
||||
_assert(history.format_datetime_parts({"year": 2026, "month": 7, "day": 16, "hour": 22, "minute": 4}) == "Jul 16, 2026\n10:04 PM", "history dates should use the compact mockup format")
|
||||
quit(1 if failures > 0 else 0)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user