fix: 修正画布媒体定位交互测试
Project CI / Repository checks (pull_request) Successful in 1m11s
Project CI / Backend tests (pull_request) Successful in 3m50s
Project CI / Native shell tests (pull_request) Successful in 12m38s
Project CI / Frontend tests (pull_request) Successful in 2m55s

按现役右键菜单交互打开生成媒体的画布定位入口
点击定位菜单项后验证视口平滑聚焦及画布选择状态保持不变
This commit is contained in:
2026-07-31 13:02:05 +08:00
parent db8ac27f0a
commit 65fabe51ab
@@ -2580,11 +2580,11 @@ describe('ImageCanvasEditorView', () => {
expect(
bigFishLayer.classList.contains('image-canvas-editor__layer--selected'),
).toBe(false);
fireEvent.click(
within(messageLog).getByRole('button', {
name: '在画布中定位Agent生成图片-1',
}),
fireEvent.contextMenu(
within(messageLog).getByRole('presentation'),
{ clientX: 30, clientY: 40 },
);
fireEvent.click(screen.getByRole('menuitem', { name: '在画布中定位' }));
expect(world.style.transform).toBe(initialTransform);
act(() => rafCallbacks.shift()?.(0));