From 7b9025b20154e3d0988d8908abbf56cbdd09d137 Mon Sep 17 00:00:00 2001 From: Linghong Date: Wed, 22 Jul 2026 09:47:09 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=BB=E5=B8=83=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=E6=B5=8B=E8=AF=95=E4=BC=9A=E8=AF=9D=E9=9A=94?= =?UTF-8?q?=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在画布编辑器测试开始前清理 sessionStorage,避免项目快照跨用例污染 验证素材批量删除与关联图层清理测试在完整测试文件中稳定通过 --- src/components/image-editor/ImageCanvasEditorView.test-utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/image-editor/ImageCanvasEditorView.test-utils.ts b/src/components/image-editor/ImageCanvasEditorView.test-utils.ts index 7fe6f64c8..2d5082721 100644 --- a/src/components/image-editor/ImageCanvasEditorView.test-utils.ts +++ b/src/components/image-editor/ImageCanvasEditorView.test-utils.ts @@ -232,6 +232,7 @@ export function setupImageCanvasEditorViewTestLifecycle({ saveEditorProjectLayoutMock, }: ImageCanvasEditorViewServiceMocks) { beforeEach(() => { + window.sessionStorage.clear(); vi.spyOn(HTMLCanvasElement.prototype, 'getContext').mockReturnValue(null); loadOrCreateRecentEditorProjectMock.mockImplementation(() => immediateAsync({