diff --git a/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/fileAssetCallBack2.test.ets b/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/fileAssetCallBack2.test.ets index 66ca0dec2fdb45f8544f7873c9564b12a2a7b062..a5b620eb75ab6b1e844993a3c29baa6911821731 100644 --- a/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/fileAssetCallBack2.test.ets +++ b/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/fileAssetCallBack2.test.ets @@ -84,7 +84,7 @@ export default function fileAssetCallBack2Test(abilityContext){ try { const fetchFileResult = await media.getFileAssets(imagesfetchOp); const asset = await fetchFileResult.getFirstObject(); - const newName = 'newName' + new Date().getTime(); + const newName = 'newName' + new Date().getTime() + '.jpg'; asset.displayName = newName; const id = asset.id; asset.commitModify(async () => { diff --git a/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/fileAssetPromise2.test.ets b/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/fileAssetPromise2.test.ets index ccb693a026931d655e709158057f217f2b283906..b59006d9dd7cb1065cd45cb0f5d27194ddbecb97 100644 --- a/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/fileAssetPromise2.test.ets +++ b/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/fileAssetPromise2.test.ets @@ -85,7 +85,7 @@ export default function fileAssetPromise2Test(abilityContext){ try { const fetchFileResult = await media.getFileAssets(imagesfetchOp); const asset = await fetchFileResult.getFirstObject(); - const newName = 'newName' + new Date().getTime(); + const newName = 'newName' + new Date().getTime() + '.jpg'; asset.displayName = newName; const id = asset.id; await asset.commitModify(); diff --git a/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets b/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets index fd3d5f761bae67fae8db106bae21a7cd928bd33e..73f85a8ca24790c679cb076c12a5e5fae9fc52b6 100644 --- a/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets +++ b/multimedia/medialibrary/mediaLibrary_js_standard/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets @@ -843,7 +843,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext){ const fileAssets = await media.getFileAssets(filesfetchOp); const dataList = await fileAssets.getAllObject(); const asset1 = dataList[0]; - const creatAsset1 = await media.createAsset(fileType, fileName, path); + const creatAsset1 = await media.createAsset(audioType, fileName, path); const fd1 = await asset1.open('rw'); const creatAssetFd1 = await creatAsset1.open('rw'); await copyFile(fd1, creatAssetFd1);