修复画布编辑器测试会话隔离
Project CI / Repository checks (pull_request) Failing after 36s
Project CI / Frontend tests (pull_request) Successful in 1m16s
Project CI / Backend tests (pull_request) Failing after 3m24s
Project CI / Native shell tests (pull_request) Failing after 2m56s

在画布编辑器测试开始前清理 sessionStorage,避免项目快照跨用例污染

验证素材批量删除与关联图层清理测试在完整测试文件中稳定通过
This commit is contained in:
2026-07-22 09:47:09 +00:00
parent 2f8019c901
commit 7b9025b201
@@ -232,6 +232,7 @@ export function setupImageCanvasEditorViewTestLifecycle({
saveEditorProjectLayoutMock,
}: ImageCanvasEditorViewServiceMocks) {
beforeEach(() => {
window.sessionStorage.clear();
vi.spyOn(HTMLCanvasElement.prototype, 'getContext').mockReturnValue(null);
loadOrCreateRecentEditorProjectMock.mockImplementation(() =>
immediateAsync({