refactor: 收口公开详情改造意图
This commit is contained in:
@@ -35,6 +35,7 @@ import {
|
||||
resolvePlatformPublicWorkDetailOpenDecision,
|
||||
resolvePlatformPublicWorkDetailOpenStrategy,
|
||||
resolvePlatformPublicWorkLikeIntent,
|
||||
resolvePlatformPublicWorkRemixIntent,
|
||||
resolveVisiblePuzzleDetailCoverCount,
|
||||
} from './platformPublicWorkDetailFlow';
|
||||
|
||||
@@ -695,6 +696,58 @@ test('platform public work detail flow resolves like intent', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('platform public work detail flow resolves remix intent', () => {
|
||||
expect(resolvePlatformPublicWorkRemixIntent(buildTypedEntry('big-fish'))).toEqual(
|
||||
{
|
||||
type: 'remix-big-fish',
|
||||
profileId: 'big-fish-profile',
|
||||
selectionStage: 'big-fish-result',
|
||||
},
|
||||
);
|
||||
expect(resolvePlatformPublicWorkRemixIntent(buildTypedEntry('puzzle'))).toEqual({
|
||||
type: 'remix-puzzle',
|
||||
profileId: 'puzzle-profile',
|
||||
selectionStage: 'puzzle-result',
|
||||
});
|
||||
expect(resolvePlatformPublicWorkRemixIntent(buildRpgEntry())).toEqual({
|
||||
type: 'remix-rpg-gallery',
|
||||
ownerUserId: 'user-1',
|
||||
profileId: 'rpg-profile',
|
||||
});
|
||||
expect(resolvePlatformPublicWorkRemixIntent(buildTypedEntry('match3d'))).toEqual(
|
||||
{
|
||||
type: 'unsupported',
|
||||
errorMessage: '抓大鹅作品改造将在后续版本开放。',
|
||||
},
|
||||
);
|
||||
expect(resolvePlatformPublicWorkRemixIntent(buildTypedEntry('square-hole'))).toEqual({
|
||||
type: 'unsupported',
|
||||
errorMessage: '方洞挑战作品改造将在后续版本开放。',
|
||||
});
|
||||
expect(resolvePlatformPublicWorkRemixIntent(buildTypedEntry('jump-hop'))).toEqual({
|
||||
type: 'unsupported',
|
||||
errorMessage: '跳一跳作品改造将在后续版本开放。',
|
||||
});
|
||||
expect(resolvePlatformPublicWorkRemixIntent(buildTypedEntry('wooden-fish'))).toEqual({
|
||||
type: 'unsupported',
|
||||
errorMessage: '敲木鱼作品改造将在后续版本开放。',
|
||||
});
|
||||
expect(resolvePlatformPublicWorkRemixIntent(buildTypedEntry('visual-novel'))).toEqual({
|
||||
type: 'unsupported',
|
||||
errorMessage: '视觉小说作品改造将在后续版本开放。',
|
||||
});
|
||||
expect(resolvePlatformPublicWorkRemixIntent(buildTypedEntry('edutainment'))).toEqual({
|
||||
type: 'unsupported',
|
||||
errorMessage: '宝贝识物作品改造将在创作链路接入后开放。',
|
||||
});
|
||||
expect(resolvePlatformPublicWorkRemixIntent(buildTypedEntry('bark-battle'))).toEqual(
|
||||
{
|
||||
type: 'unsupported',
|
||||
errorMessage: '汪汪声浪作品改造将在后续版本开放。',
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
test('platform public work detail flow resolves direct open decision', () => {
|
||||
const entry = buildTypedEntry('match3d', {
|
||||
publicWorkCode: ' M3D-001 ',
|
||||
|
||||
Reference in New Issue
Block a user