修复推荐页滑动切换回弹

为推荐页滑动提交后的 rail 复位增加无过渡 resetting 状态

补充推荐滑动状态模型测试覆盖 resetting 类名

补齐推荐页交互测试中的小程序运行态 mock
This commit is contained in:
kdletters
2026-06-13 20:01:02 +08:00
parent 5a1c1c88dd
commit bdf99468e7
4 changed files with 25 additions and 0 deletions

View File

@@ -200,6 +200,7 @@ const authServiceMocks = vi.hoisted(() => ({
token: 'runtime-guest-token',
expiresAt: '2099-01-01T00:00:00.000Z',
})),
isWechatMiniProgramWebViewRuntime: vi.fn(() => false),
getPublicAuthUserByCode: vi.fn(
async (publicUserCode: string): Promise<PublicUserSummary> => ({
id: `public-user-${publicUserCode}`,
@@ -222,6 +223,8 @@ const authServiceMocks = vi.hoisted(() => ({
vi.mock('../../services/authService', () => ({
ensureRuntimeGuestToken: authServiceMocks.ensureRuntimeGuestToken,
isWechatMiniProgramWebViewRuntime:
authServiceMocks.isWechatMiniProgramWebViewRuntime,
getPublicAuthUserByCode: authServiceMocks.getPublicAuthUserByCode,
getPublicAuthUserById: authServiceMocks.getPublicAuthUserById,
}));