iter54-卡2:营地交互修复批(开局隐藏点收一处 _start_adventure+确认弹窗按钮位次镜像确认→次→取消+营地顶栏可见栏体 camp_hud_band_surface 单参出口 CAMP_HUD_BAND×0.80)——对照表 R1-R8 全绿(探针 R1/R2/R4 落点断言/confirm_dialog_test 七断言/系统测试 R5 五钉 76 检查 0 失败/R6 WCAG 4.29:1),S13 ui_kit 基线 23→24 随卡预申报修订
This commit is contained in:
1 parent
96123978c1
commit
4c424af358
12 files changed
+278
-17
No files matched your search
@@ -44,6 +44,7 @@ func _split_tail() -> void:
|
||||
await _smoke_run_lifecycle()
|
||||
await _smoke_sim_guards()
|
||||
await _smoke_lifecycle_matrix()
|
||||
await _smoke_camp_hud_band()
|
||||
else:
|
||||
check(false, "V2/V3 前置:autoload 链未就绪(ConfigDB/SaveManager)")
|
||||
print("[system_test] 摘要:%d 项检查,%d 项失败" % [_checks, _failures])
|
||||
@@ -603,4 +604,49 @@ func _smoke_lifecycle_matrix() -> void:
|
||||
for p in ["user://smoke_lifecycle.json", "user://smoke_lifecycle.json.tmp",
|
||||
"user://smoke_lifecycle_resume.json", "user://smoke_lifecycle_resume.json.tmp"]:
|
||||
if FileAccess.file_exists(p):
|
||||
DirAccess.remove_absolute(p)
|
||||
DirAccess.remove_absolute(p)
|
||||
|
||||
|
||||
func _smoke_camp_hud_band() -> void:
|
||||
# oracle: design/gdd/ux/camp.md:41 (营地顶栏栏体定值与落座——几何/色值/吃点击五钉组)
|
||||
print("--- 营地交互修复批 T3 顶栏栏体(R5:色值/铺满/不吃点击/首子件/徽章落座)---")
|
||||
var main: Node = load("res://presentation/main.tscn").instantiate()
|
||||
root.add_child(main)
|
||||
await process_frame
|
||||
await process_frame
|
||||
main._camp_pres.open_camp() # 营地屏 boot 态为隐——先开营地(装配链 main_ui_build→camp_scene_view 落座)
|
||||
for i in range(3):
|
||||
await process_frame # 排版帧(容器重排在途读数不可信)
|
||||
var band: Control = main.ui.modals.camp.scene.hud_band
|
||||
check(band != null and band.is_inside_tree(), "R5 前置:顶栏件经装配链在树(camp_scene_view.hud_band 公开句柄)")
|
||||
if band == null:
|
||||
main.queue_free()
|
||||
await process_frame
|
||||
return
|
||||
var badge_min: float = band.get_child(band.get_child_count() - 1).get_child(0).get_combined_minimum_size().y if band.get_child_count() > 0 else -1.0
|
||||
print("[system_test] 徽章 get_combined_minimum_size().y 实测 = %s(T3.0 前置读数——48=顶格落座前提)" % str(badge_min))
|
||||
check(band.get_child_count() >= 2 and band.get_child(0) is ColorRect,
|
||||
"R5④ 栏体色面是顶栏件第一个子节点(子节点序=绘制序——色面先入不盖徽章)")
|
||||
if band.get_child_count() >= 2 and band.get_child(0) is ColorRect:
|
||||
var surface: ColorRect = band.get_child(0)
|
||||
check(String(surface.color.to_html(true)) == "6e4526cc",
|
||||
"R5① 栏体色=#6E4526×α0.80(to_html 字面编码——禁浮点分量直等)〔营地交互批 V4〕")
|
||||
var band_rect: Rect2 = band.get_global_rect()
|
||||
var surf_rect: Rect2 = surface.get_global_rect()
|
||||
print("[system_test] 顶栏件实测 get_global_rect=%s、栏体=%s(R5② 承重=ui_registry FULL_RECT 注册)" % [band_rect, surf_rect])
|
||||
check(absf(surf_rect.size.x - band_rect.size.x) < 0.51 and absf(surf_rect.size.y - band_rect.size.y) < 0.51
|
||||
and absf(surf_rect.size.y - 48.0) < 0.51,
|
||||
"R5② 栏体铺满宿主且高 48(全局矩形等值)〔营地交互批 V4〕")
|
||||
check(surface.mouse_filter == Control.MOUSE_FILTER_IGNORE,
|
||||
"R5③ 栏体不吃点击(MOUSE_FILTER_IGNORE——顶排物件命中区不受阻)〔营地交互批 V4〕")
|
||||
var dock: Control = band.get_child(band.get_child_count() - 1)
|
||||
var badge: Control = dock.get_child(0) if dock.get_child_count() > 0 else null
|
||||
check(badge != null,
|
||||
"R5⑤ 前置:徽章经右对齐容器在座(dock 尾子件)")
|
||||
if badge != null:
|
||||
var brect: Rect2 = badge.get_global_rect()
|
||||
check(absf(brect.position.y - band_rect.position.y) < 0.51
|
||||
and absf(brect.end.x - (band_rect.end.x - 12.0)) < 0.51,
|
||||
"R5⑤ 徽章顶格右位(y=栏顶格、end.x=栏右缘−12——全局矩形不与局部 position 混写)〔营地交互批 V4〕")
|
||||
main.queue_free()
|
||||
await process_frame
|
||||
Reference in new issue
Block a user