合并 master 并修复架构分支回归
合入 master 最新的认证、玩法契约与推荐页改动。 修复拼图草稿生成、推荐页下一关和公开详情访客试玩回归。 修复抓大鹅草稿试玩鉴权与首屏推荐详情测试入口。 补齐相关测试夹具、文档与团队记忆更新。
This commit is contained in:
@@ -599,7 +599,27 @@ test('platform public work detail flow resolves open strategy', () => {
|
||||
test('platform public work detail flow maps work summaries to detail entries', () => {
|
||||
const rpgEntry = buildRpgLibraryEntry();
|
||||
|
||||
expect(mapRpgGalleryCardToPublicWorkDetail(rpgEntry)).toBe(rpgEntry);
|
||||
expect(mapRpgGalleryCardToPublicWorkDetail(rpgEntry)).toEqual({
|
||||
ownerUserId: rpgEntry.ownerUserId,
|
||||
profileId: rpgEntry.profileId,
|
||||
publicWorkCode: rpgEntry.publicWorkCode,
|
||||
authorPublicUserCode: rpgEntry.authorPublicUserCode,
|
||||
visibility: rpgEntry.visibility,
|
||||
publishedAt: rpgEntry.publishedAt,
|
||||
updatedAt: rpgEntry.updatedAt,
|
||||
authorDisplayName: rpgEntry.authorDisplayName,
|
||||
worldName: rpgEntry.worldName,
|
||||
subtitle: rpgEntry.subtitle,
|
||||
summaryText: rpgEntry.summaryText,
|
||||
coverImageSrc: rpgEntry.coverImageSrc,
|
||||
themeMode: rpgEntry.themeMode,
|
||||
playableNpcCount: rpgEntry.playableNpcCount,
|
||||
landmarkCount: rpgEntry.landmarkCount,
|
||||
playCount: rpgEntry.playCount ?? 0,
|
||||
remixCount: rpgEntry.remixCount ?? 0,
|
||||
likeCount: rpgEntry.likeCount ?? 0,
|
||||
recentPlayCount7d: rpgEntry.recentPlayCount7d ?? 0,
|
||||
});
|
||||
expect(mapPuzzleWorkToPublicWorkDetail(buildPuzzleWork())).toMatchObject({
|
||||
sourceType: 'puzzle',
|
||||
workId: 'puzzle-work',
|
||||
@@ -838,9 +858,20 @@ test('platform public work detail flow resolves like intent', () => {
|
||||
expect(
|
||||
resolvePlatformPublicWorkLikeIntent(buildTypedEntry('match3d')),
|
||||
).toEqual({
|
||||
type: 'like-rpg-gallery',
|
||||
ownerUserId: 'user-1',
|
||||
profileId: 'match3d-profile',
|
||||
type: 'unsupported',
|
||||
errorMessage: '作品类型 match3d 暂不支持点赞。',
|
||||
});
|
||||
expect(
|
||||
resolvePlatformPublicWorkLikeIntent(buildTypedEntry('jump-hop')),
|
||||
).toEqual({
|
||||
type: 'unsupported',
|
||||
errorMessage: '作品类型 jump-hop 暂不支持点赞。',
|
||||
});
|
||||
expect(
|
||||
resolvePlatformPublicWorkLikeIntent(buildTypedEntry('wooden-fish')),
|
||||
).toEqual({
|
||||
type: 'unsupported',
|
||||
errorMessage: '作品类型 wooden-fish 暂不支持点赞。',
|
||||
});
|
||||
expect(
|
||||
resolvePlatformPublicWorkLikeIntent(buildTypedEntry('edutainment')),
|
||||
|
||||
Reference in New Issue
Block a user