fix(daily): full 30-room rotation and reset-safe profile
Use a fixed shuffled order so every room appears once before repeats. Keep Profile Confirm/Cancel visible, clear locked avatar/frame on reset, and make Home's avatar caption dynamic.
This commit is contained in:
1 parent
0cc08de31b
commit
b4fd03a8a4
6 files changed
+74
-15
No files matched your search
@@ -317,6 +317,7 @@ func _test_daily(save) -> void:
|
||||
all_valid = false
|
||||
distinct[i] = true
|
||||
_check(all_valid, "30 consecutive dates should all produce valid daily indices")
|
||||
_check(distinct.size() == 30, "30 consecutive dates should visit all 30 rooms")
|
||||
_note("distinct daily levels across 30 consecutive days: %d" % distinct.size())
|
||||
|
||||
_reset_to_clean(save)
|
||||
|
||||
@@ -47,12 +47,31 @@ func _run() -> void:
|
||||
await _test_campaign(main, save)
|
||||
await _test_guest_book(main)
|
||||
await _test_back(main)
|
||||
await _test_reset_fallback(main, save)
|
||||
_restore_defaults(save)
|
||||
|
||||
print("QA UI: ", "PASS" if failures == 0 else "FAIL (%d)" % failures)
|
||||
quit(0 if failures == 0 else 1)
|
||||
|
||||
|
||||
func _test_reset_fallback(main, save) -> void:
|
||||
main.show_screen("home", false)
|
||||
await process_frame
|
||||
save.data["avatar_id"] = "pepper"
|
||||
save.data["profile_frame"] = "paper"
|
||||
save.data["completed_rooms"] = ["a", "b", "c", "d", "e"]
|
||||
save.save_game()
|
||||
save.progress_changed.emit()
|
||||
await process_frame
|
||||
_check(main.home.mascot_caption.text.find("Pepper") >= 0, "Home caption should follow the chosen avatar")
|
||||
|
||||
save.reset_progress()
|
||||
await process_frame
|
||||
_check(save.selected_frame() == "plain", "reset should clear a room-locked frame")
|
||||
_check(save.selected_avatar() == "crumb", "reset should clear a locked guest avatar")
|
||||
_check(main.home.mascot_caption.text.find("Crumb") >= 0, "Home caption should return to Crumb")
|
||||
|
||||
|
||||
func _test_screen_cycle(main) -> void:
|
||||
var expected: Array[String] = ["home", "game", "guest_book", "rules", "profile", "streak"]
|
||||
_check(main.screens.size() == expected.size(), "Main should expose all six screens")
|
||||
|
||||
Reference in new issue
Block a user