mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-03 14:34:40 +00:00
fix(core): inherit sortIndex when creating version stack container
This commit is contained in:
@@ -1394,6 +1394,7 @@ describe('AssetService', () => {
|
||||
creatorId: user.id,
|
||||
status: 'uploaded',
|
||||
sizeByte: 100,
|
||||
sortIndex: 'abc',
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1425,6 +1426,7 @@ describe('AssetService', () => {
|
||||
expect(res.data).toHaveLength(1)
|
||||
const stackAsset = res.data[0]
|
||||
expect(stackAsset.type).toBe(AssetType.version_stack)
|
||||
expect(stackAsset.sortIndex).toBe('abc')
|
||||
expect(stackAsset.versionStack).toBeDefined()
|
||||
expect(stackAsset.versionStack?.versions).toHaveLength(2)
|
||||
const versions = stackAsset.versionStack!.versions
|
||||
|
||||
@@ -533,6 +533,7 @@ export class AssetService {
|
||||
parentId: stackParentId,
|
||||
creatorId: creatorId,
|
||||
name: '',
|
||||
sortIndex: destFile.sortIndex,
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user