From d9431b51da6ea5bbbd047aed7db26f0cead24ca8 Mon Sep 17 00:00:00 2001 From: Linghong Date: Thu, 17 Sep 2026 10:05:22 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=94=E7=A6=BB=E5=88=9B=E4=BD=9C=E4=B8=BB?= =?UTF-8?q?=E9=A1=B5=E8=B5=84=E6=BA=90=E9=A2=84=E8=A7=88=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 每个用例前后清理签名资源地址缓存,避免共享调度状态影响活动图片断言 --- src/components/creation-home/CreationLandingView.test.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/creation-home/CreationLandingView.test.tsx b/src/components/creation-home/CreationLandingView.test.tsx index d1f0f2b4e..656ef8f46 100644 --- a/src/components/creation-home/CreationLandingView.test.tsx +++ b/src/components/creation-home/CreationLandingView.test.tsx @@ -12,6 +12,7 @@ import userEvent from '@testing-library/user-event'; import { type ContextType, startTransition, Suspense } from 'react'; import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; +import { clearSignedAssetReadUrlCache } from '../../services/assetReadUrlService'; import { AuthUiContext } from '../auth/AuthUiContext'; import { CreationLandingView } from './CreationLandingView'; @@ -153,6 +154,7 @@ function SuspendAfterLandingRender({ active }: { active: boolean }) { describe('CreationLandingView', () => { beforeEach(() => { + clearSignedAssetReadUrlCache(); listPublicEditorProjectResourcesMock.mockResolvedValue([]); }); @@ -161,6 +163,7 @@ describe('CreationLandingView', () => { listPublicEditorProjectResourcesMock.mockReset(); createEditorProjectMock.mockReset(); toggleEditorShowcaseAssetLikeMock.mockReset(); + clearSignedAssetReadUrlCache(); vi.restoreAllMocks(); vi.unstubAllGlobals(); });