test(motion): 高度过渡采样容忍丢帧 - #2
Merged
Merged
Conversation
逐帧采样在高负载机器上会被浏览器合并成两三帧,断言因此偶发失败 (CI 上复现过一次,重跑即过)。改为比较两次连接方式切换的采样,取中间帧 最多的一次判定,语义仍是“过渡连续、不是瞬间跳变”。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
做了什么
model form changes height smoothly用逐帧高度采样断言“过渡连续”。高负载机器上浏览器会合并动画帧,单次采样可能只拿到两三帧,断言因此偶发失败——本次 PR 的 CI 上复现过一次,重跑即通过。改为比较两次连接方式切换(OpenAI Responses ↔ OpenAI Chat Completions)的采样,只要有一次拿到足够多的中间帧就通过;两种方式都拿不到才判失败。语义不变:过渡必须连续,不能瞬间跳变。
关联需求
无(测试稳定性)。
验证
pnpm exec playwright test tests/motion.spec.ts本地 7 项通过已知限制
无。