合并主分支素材库多选更新
合入素材库多选操作与批量导出更新 保留画布生成配方分支改动并解决冲突
This commit is contained in:
@@ -21,6 +21,12 @@ import {
|
||||
} from './ImageCanvasGenerationModel';
|
||||
|
||||
describe('ImageCanvasExportModel', () => {
|
||||
it('formats export timestamps through seconds', () => {
|
||||
expect(formatExportDate(new Date(2026, 6, 27, 9, 8, 7))).toBe(
|
||||
'20260727-090807',
|
||||
);
|
||||
});
|
||||
|
||||
it('builds a real animated GIF preview from sequence frames', () => {
|
||||
const gifBytes = buildAnimatedGifPreviewBytes({
|
||||
width: 2,
|
||||
@@ -68,8 +74,8 @@ describe('ImageCanvasExportModel', () => {
|
||||
'角色 草图',
|
||||
);
|
||||
expect(sanitizeExportFilePart(' ', 'fallback')).toBe('fallback');
|
||||
expect(formatExportDate(new Date('2026-06-17T01:02:03.000Z'))).toBe(
|
||||
'20260617',
|
||||
expect(formatExportDate(new Date(2026, 5, 17, 9, 2, 3))).toBe(
|
||||
'20260617-090203',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -104,7 +110,26 @@ describe('ImageCanvasExportModel', () => {
|
||||
},
|
||||
],
|
||||
}),
|
||||
).toBe('image-sequence:sequence-task');
|
||||
).toBe('image-sequence:task:sequence-task');
|
||||
expect(
|
||||
getLayerExportKey({
|
||||
...buildLayer(),
|
||||
mediaType: 'image-sequence',
|
||||
taskId: null,
|
||||
sourceResourceId: null,
|
||||
src: '',
|
||||
imageSequenceFrames: [
|
||||
{
|
||||
imageSrc: '',
|
||||
objectKey: 'private/animation-a/frame-01.png',
|
||||
width: 1024,
|
||||
height: 1024,
|
||||
},
|
||||
],
|
||||
}),
|
||||
).toBe(
|
||||
'image-sequence:frames:["object-key:private/animation-a/frame-01.png"]',
|
||||
);
|
||||
});
|
||||
|
||||
it('detects image extensions from content type before falling back to src', () => {
|
||||
@@ -307,7 +332,7 @@ describe('ImageCanvasExportModel', () => {
|
||||
try {
|
||||
const blob = await readLayerAssetBlob(
|
||||
buildLayer({
|
||||
src: '/generated-editor-videos/video.mp4',
|
||||
src: '',
|
||||
mediaType: 'video',
|
||||
objectKey: 'generated/video.mp4',
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user