Skip to content

test(mac): 展示测试改查真实编辑器分组,并补齐 usage-termination 的更新源文件 - #140

Merged
dancancer merged 1 commit into
release/0.9.0from
fix/mac-presentation-tools
Oct 27, 2026
Merged

dancancer merged 1 commit into
release/0.9.0from
fix/mac-presentation-tools

Conversation

@dancancer

Copy link
Copy Markdown
Owner

背景

release/0.9.0(031dc1c8,#138)和 #139 的 macOS full (arm64, all) 都在 RawLabMac/tests/presentation.sh --models-only 失败:

presentation/PresentationTests.swift:6: Fatal error: Photo tools expose each adjustment group exactly once

这个任务遇错即停,所以排在后面的 mac-viewing.sh、usage-model.sh、usage-termination.sh 一直没有运行。补跑后发现 usage-termination.sh 也无法编译(cannot find type 'DesktopUpdateController')。两处都是测试没跟上 0.9 的改动,产品代码没有问题。

改动

  • PresentationTests.swift:不再检查只有测试在用的 AdjustmentParameter.photoTools,改为遍历编辑器真实渲染的 EditorAdjustmentGroup.tools(AdjustmentDock 直接读取这套定义)。保留原有意图:vignette 和 grain 存在;除 strength、rawNoiseReduction、tint 外每个参数恰好出现一次;白平衡只有一个工具;统一降噪取代旧 RAW 降噪;每个工具都有系统图标。黑场、白场、鲜艳度、清晰度、去朦胧都有入口。
  • AdjustmentTypes.swift:删除已无引用的 photoTools。
  • usage-termination.sh:补上 MacGeometryWindowGuard 依赖的 5 个桌面更新源文件,与 update-install.sh 的清单一致。

界面行为不变。

验证

源码:本分支 HEAD,基于 origin/release/0.9.0 031dc1c。macOS(M3 Max,Xcode MacOSX SDK),核心链接已构建的本地核心。

依次运行 CI in_suite model 的 8 个入口和 control-groups.sh,全部通过:

  • bash RawLabMac/tests/control-groups.sh
  • bash RawLabMac/tests/batch-export.sh
  • bash Shared/tests/batch-selection.sh
  • bash RawLabMac/tests/batch-selection-model.sh
  • bash RawLabMac/tests/edit-model.sh
  • bash RawLabMac/tests/adjustment-history-model.sh
  • bash RawLabMac/tests/presentation.sh --models-only(含 mac-viewing.sh)
  • bash RawLabMac/tests/usage-model.sh
  • bash RawLabMac/tests/usage-termination.sh(default、rum、local 三种模式)

未覆盖

  • 未运行不带 --models-only 的完整 presentation.sh,其中的 mac-canvas-input.sh 会启动图形界面。
  • 只改 Mac 测试和一处无引用的静态列表,未在其他平台验证。

🤖 Generated with Claude Code

PresentationTests still read AdjustmentParameter.photoTools, a list only
the test used. After 0.9 added black point, white point, vibrance,
clarity and dehaze it no longer matched the editor, so the macOS model
job stopped there and skipped the suites after it.

The test now walks EditorAdjustmentGroup, the definition the adjustment
dock renders, and photoTools is removed. usage-termination.sh also
compiles the desktop update sources that MacGeometryWindowGuard needs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@dancancer
dancancer merged commit ad0d472 into release/0.9.0 Oct 27, 2026
10 checks passed
@dancancer
dancancer deleted the fix/mac-presentation-tools branch October 28, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant