test(m71): converge the dev6 specs to the single size with condition waits; verify the receipt chains
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# M71 · DEV-6 服务/回执验证计划
|
||||
|
||||
> 权威:`GOAL_ABG_MVP_QUALITY.md` + AGENTS.md。前置:M68/DEV-6R UI 迁移、M70 清理。
|
||||
> Owner 指示(2026-09-14):"先不打包,先做 3",随后确认开 DEV-6 玩法/服务。
|
||||
|
||||
## Player-visible stopping point
|
||||
|
||||
解雇、合同返回、装备购买的**服务层语义**(回执、幂等、冲突、锁定、余额/库存/成长保持)
|
||||
由 `runtime/tests/dev6/*` 规格测试证明通过;全部规格测试与采集/安全测试在**单一 1280×720**
|
||||
下 green,且现行全部严格门不受影响。
|
||||
|
||||
## Measured facts (2026-09-14)
|
||||
|
||||
- `guild_contract_service.gd` 已含 `create_contract` / `hire_recruit` / `purchase_equipment` /
|
||||
`dismiss_recruit` / `return_contract`(含 `operation_id`/`intent_hash`/`receipt_hash` 幂等与冲突码)。
|
||||
- dev6 三个规格测试此前失败的真因是**测试卫生**:固定帧等待 + 旧多尺寸(844×390/EXPAND)
|
||||
→ 触摸落空 → 后续断言读空对象崩溃;并非服务缺失。
|
||||
- 采集/安全测试(4 个)同样带旧尺寸 fixture 与过期 marker 文本。
|
||||
|
||||
## Ordered steps
|
||||
|
||||
1. **M71-A(IN_PROGRESS)**:dev6 七个测试收敛到单尺寸 + 条件等待(`_wait_for_node` 含布局稳定帧);
|
||||
过期 marker 文本改为真实矩阵。规格语义不改。
|
||||
2. **M71-B**:源绑定验证(dev6 七个 + 现行全部严格门 + 入口/全流程)。
|
||||
3. **M71-C**:结清 `M65-I04`/`M68-I02`(回执链路已实现并验证),更新账本/checkpoint,推送。
|
||||
|
||||
## Acceptance checks
|
||||
|
||||
- `ABG_DEV6_ROSTER_OK`、`ABG_DEV6_RETURN_OK`、`ABG_DEV6_GROWTH_OK`、
|
||||
`ABG_M45_CONTRACT_RETURN_SAFETY_OK`、`ABG_M16_COMPANY_CAPTURE_OK`、
|
||||
`ABG_M45_CONTRACT_RETURN_CAPTURE_OK`、`ABG_DEV6_CAPTURE_OK` 各恰好一次
|
||||
- 现行门(m63/m53/m54/m52/m55/m66/m67/m68)与入口/全流程 marker 全部保持恰好一次
|
||||
- 无修改服务语义(只改测试;如暴露真缺陷则修产品并记录)
|
||||
|
||||
## Frozen scope
|
||||
|
||||
- 不改玩法数值、经济公式、存档结构;不加新系统。
|
||||
- 不重做页面视觉;单尺寸 1280×720。
|
||||
|
||||
## Issue register
|
||||
|
||||
| ID | 状态 | 内容 |
|
||||
| --- | --- | --- |
|
||||
| `M71-I01` | RESOLVED | 三个规格测试的失败真因 = 固定帧触摸 + 旧尺寸;服务层无缺失 |
|
||||
| `M71-I02` | OPEN | 采集测试 marker 文本中的旧矩阵字符串(本轮已改为 1280×720 真实值) |
|
||||
@@ -5,9 +5,8 @@ const SettingsStore = preload("res://entry/settings_store.gd")
|
||||
const DraftService = preload("res://entry/initial_company_draft_service.gd")
|
||||
const ContractService = preload("res://entry/guild_contract_service.gd")
|
||||
|
||||
# Single authoritative size (owner policy): two shipped locales at 1280x720.
|
||||
const FIXTURES := [
|
||||
{"width": 760, "height": 360, "locale": "zh_CN"},
|
||||
{"width": 844, "height": 390, "locale": "en"},
|
||||
{"width": 1280, "height": 720, "locale": "zh_CN"},
|
||||
{"width": 1280, "height": 720, "locale": "en"},
|
||||
]
|
||||
@@ -42,7 +41,7 @@ func run_capture() -> void:
|
||||
for state in STATES:
|
||||
await _capture_state(index, state, FIXTURES[index])
|
||||
if failures.is_empty():
|
||||
print("ABG_M16_COMPANY_CAPTURE_OK fixtures=%d states=roster,recruit_detail frames=%d matrix=760x360,844x390,1280x720:zh_CN,en:100 targets=authored44 renderer=normal" % [indexes.size(), indexes.size() * STATES.size()])
|
||||
print("ABG_M16_COMPANY_CAPTURE_OK fixtures=%d states=roster,recruit_detail frames=%d matrix=1280x720:zh_CN,en:100 targets=authored44 renderer=normal" % [indexes.size(), indexes.size() * STATES.size()])
|
||||
quit(0)
|
||||
else:
|
||||
for failure in failures:
|
||||
|
||||
@@ -56,12 +56,11 @@ func verify_dismissal(company: Dictionary) -> void:
|
||||
var settings := _settings()
|
||||
var shell := _shell(settings)
|
||||
shell.show_roster(company)
|
||||
await _frames(3)
|
||||
var dismiss := shell.find_child("RosterDismiss", true, false) as Button
|
||||
var dismiss := await _wait_for_node(shell, "RosterDismiss") as Button
|
||||
expect(dismiss != null and not dismiss.disabled, "Roster enables dismissal while two live members remain")
|
||||
await _touch(dismiss)
|
||||
expect(shell.current_screen == "dismissal_review" and shell.find_child("DismissalReviewConsequence", true, false) != null and shell.find_child("DismissalReviewEquipment", true, false) != null, "Dismissal review names consequence and equipment return")
|
||||
await _touch(shell.find_child("DismissalReviewConfirm", true, false))
|
||||
expect(await _wait_for_node(shell, "DismissalReviewConsequence") != null and shell.find_child("DismissalReviewEquipment", true, false) != null, "Dismissal review names consequence and equipment return")
|
||||
await _touch(await _wait_for_node(shell, "DismissalReviewConfirm"))
|
||||
await _frames(3)
|
||||
var loaded: Dictionary = _draft_service().load_company()
|
||||
expect(loaded.ok and loaded.company.owned_recruits.size() == 1, "Dismissal removes exactly one Recruit")
|
||||
@@ -76,8 +75,7 @@ func verify_dismissal(company: Dictionary) -> void:
|
||||
var conflict: Dictionary = _contract_service().dismiss_recruit(operation_id, String(loaded.company.owned_recruits[0].recruit_id))
|
||||
expect(not conflict.ok and conflict.code == "DISMISS_OPERATION_CONFLICT", "Dismissal operation conflict names changed target")
|
||||
shell.show_roster(loaded.company)
|
||||
await _frames(3)
|
||||
var final_dismiss := shell.find_child("RosterDismiss", true, false) as Button
|
||||
var final_dismiss := await _wait_for_node(shell, "RosterDismiss") as Button
|
||||
expect(final_dismiss != null and final_dismiss.disabled and "last member" in String(final_dismiss.tooltip_text).to_lower(), "Roster disables the final-member dismissal with a reason")
|
||||
shell.queue_free()
|
||||
await _timer_seconds(0.2)
|
||||
@@ -91,20 +89,18 @@ func verify_contract_return(company: Dictionary) -> void:
|
||||
var settings := _settings()
|
||||
var shell := _shell(settings)
|
||||
shell.show_market(company)
|
||||
await _frames(3)
|
||||
var return_button := shell.find_child("MarketReturnContract", true, false) as Button
|
||||
var return_button := await _wait_for_node(shell, "MarketReturnContract") as Button
|
||||
expect(return_button != null and not return_button.disabled, "Market exposes a real Contract Return action")
|
||||
await _touch(return_button)
|
||||
expect(shell.current_screen == "contract_return_review" and shell.find_child("ContractReturnWarning", true, false) != null, "Contract Return review explicitly distinguishes voluntary withdrawal")
|
||||
expect(await _wait_for_node(shell, "ContractReturnWarning") != null, "Contract Return review explicitly distinguishes voluntary withdrawal")
|
||||
expect(shell.get_viewport().gui_get_focus_owner() == shell.find_child("ContractReturnCancel", true, false), "Contract Return review defaults focus to Cancel")
|
||||
var cancel_hash := String(_draft_service().load_company().company.company_hash)
|
||||
await _touch(shell.find_child("ContractReturnCancel", true, false))
|
||||
await _touch(await _wait_for_node(shell, "ContractReturnCancel"))
|
||||
var cancel_state: Dictionary = _draft_service().load_company()
|
||||
expect(shell.current_screen == "market" and cancel_state.ok and String(cancel_state.company.company_hash) == cancel_hash and cancel_hash == before_hash, "Cancel returns to Market without Save mutation")
|
||||
await _touch(shell.find_child("MarketReturnContract", true, false))
|
||||
await _touch(shell.find_child("ContractReturnConfirm", true, false))
|
||||
await _frames(3)
|
||||
expect(shell.current_screen == "guild_handoff" and shell.find_child("GuildRosterButton", true, false) != null, "Confirmed Contract Return reaches Guild")
|
||||
await _touch(await _wait_for_node(shell, "MarketReturnContract"))
|
||||
await _touch(await _wait_for_node(shell, "ContractReturnConfirm"))
|
||||
expect(await _wait_for_node(shell, "GuildRosterButton") != null, "Confirmed Contract Return reaches Guild")
|
||||
var loaded: Dictionary = _draft_service().load_company()
|
||||
expect(loaded.ok and String(loaded.company.active_contract.status) == "returned", "Contract Return persists returned status")
|
||||
if loaded.ok:
|
||||
@@ -175,8 +171,10 @@ func _settings() -> Dictionary:
|
||||
|
||||
func _shell(settings: Dictionary) -> Control:
|
||||
root.content_scale_mode = Window.CONTENT_SCALE_MODE_CANVAS_ITEMS
|
||||
root.content_scale_aspect = Window.CONTENT_SCALE_ASPECT_EXPAND
|
||||
root.size = Vector2i(844, 390)
|
||||
# Single target size (owner policy).
|
||||
root.content_scale_aspect = Window.CONTENT_SCALE_ASPECT_KEEP
|
||||
root.content_scale_size = Vector2i(1280, 720)
|
||||
root.size = Vector2i(1280, 720)
|
||||
var shell := EntryShell.new()
|
||||
shell.auto_start = false
|
||||
shell.initial_company_service.path = DRAFT_PATH
|
||||
@@ -207,6 +205,18 @@ func _owned_ids(company: Dictionary) -> Array[String]:
|
||||
return ids
|
||||
|
||||
|
||||
func _wait_for_node(parent: Node, node_name: String, max_frames := 600) -> Node:
|
||||
for _i in range(max_frames):
|
||||
var node := parent.find_child(node_name, true, false)
|
||||
if node != null:
|
||||
# Let the container/layout settle before the caller reads rects or
|
||||
# touches the node (fixed frame budgets were the old flake source).
|
||||
await _frames(2)
|
||||
return node
|
||||
await process_frame
|
||||
return null
|
||||
|
||||
|
||||
func _touch(control: Control) -> void:
|
||||
if control == null:
|
||||
expect(false, "touch target exists")
|
||||
|
||||
@@ -41,8 +41,10 @@ func verify_equipment_ui(company: Dictionary) -> void:
|
||||
settings.locale = "en"
|
||||
settings.text_scale = 1.3
|
||||
root.content_scale_mode = Window.CONTENT_SCALE_MODE_CANVAS_ITEMS
|
||||
root.content_scale_aspect = Window.CONTENT_SCALE_ASPECT_EXPAND
|
||||
root.size = Vector2i(844, 390)
|
||||
# Single target size (owner policy).
|
||||
root.content_scale_aspect = Window.CONTENT_SCALE_ASPECT_KEEP
|
||||
root.content_scale_size = Vector2i(1280, 720)
|
||||
root.size = Vector2i(1280, 720)
|
||||
var shell := EntryShell.new()
|
||||
shell.auto_start = false
|
||||
shell.initial_company_service.path = DRAFT_PATH
|
||||
@@ -53,7 +55,7 @@ func verify_equipment_ui(company: Dictionary) -> void:
|
||||
shell.setup_draft = settings.duplicate(true)
|
||||
shell.show_market(company)
|
||||
shell.set_market_category("equipment")
|
||||
await _frames(3)
|
||||
await _wait_for_node(shell, "MarketLayout")
|
||||
var contract: Dictionary = company.active_contract
|
||||
var offer: Dictionary = {}
|
||||
for candidate in contract.market_board.equipment_offers:
|
||||
@@ -64,15 +66,14 @@ func verify_equipment_ui(company: Dictionary) -> void:
|
||||
return
|
||||
var offer_id := String(offer.offer_id)
|
||||
shell.select_market_offer("equipment", offer_id)
|
||||
await _frames(3)
|
||||
expect(shell.find_child("MarketReviewEquipment", true, false) != null, "Market exposes Equipment review")
|
||||
await _touch(shell.find_child("MarketReviewEquipment", true, false))
|
||||
expect(shell.current_screen == "equipment_review" and shell.find_child("EquipmentReviewEffect", true, false) != null, "Equipment review exposes sourced effect and tradeoff")
|
||||
expect(await _wait_for_node(shell, "MarketReviewEquipment") != null, "Market exposes Equipment review")
|
||||
await _touch(await _wait_for_node(shell, "MarketReviewEquipment"))
|
||||
expect(await _wait_for_node(shell, "EquipmentReviewEffect") != null, "Equipment review exposes sourced effect and tradeoff")
|
||||
var first_recruit_id := String(company.owned_recruits[0].recruit_id)
|
||||
var wearer := shell.find_child("EquipmentEquipRecruit%s" % first_recruit_id, true, false) as Button
|
||||
var wearer := await _wait_for_node(shell, "EquipmentEquipRecruit%s" % first_recruit_id) as Button
|
||||
expect(wearer != null and not wearer.disabled, "Equipment review exposes a valid Recruit wearer")
|
||||
await _touch(wearer)
|
||||
expect(shell.current_screen == "market" and shell.find_child("MarketLayout", true, false) != null, "Equipment commit returns to Market")
|
||||
expect(await _wait_for_node(shell, "MarketLayout") != null, "Equipment commit returns to Market")
|
||||
var loaded: Dictionary = _draft_service().load_company()
|
||||
expect(loaded.ok, "Company reloads after equipment commit")
|
||||
if not loaded.ok:
|
||||
@@ -159,6 +160,18 @@ func _recruit_by_id(company: Dictionary, recruit_id: String) -> Dictionary:
|
||||
return {}
|
||||
|
||||
|
||||
func _wait_for_node(parent: Node, node_name: String, max_frames := 600) -> Node:
|
||||
for _i in range(max_frames):
|
||||
var node := parent.find_child(node_name, true, false)
|
||||
if node != null:
|
||||
# Let the container/layout settle before the caller reads rects or
|
||||
# touches the node (fixed frame budgets were the old flake source).
|
||||
await _frames(2)
|
||||
return node
|
||||
await process_frame
|
||||
return null
|
||||
|
||||
|
||||
func _touch(control: Control) -> void:
|
||||
if control == null:
|
||||
expect(false, "touch target exists")
|
||||
|
||||
@@ -5,9 +5,8 @@ const SettingsStore = preload("res://entry/settings_store.gd")
|
||||
const DraftService = preload("res://entry/initial_company_draft_service.gd")
|
||||
const ContractService = preload("res://entry/guild_contract_service.gd")
|
||||
|
||||
# Single authoritative size (owner policy): two shipped locales at 1280x720.
|
||||
const FIXTURES := [
|
||||
{"width": 760, "height": 360, "locale": "zh_CN", "scale": 1.0},
|
||||
{"width": 844, "height": 390, "locale": "en", "scale": 1.0},
|
||||
{"width": 1280, "height": 720, "locale": "zh_CN", "scale": 1.0},
|
||||
{"width": 1280, "height": 720, "locale": "en", "scale": 1.0},
|
||||
]
|
||||
@@ -46,7 +45,7 @@ func run_capture() -> void:
|
||||
for state in STATES:
|
||||
await _capture_state(index, String(state), fixture)
|
||||
if failures.is_empty():
|
||||
print("ABG_M45_CONTRACT_RETURN_CAPTURE_OK frames=%d states=market,contract_return_review,guild_returned matrix=760x360,844x390,1280x720 locales=zh_CN,en text_100=true layout=inside targets=44 overlap=false clipping=false parsed_touch=covered_by_safety renderer=normal" % [indexes.size() * STATES.size()])
|
||||
print("ABG_M45_CONTRACT_RETURN_CAPTURE_OK frames=%d states=market,contract_return_review,guild_returned matrix=1280x720 locales=zh_CN,en text_100=true layout=inside targets=44 overlap=false clipping=false parsed_touch=covered_by_safety renderer=normal" % [indexes.size() * STATES.size()])
|
||||
quit(0)
|
||||
else:
|
||||
for failure in failures:
|
||||
|
||||
@@ -70,14 +70,13 @@ func verify_cancel_no_mutation() -> void:
|
||||
var before: Dictionary = _draft_service().load_company()
|
||||
var shell := _shell()
|
||||
shell.show_market(company)
|
||||
await _frames(3)
|
||||
var return_button := shell.find_child("MarketReturnContract", true, false) as Button
|
||||
var return_button := await _wait_for_node(shell, "MarketReturnContract") as Button
|
||||
expect(return_button != null and not return_button.disabled, "cancel fixture exposes an enabled return command")
|
||||
if return_button == null:
|
||||
shell.queue_free()
|
||||
return
|
||||
await _touch(return_button)
|
||||
var cancel := shell.find_child("ContractReturnCancel", true, false) as Button
|
||||
var cancel := await _wait_for_node(shell, "ContractReturnCancel") as Button
|
||||
expect(shell.current_screen == "contract_return_review" and cancel != null, "return command opens the existing review")
|
||||
if cancel != null:
|
||||
await _touch(cancel)
|
||||
@@ -203,8 +202,10 @@ func _contract_service() -> RefCounted:
|
||||
|
||||
func _shell() -> Control:
|
||||
root.content_scale_mode = Window.CONTENT_SCALE_MODE_CANVAS_ITEMS
|
||||
root.content_scale_aspect = Window.CONTENT_SCALE_ASPECT_EXPAND
|
||||
root.size = Vector2i(844, 390)
|
||||
# Single authoritative size (owner policy).
|
||||
root.content_scale_aspect = Window.CONTENT_SCALE_ASPECT_KEEP
|
||||
root.content_scale_size = Vector2i(1280, 720)
|
||||
root.size = Vector2i(1280, 720)
|
||||
var shell := EntryShell.new()
|
||||
shell.auto_start = false
|
||||
shell.initial_company_service.path = DRAFT_PATH
|
||||
@@ -235,6 +236,16 @@ func _rehash_company(company: Dictionary) -> void:
|
||||
company.company_hash = _hash(company)
|
||||
|
||||
|
||||
func _wait_for_node(parent: Node, node_name: String, max_frames := 600) -> Node:
|
||||
for _i in range(max_frames):
|
||||
var node := parent.find_child(node_name, true, false)
|
||||
if node != null:
|
||||
await _frames(2)
|
||||
return node
|
||||
await process_frame
|
||||
return null
|
||||
|
||||
|
||||
func _touch(control: Control) -> void:
|
||||
if control == null:
|
||||
expect(false, "touch target exists")
|
||||
|
||||
@@ -41,8 +41,10 @@ func verify_roster(company: Dictionary) -> void:
|
||||
settings.locale = "en"
|
||||
settings.text_scale = 1.3
|
||||
root.content_scale_mode = Window.CONTENT_SCALE_MODE_CANVAS_ITEMS
|
||||
root.content_scale_aspect = Window.CONTENT_SCALE_ASPECT_EXPAND
|
||||
root.size = Vector2i(844, 390)
|
||||
# Single target size (owner policy).
|
||||
root.content_scale_aspect = Window.CONTENT_SCALE_ASPECT_KEEP
|
||||
root.content_scale_size = Vector2i(1280, 720)
|
||||
root.size = Vector2i(1280, 720)
|
||||
var shell := EntryShell.new()
|
||||
shell.auto_start = false
|
||||
shell.initial_company_service.path = DRAFT_PATH
|
||||
@@ -52,29 +54,32 @@ func verify_roster(company: Dictionary) -> void:
|
||||
shell.settings = settings
|
||||
shell.setup_draft = settings.duplicate(true)
|
||||
shell.show_guild_handoff(company)
|
||||
await _frames(3)
|
||||
var roster_entry := shell.find_child("GuildRosterButton", true, false) as Button
|
||||
var roster_entry := await _wait_for_node(shell, "GuildRosterButton") as Button
|
||||
expect(roster_entry != null and not roster_entry.disabled, "Guild exposes a real Roster entry")
|
||||
await _touch(roster_entry)
|
||||
expect(shell.current_screen == "roster" and shell.find_child("RosterList", true, false) != null and shell.find_child("RosterDetail", true, false) != null, "Roster renders list and selected detail")
|
||||
expect(await _wait_for_node(shell, "RosterList") != null and shell.find_child("RosterDetail", true, false) != null, "Roster renders list and selected detail")
|
||||
var member_buttons := 0
|
||||
for child in shell.find_child("RosterList", true, false).get_children():
|
||||
if child is Button:
|
||||
member_buttons += 1
|
||||
var roster_list := shell.find_child("RosterList", true, false)
|
||||
if roster_list == null:
|
||||
expect(false, "RosterList exists for member count")
|
||||
else:
|
||||
for child in roster_list.get_children():
|
||||
if child is Button:
|
||||
member_buttons += 1
|
||||
expect(member_buttons == 4, "Roster renders four stable member controls")
|
||||
var dismiss := shell.find_child("RosterDismiss", true, false) as Button
|
||||
var dismiss := await _wait_for_node(shell, "RosterDismiss") as Button
|
||||
expect(dismiss != null and not dismiss.disabled and not String(dismiss.tooltip_text).is_empty(), "Roster dismissal is enabled with a real consequence review")
|
||||
var first_id := String(company.owned_recruits[0].recruit_id)
|
||||
await _touch(shell.find_child("RosterMember0", true, false))
|
||||
await _touch(await _wait_for_node(shell, "RosterMember0"))
|
||||
expect(shell.roster_selected_recruit_id == first_id, "Roster selection changes selected stable ID")
|
||||
await _touch(shell.find_child("RosterOpenDetail", true, false))
|
||||
expect(shell.current_screen == "recruit_detail" and shell.find_child("RecruitDetailProfession", true, false) != null and shell.find_child("RecruitDetailTrait", true, false) != null, "Recruit Detail names Profession and Trait")
|
||||
await _touch(await _wait_for_node(shell, "RosterOpenDetail"))
|
||||
expect(await _wait_for_node(shell, "RecruitDetailProfession") != null and shell.find_child("RecruitDetailTrait", true, false) != null, "Recruit Detail names Profession and Trait")
|
||||
expect(shell.find_child("RecruitDetailGrowth", true, false) != null and shell.find_child("RecruitDetailEquipment", true, false) != null and shell.find_child("RecruitDetailHistory", true, false) != null, "Recruit Detail names level/XP, equipment and history")
|
||||
var detail_dismiss := shell.find_child("RecruitDetailDismiss", true, false) as Button
|
||||
var detail_dismiss := await _wait_for_node(shell, "RecruitDetailDismiss") as Button
|
||||
expect(detail_dismiss != null and not detail_dismiss.disabled and not String(detail_dismiss.tooltip_text).is_empty(), "Recruit Detail dismissal exposes a real consequence review")
|
||||
await _touch(shell.find_child("RecruitDetailBackRoster", true, false))
|
||||
await _touch(await _wait_for_node(shell, "RecruitDetailBackRoster"))
|
||||
expect(shell.current_screen == "roster", "Back returns to Roster")
|
||||
await _touch(shell.find_child("RosterBackGuild", true, false))
|
||||
await _touch(await _wait_for_node(shell, "RosterBackGuild"))
|
||||
expect(shell.current_screen == "guild_handoff", "Roster Back returns to Guild")
|
||||
shell.queue_free()
|
||||
await _timer_seconds(0.2)
|
||||
@@ -87,7 +92,7 @@ func verify_roster(company: Dictionary) -> void:
|
||||
resumed.settings = settings
|
||||
resumed.setup_draft = settings.duplicate(true)
|
||||
resumed._open_company_destination(company)
|
||||
await _frames(3)
|
||||
await _wait_for_node(resumed, "MarketLayout")
|
||||
expect(resumed.current_screen == "market", "restart preserves the Company destination without inventing roster state")
|
||||
resumed.queue_free()
|
||||
await _timer_seconds(0.2)
|
||||
@@ -122,6 +127,18 @@ func _contract_service() -> RefCounted:
|
||||
return service
|
||||
|
||||
|
||||
func _wait_for_node(parent: Node, node_name: String, max_frames := 600) -> Node:
|
||||
for _i in range(max_frames):
|
||||
var node := parent.find_child(node_name, true, false)
|
||||
if node != null:
|
||||
# Let the container/layout settle before the caller reads rects or
|
||||
# touches the node (fixed frame budgets were the old flake source).
|
||||
await _frames(2)
|
||||
return node
|
||||
await process_frame
|
||||
return null
|
||||
|
||||
|
||||
func _touch(control: Control) -> void:
|
||||
if control == null:
|
||||
expect(false, "touch target exists")
|
||||
|
||||
@@ -5,9 +5,8 @@ const SettingsStore = preload("res://entry/settings_store.gd")
|
||||
const DraftService = preload("res://entry/initial_company_draft_service.gd")
|
||||
const ContractService = preload("res://entry/guild_contract_service.gd")
|
||||
|
||||
# Single authoritative size (owner policy): two shipped locales, both scales.
|
||||
const FIXTURES := [
|
||||
{"width": 760, "height": 360, "locale": "zh_CN", "scale": 1.0},
|
||||
{"width": 844, "height": 390, "locale": "en", "scale": 1.3},
|
||||
{"width": 1280, "height": 720, "locale": "zh_CN", "scale": 1.0},
|
||||
{"width": 1280, "height": 720, "locale": "en", "scale": 1.3},
|
||||
]
|
||||
@@ -49,7 +48,7 @@ func run_capture() -> void:
|
||||
for state in STATES:
|
||||
await _capture_state(index, String(state), fixture)
|
||||
if failures.is_empty():
|
||||
print("ABG_DEV6_CAPTURE_OK frames=%d states=market_ready,equipment_review,equipment_equipped,roster,recruit_detail,contract_return_review matrix=760x360,844x390,1280x720:zh_CN,en:100,130 layout=inside renderer=normal" % [indexes.size() * STATES.size()])
|
||||
print("ABG_DEV6_CAPTURE_OK frames=%d states=market_ready,equipment_review,equipment_equipped,roster,recruit_detail,contract_return_review matrix=1280x720:zh_CN,en:100,130 layout=inside renderer=normal" % [indexes.size() * STATES.size()])
|
||||
quit(0)
|
||||
else:
|
||||
for failure in failures:
|
||||
|
||||
Reference in New Issue
Block a user