未验证 提交 bb62b742 编写于 作者: O openharmony_ci 提交者: Gitee

!6164 Fix FileAsset relative_path test case

Merge pull request !6164 from 张代曰/OpenHarmony-3.1-Release
......@@ -137,16 +137,10 @@ describe('fileAssetCallBack2.test.js', async function () {
it('SUB_MEDIA_FILEASSET_commitModify_callback_003', 0, async function (done) {
try {
const path1 = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_IMAGE);
const path2 = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_VIDEO);
const fetchFileResult = await media.getFileAssets(imagesfetchOp);
const asset = await fetchFileResult.getFirstObject();
let relativePath = asset.relativePath;
let newrelativePath = path1;
if (relativePath == path1) {
newrelativePath = path2;
}
let newrelativePath = path1 + "new/";
asset.relativePath = newrelativePath;
const id = asset.id;
......
......@@ -135,16 +135,10 @@ describe('fileAssetPromise2.test.js', async function () {
it('SUB_MEDIA_FILEASSET_commitModify_promise_003', 0, async function (done) {
try {
const path1 = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_IMAGE);
const path2 = await media.getPublicDirectory(mediaLibrary.DirectoryType.DIR_VIDEO);
const fetchFileResult = await media.getFileAssets(imagesfetchOp);
const asset = await fetchFileResult.getFirstObject();
let relativePath = asset.relativePath;
let newrelativePath = path1;
if (relativePath == path1) {
newrelativePath = path2;
}
let newrelativePath = path1 + "new/";
asset.relativePath = newrelativePath;
const id = asset.id;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册