Add timed friend messages before and after the call breaks
This commit is contained in:
@@ -240,6 +240,62 @@ func run(target: Node) -> void:
|
||||
cfg.save(save_file)
|
||||
saved = game.Profile.read_profile(save_file, game.story.facts, game.story.endings)
|
||||
check(saved.facts == {"lamp": true} and saved.loops == 0, "Invalid save data filtered")
|
||||
# Notifications are an independent clock: four during the call, the fifth
|
||||
# two seconds after the strike. Reading never pauses or cancels mom's task.
|
||||
start(2)
|
||||
at(16.9)
|
||||
check(game.notifications.is_empty(), "No early push")
|
||||
at(17)
|
||||
check(game.notifications.size() == 1 and game.unread == 1, "First push at 17 seconds")
|
||||
check(game.notification_card.visible, "Push is visible")
|
||||
click("dismiss_push")
|
||||
check(not game.notification_card.visible and game.unread == 1, "Dismiss keeps message unread")
|
||||
click("keys_search")
|
||||
at(34)
|
||||
check(game.notifications.size() == 2 and not game.busy.is_empty(), "Second push during mom task")
|
||||
click("open_push")
|
||||
check(game.viewing_messages and game.unread == 0, "Open push reads inbox")
|
||||
at(40)
|
||||
check(game.items.has("keys") and game.elapsed >= 40, "Mom task and clock continue while reading")
|
||||
click("close_messages")
|
||||
check(not game.viewing_messages and game.overlay == null, "Return to call")
|
||||
at(56)
|
||||
check(game.notifications.size() == 3, "Third push")
|
||||
at(76)
|
||||
check(game.notifications.size() == 4, "Fourth push")
|
||||
check(game.notifications[3].text == "Ты читала новости? Там переговоры, походу скоро все закончится", "Exact fourth text")
|
||||
await capture("phone-fourth-push")
|
||||
at(90)
|
||||
check(game.impacted and game.notifications.size() == 4, "No fifth message before impact")
|
||||
at(91.9)
|
||||
check(game.notifications.size() == 4, "Fifth push waits until after impact")
|
||||
game.show_ending()
|
||||
at(92)
|
||||
check(game.notifications.size() == 5 and game.notification_card.visible, "Fifth push over ending screen")
|
||||
check(game.notifications[4].text == "Кать в твой дом походу попали...", "Exact fifth text")
|
||||
await capture("phone-after-impact-push")
|
||||
check(game.notification_card.size.y < 300, "Toast stays compact across all five pushes")
|
||||
click("open_push")
|
||||
check(game.viewing_messages and game.notifications.size() == 5, "All messages readable after impact")
|
||||
await capture("phone-inbox")
|
||||
at(96)
|
||||
check(game.notifications.size() == 5, "No duplicate messages")
|
||||
click("close_messages")
|
||||
click("next")
|
||||
check(game.notifications.is_empty() and game.unread == 0 and not game.notification_card.visible, "Redial resets message history")
|
||||
# Use the production delayed transition once: a reader who opens the final
|
||||
# push must not have the inbox closed by the ending coroutine a moment later.
|
||||
start(2)
|
||||
game.qa_mode = false
|
||||
at(90)
|
||||
await game.get_tree().create_timer(2.2).timeout
|
||||
check(game.notifications.size() == 5 and game.notification_card.visible, "Production post-impact push arrives")
|
||||
click("open_push")
|
||||
await game.get_tree().create_timer(8.0).timeout
|
||||
check(game.viewing_messages and game.action_button("close_messages") != null, "Ending transition preserves open inbox")
|
||||
click("close_messages")
|
||||
check(game.action_button("next") != null, "Inbox returns to production ending")
|
||||
game.qa_mode = true
|
||||
if "--phone-real-time" in OS.get_cmdline_user_args():
|
||||
await realtime_check()
|
||||
var file := FileAccess.open(directory().path_join("phone-result.json"), FileAccess.WRITE)
|
||||
@@ -247,7 +303,7 @@ func run(target: Node) -> void:
|
||||
file.close()
|
||||
print("PHONE_QA ", "PASS" if errors.is_empty() else "FAIL", " checks=", checks, " route=", route_time, " errors=", errors)
|
||||
await render()
|
||||
for player in [game.voice, game.room, game.siren, game.effect, game.hum]:
|
||||
for player in [game.voice, game.room, game.siren, game.effect, game.hum, game.notification_sound]:
|
||||
player.stop()
|
||||
player.stream = null
|
||||
await game.get_tree().create_timer(0.1).timeout
|
||||
|
||||
Reference in New Issue
Block a user