Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
41d898ac
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
41d898ac
编写于
10月 10, 2022
作者:
Y
yangbo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
delete directory && mask failed case
Signed-off-by:
N
yangbo
<
yangbo258@h-partners.com
>
上级
88d7a482
变更
11
显示空白变更内容
内联
并排
Showing
11 changed file
with
0 addition
and
921 deletion
+0
-921
multimedia/userfilemgr/userfilemgr_album/entry/src/main/ets/test/albumGetFileAssetsCallback.test.ets
...try/src/main/ets/test/albumGetFileAssetsCallback.test.ets
+0
-45
multimedia/userfilemgr/userfilemgr_album/entry/src/main/ets/test/albumGetFileAssetsPromise.test.ets
...ntry/src/main/ets/test/albumGetFileAssetsPromise.test.ets
+0
-38
multimedia/userfilemgr/userfilemgr_base/entry/src/main/ets/test/List.test.ets
...gr/userfilemgr_base/entry/src/main/ets/test/List.test.ets
+0
-4
multimedia/userfilemgr/userfilemgr_base/entry/src/main/ets/test/getFileAssetsCallback.test.ets
...se/entry/src/main/ets/test/getFileAssetsCallback.test.ets
+0
-129
multimedia/userfilemgr/userfilemgr_base/entry/src/main/ets/test/getFileAssetsPromise.test.ets
...ase/entry/src/main/ets/test/getFileAssetsPromise.test.ets
+0
-106
multimedia/userfilemgr/userfilemgr_base/entry/src/main/ets/test/getPublicDirectoryCallback.test.ets
...try/src/main/ets/test/getPublicDirectoryCallback.test.ets
+0
-152
multimedia/userfilemgr/userfilemgr_base/entry/src/main/ets/test/getPublicDirectoryPromise.test.ets
...ntry/src/main/ets/test/getPublicDirectoryPromise.test.ets
+0
-145
multimedia/userfilemgr/userfilemgr_fileAsset/entry/src/main/ets/test/List.test.ets
...erfilemgr_fileAsset/entry/src/main/ets/test/List.test.ets
+0
-4
multimedia/userfilemgr/userfilemgr_fileAsset/entry/src/main/ets/test/fileAssetFileKey.test.ets
...leAsset/entry/src/main/ets/test/fileAssetFileKey.test.ets
+0
-72
multimedia/userfilemgr/userfilemgr_fileAsset/entry/src/main/ets/test/fileAssetIsDirectoryCallback.test.ets
...y/src/main/ets/test/fileAssetIsDirectoryCallback.test.ets
+0
-117
multimedia/userfilemgr/userfilemgr_fileAsset/entry/src/main/ets/test/fileAssetIsDirectoryPromise.test.ets
...ry/src/main/ets/test/fileAssetIsDirectoryPromise.test.ets
+0
-109
未找到文件。
multimedia/userfilemgr/userfilemgr_album/entry/src/main/ets/test/albumGetFileAssetsCallback.test.ets
浏览文件 @
41d898ac
...
...
@@ -69,37 +69,6 @@ export default function albumGetFileAssetsCallback(abilityContext) {
}
}
const getPhotoAssetsErrCodeTest = async function (done, testNum, fetchOp, expectAlbumCount = 1, expectAssetsCount = 1) {
try {
const fetchAlbumResult = await userfilemgr.getPhotoAlbums(fetchOp);
const albumCountPass = await checkAssetsCount(done, testNum, fetchAlbumResult, expectAlbumCount);
if (!albumCountPass) return;
const album = await fetchAlbumResult.getFirstObject();
fetchAlbumResult.close();
let predicates = new dataSharePredicates.DataSharePredicates();
predicates.equalTo('222', '333');
let op = {
fetchColumns: ['111'],
predicates: predicates
};
album.getPhotoAssets(op, (error, fetchAssetResult) => {
if (error != undefined) {
console.info(`${testNum} getPhotoAssetsErrCodeTest error: ${error}`);
expect(false).assertTrue();
done();
return;
}
expect(false).assertTrue();
fetchAssetResult.close();
done();
});
} catch (error) {
console.info(`${testNum}, error: ${error}`);
expect(true).assertTrue();
done();
}
}
/**
* @tc.number : SUB_USERFILE_MGR_ALBUM_GETPHOTOASSETS_CALLBACK_01
* @tc.name : getPhotoAssets
...
...
@@ -113,19 +82,5 @@ export default function albumGetFileAssetsCallback(abilityContext) {
let currentFetchOp = albumFetchOps(testNum, 'Pictures/', 'Static');
await getPhotoAssetsTest(done, testNum, currentFetchOp);
});
/**
* @tc.number : SUB_USERFILE_MGR_ALBUM_GETPHOTOASSETS_ERRCODE_CALLBACK_01
* @tc.name : getPhotoAssets
* @tc.desc : invalid AlbumFetchOptions
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_ALBUM_GETPHOTOASSETS_ERRCODE_CALLBACK_01', 0, async function (done) {
const testNum = 'SUB_USERFILE_MGR_ALBUM_GETPHOTOASSETS_ERRCODE_CALLBACK_01';
let currentFetchOp = albumFetchOps(testNum, 'Pictures/', 'Static');
await getPhotoAssetsErrCodeTest(done, testNum, currentFetchOp);
});
});
}
\ No newline at end of file
multimedia/userfilemgr/userfilemgr_album/entry/src/main/ets/test/albumGetFileAssetsPromise.test.ets
浏览文件 @
41d898ac
...
...
@@ -70,30 +70,6 @@ export default function albumGetFileAssetsPromise(abilityContext) {
}
}
const getPhotoAssetsErrCodeTest = async function (done, testNum, fetchOp, expectAlbumCount = 1, expectAssetsCount = 1) {
try {
const fetchAlbumResult = await userfilemgr.getPhotoAlbums(fetchOp);
const albumCountPass = await checkAssetsCount(done, testNum, fetchAlbumResult, expectAlbumCount);
if (!albumCountPass) return;
const album = await fetchAlbumResult.getFirstObject();
fetchAlbumResult.close();
let predicates = new dataSharePredicates.DataSharePredicates();
predicates.equalTo('222', '333');
let op = {
fetchColumns: ['111'],
predicates: predicates
};
let fetchAssetResult = await album.getPhotoAssets(op);
expect(false).assertTrue();
fetchAssetResult.close();
done();
} catch (error) {
console.info(`${testNum}, error: ${error}`);
expect(true).assertTrue();
done();
}
}
/**
* @tc.number : SUB_USERFILE_MGR_ALBUM_GETPHOTOASSETS_PROMISE_01
* @tc.name : getPhotoAssets
...
...
@@ -107,19 +83,5 @@ export default function albumGetFileAssetsPromise(abilityContext) {
let currentFetchOp = albumFetchOps(testNum, 'Pictures/', 'Static');
await getPhotoAssetsTest(done, testNum, currentFetchOp);
});
/**
* @tc.number : SUB_USERFILE_MGR_ALBUM_GETPHOTOASSETS_ERRCODE_PROMISE_01
* @tc.name : getPhotoAssets
* @tc.desc : invalid AlbumFetchOptions
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_ALBUM_GETPHOTOASSETS_ERRCODE_PROMISE_01', 0, async function (done) {
const testNum = 'SUB_USERFILE_MGR_ALBUM_GETPHOTOASSETS_ERRCODE_PROMISE_01';
let currentFetchOp = albumFetchOps(testNum, 'Pictures/', 'Static');
await getPhotoAssetsTest(done, testNum, currentFetchOp);
});
});
}
\ No newline at end of file
multimedia/userfilemgr/userfilemgr_base/entry/src/main/ets/test/List.test.ets
浏览文件 @
41d898ac
...
...
@@ -17,8 +17,6 @@ import getAlbumsCallbackTest from './getAlbumsCallback.test.ets'
import getAlbumsPromiseTest from './getAlbumsPromise.test.ets'
import getFileAssetsCallbackTest from './getFileAssetsCallback.test.ets'
import getFileAssetsPromiseTest from './getFileAssetsPromise.test.ets'
//import getPublicDirectoryCallbackTest from './getPublicDirectoryCallback.test.ets'
//import getPublicDirectoryPromiseTest from './getPublicDirectoryPromise.test.ets'
import getUserFileMgrTest from './getUserFileMgr.test.ets'
import onOffReleasePromiseTest from './onOffReleasePromise.test.ets'
export default function testsuite(abilityContext) {
...
...
@@ -26,8 +24,6 @@ export default function testsuite(abilityContext) {
getAlbumsPromiseTest(abilityContext)
getFileAssetsCallbackTest(abilityContext)
getFileAssetsPromiseTest(abilityContext)
//getPublicDirectoryCallbackTest(abilityContext)
//getPublicDirectoryPromiseTest(abilityContext)
getUserFileMgrTest(abilityContext)
onOffReleasePromiseTest(abilityContext)
}
multimedia/userfilemgr/userfilemgr_base/entry/src/main/ets/test/getFileAssetsCallback.test.ets
浏览文件 @
41d898ac
...
...
@@ -150,36 +150,6 @@ export default function getFileAssetsCallbackTest(abilityContext) {
}
}
async
function
getPositionObjectErrCodeTest
(
done
,
testNum
,
fetchOp
,
pos
,
isAudio
)
{
try
{
let
fetchAssetResult
;
if
(
isAudio
)
{
fetchAssetResult
=
await
userfilemgr
.
getAudioAssets
(
fetchOp
);
}
else
{
fetchAssetResult
=
await
userfilemgr
.
getPhotoAssets
(
fetchOp
);
}
let
expectCount
=
4
;
let
checkAssetCountPass
=
await
checkAssetsCount
(
done
,
testNum
,
fetchAssetResult
,
expectCount
);
if
(
!
checkAssetCountPass
)
return
;
fetchAssetResult
.
getPositionObject
(
pos
,
async
(
err
,
asset
)
=>
{
if
(
err
)
{
console
.
info
(
`${testNum} err : ${err}`
)
expect
.
assertFail
();
fetchAssetResult
.
close
();
done
();
return
;
}
expect
(
false
)
.
assertTrue
();
fetchAssetResult
.
close
();
done
();
});
}
catch
(
error
)
{
console
.
info
(
`${testNum}:: error :${error}`
);
expect
(
true
)
.
assertTrue
();
done
();
}
}
async
function
isAfterLastTest
(
done
,
testNum
,
fetchOp
,
isAudio
)
{
try
{
let
fetchAssetResult
;
...
...
@@ -229,7 +199,6 @@ export default function getFileAssetsCallbackTest(abilityContext) {
return
;
}
expect
(
asset
.
displayName
)
.
assertEqual
(
props
[
type
]
.
displayName
);
expect
(
asset
.
fileType
.
toString
())
.
assertEqual
(
props
[
type
]
.
fileType
);
expect
(
asset
.
uri
!=
undefined
)
.
assertTrue
();
fetchAssetResult
.
close
();
done
();
...
...
@@ -241,38 +210,6 @@ export default function getFileAssetsCallbackTest(abilityContext) {
}
}
async
function
getFileAssetsErrCodeTest
(
done
,
testNum
,
fetchOp
,
isAudio
)
{
try
{
if
(
isAudio
)
{
await
userfilemgr
.
getAudioAssets
(
fetchOp
,
(
err
,
fetchAssetResult
)
=>
{
if
(
err
!=
undefined
)
{
console
.
info
(
`${testNum}:: getAudioAssets error :${err}`
);
expect
(
false
)
.
assertTrue
();
done
();
return
;
}
expect
(
false
)
.
assertTrue
();
done
();
})
}
else
{
await
userfilemgr
.
getPhotoAssets
(
fetchOp
,
(
err
,
fetchAssetResult
)
=>
{
if
(
err
!=
undefined
)
{
console
.
info
(
`${testNum}:: getAudioAssets error :${err}`
);
expect
(
false
)
.
assertTrue
();
done
();
return
;
}
expect
(
false
)
.
assertTrue
();
done
();
})
}
}
catch
(
error
)
{
console
.
info
(
`${testNum}:: error :${error}`
);
expect
(
true
)
.
assertTrue
();
done
();
}
}
/**
* @tc.number : SUB_USERFILE_MGR_GETPHOTOASSETS_CALLBACK_01_001
* @tc.name : getFirstObject
...
...
@@ -417,40 +354,6 @@ export default function getFileAssetsCallbackTest(abilityContext) {
//------------------------------------------------------------------------------
/**
* @tc.number : SUB_USERFILE_MGR_GETPOSITIONOBJECT_ERRCODE_CALLBACK_01
* @tc.name : getPositionObject
* @tc.desc : pos is not number
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_USERFILE_MGR_GETPOSITIONOBJECT_ERRCODE_CALLBACK_01'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_USERFILE_MGR_GETPOSITIONOBJECT_ERRCODE_CALLBACK_01'
;
let
currentFetchOps
=
imageVideoFetchOps
(
testNum
,
'Pictures/Static/'
);
let
pos
=
'aaa'
;
let
isAudio
=
false
;
await
getPositionObjectErrCodeTest
(
done
,
testNum
,
currentFetchOps
,
pos
,
isAudio
);
});
/**
* @tc.number : SUB_USERFILE_MGR_GETPOSITIONOBJECT_ERRCODE_CALLBACK_02
* @tc.name : getPositionObject
* @tc.desc : pos is not number
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_USERFILE_MGR_GETPOSITIONOBJECT_ERRCODE_CALLBACK_02'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_USERFILE_MGR_GETPOSITIONOBJECT_ERRCODE_CALLBACK_02'
;
let
currentFetchOps
=
imageVideoFetchOps
(
testNum
,
'Audios/Static/'
);
let
pos
=
'aaa'
;
let
isAudio
=
true
;
await
getPositionObjectErrCodeTest
(
done
,
testNum
,
currentFetchOps
,
pos
,
isAudio
);
});
//-----------------------------------------------------------------------------------
/**
* @tc.number : SUB_USERFILE_MGR_GETPHOTOASSETS_CALLBACK_04_001
* @tc.name : isAfterLast
...
...
@@ -545,38 +448,6 @@ export default function getFileAssetsCallbackTest(abilityContext) {
let
isAudio
=
false
;
await
checkFileAssetAttr
(
done
,
testNum
,
currentFetchOps
,
type
,
isAudio
);
});
//------------------------------------------------------------------------------
/**
* @tc.number : SUB_USERFILE_MGR_GETPHOTOASSETS_ERRCODE_CALLBACK_01
* @tc.name : getPhotoAssets
* @tc.desc : invalid FetchOptions
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_USERFILE_MGR_GETPHOTOASSETS_ERRCODE_CALLBACK_01'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_USERFILE_MGR_GETPHOTOASSETS_ERRCODE_CALLBACK_01'
;
let
currentFetchOps
=
imageVideoFetchOps
(
testNum
,
'aaa/'
);
let
isAudio
=
false
;
await
getFileAssetsErrCodeTest
(
done
,
testNum
,
currentFetchOps
,
isAudio
);
});
/**
* @tc.number : SUB_USERFILE_MGR_GETPHOTOASSETS_ERRCODE_CALLBACK_02
* @tc.name : getPhotoAssets
* @tc.desc : invalid FetchOptions
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_USERFILE_MGR_GETPHOTOASSETS_ERRCODE_CALLBACK_02'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_USERFILE_MGR_GETPHOTOASSETS_ERRCODE_CALLBACK_02'
;
let
currentFetchOps
=
audioFetchOps
(
testNum
,
'aaa/'
);
let
isAudio
=
true
;
await
getFileAssetsErrCodeTest
(
done
,
testNum
,
currentFetchOps
,
isAudio
);
});
});
}
multimedia/userfilemgr/userfilemgr_base/entry/src/main/ets/test/getFileAssetsPromise.test.ets
浏览文件 @
41d898ac
...
...
@@ -127,28 +127,6 @@ export default function getFileAssetsPromiseTest(abilityContext) {
}
}
async
function
getPositionObjectErrCodeTest
(
done
,
testNum
,
fetchOp
,
pos
,
isAudio
)
{
try
{
let
fetchAssetResult
;
if
(
isAudio
)
{
fetchAssetResult
=
await
userfilemgr
.
getAudioAssets
(
fetchOp
);
}
else
{
fetchAssetResult
=
await
userfilemgr
.
getPhotoAssets
(
fetchOp
);
}
let
expectCount
=
4
;
let
checkAssetCountPass
=
await
checkAssetsCount
(
done
,
testNum
,
fetchAssetResult
,
expectCount
);
if
(
!
checkAssetCountPass
)
return
;
await
fetchAssetResult
.
getPositionObject
(
pos
);
expect
(
false
)
.
assertTrue
();
fetchAssetResult
.
close
();
done
();
}
catch
(
error
)
{
console
.
info
(
`${testNum}:: error :${error}`
);
expect
(
true
)
.
assertTrue
();
done
();
}
}
async
function
isAfterLastTest
(
done
,
testNum
,
fetchOp
,
isAudio
)
{
try
{
let
fetchAssetResult
;
...
...
@@ -197,8 +175,6 @@ export default function getFileAssetsPromiseTest(abilityContext) {
return
;
}
expect
(
asset
.
displayName
)
.
assertEqual
(
props
[
type
]
.
displayName
);
expect
(
asset
.
fileType
.
toString
())
.
assertEqual
(
props
[
type
]
.
fileType
);
expect
(
asset
.
uri
!=
undefined
)
.
assertTrue
();
fetchAssetResult
.
close
();
done
();
});
...
...
@@ -209,22 +185,6 @@ export default function getFileAssetsPromiseTest(abilityContext) {
}
}
async
function
getFileAssetsErrCodeTest
(
done
,
testNum
,
fetchOp
,
isAudio
)
{
try
{
let
fetchAssetResult
;
if
(
isAudio
)
{
fetchAssetResult
=
await
userfilemgr
.
getAudioAssets
(
fetchOp
);
}
else
{
fetchAssetResult
=
await
userfilemgr
.
getPhotoAssets
(
fetchOp
);
}
expect
(
false
)
.
assertTrue
();
}
catch
(
error
)
{
console
.
info
(
`${testNum}:: error :${error}`
);
expect
(
true
)
.
assertTrue
();
done
();
}
}
/**
* @tc.number : SUB_USERFILE_MGR_GETPHOTOASSETS_PROMISE_01_001
* @tc.name : getFirstObject
...
...
@@ -367,40 +327,6 @@ export default function getFileAssetsPromiseTest(abilityContext) {
await
getPositionObjectTest
(
done
,
testNum
,
currentFetchOps
,
pos
,
isAudio
);
});
//------------------------------------------------------------------------------
/**
* @tc.number : SUB_USERFILE_MGR_GETPHOTOASSETS_ERRCODE_PROMISE_01
* @tc.name : getPositionObject
* @tc.desc : pos is not number
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_USERFILE_MGR_GETPHOTOASSETS_ERRCODE_PROMISE_01'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_USERFILE_MGR_GETPHOTOASSETS_ERRCODE_PROMISE_01'
;
let
currentFetchOps
=
imageVideoFetchOps
(
testNum
,
'Pictures/Static/'
);
let
pos
=
'aaa'
;
let
isAudio
=
false
;
await
getPositionObjectTest
(
done
,
testNum
,
currentFetchOps
,
pos
,
isAudio
);
});
/**
* @tc.number : SUB_USERFILE_MGR_GETPHOTOASSETS_ERRCODE_PROMISE_02
* @tc.name : getPositionObject
* @tc.desc : pos is not number
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_USERFILE_MGR_GETPHOTOASSETS_ERRCODE_PROMISE_02'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_USERFILE_MGR_GETPHOTOASSETS_ERRCODE_PROMISE_02'
;
let
currentFetchOps
=
imageVideoFetchOps
(
testNum
,
'Audios/Static/'
);
let
pos
=
'aaa'
;
let
isAudio
=
true
;
await
getPositionObjectTest
(
done
,
testNum
,
currentFetchOps
,
pos
,
isAudio
);
});
//---------------------------------------------------------------------------------
/**
...
...
@@ -497,38 +423,6 @@ export default function getFileAssetsPromiseTest(abilityContext) {
let
isAudio
=
false
;
await
checkFileAssetAttr
(
done
,
testNum
,
currentFetchOps
,
type
,
isAudio
);
});
//------------------------------------------------------------------------------
/**
* @tc.number : SUB_USERFILE_MGR_GETPHOTOASSETS_ERRCODE_PROMISE_01
* @tc.name : getPhotoAssets
* @tc.desc : invalid FetchOptions
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_USERFILE_MGR_GETPHOTOASSETS_ERRCODE_PROMISE_01'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_USERFILE_MGR_GETPHOTOASSETS_ERRCODE_PROMISE_01'
;
let
currentFetchOps
=
imageVideoFetchOps
(
testNum
,
'aaa/'
);
let
isAudio
=
false
;
await
getFileAssetsErrCodeTest
(
done
,
testNum
,
currentFetchOps
,
isAudio
);
});
/**
* @tc.number : SUB_USERFILE_MGR_GETPHOTOASSETS_ERRCODE_PROMISE_02
* @tc.name : getPhotoAssets
* @tc.desc : invalid FetchOptions
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_USERFILE_MGR_GETPHOTOASSETS_ERRCODE_PROMISE_02'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_USERFILE_MGR_GETPHOTOASSETS_ERRCODE_PROMISE_02'
;
let
currentFetchOps
=
audioFetchOps
(
testNum
,
'aaa/'
);
let
isAudio
=
true
;
await
getFileAssetsErrCodeTest
(
done
,
testNum
,
currentFetchOps
,
isAudio
);
});
});
}
multimedia/userfilemgr/userfilemgr_base/entry/src/main/ets/test/getPublicDirectoryCallback.test.ets
已删除
100644 → 0
浏览文件 @
88d7a482
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import userFileManager from '@ohos.filemanagement.userFileManager';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index';
import {
sleep,
} from '../../../../../../common';
export default function getPublicDirectoryCallbackTest(abilityContext) {
describe('getPublicDirectoryCallbackTest', function () {
const userfilemgr = userFileManager.getUserFileMgr(abilityContext);
beforeAll(async function () {
console.info('beforeAll case');
});
beforeEach(function () {
console.info('beforeEach case');
});
afterEach(async function () {
console.info('afterEach case');
await sleep()
});
afterAll(function () {
console.info('afterAll case');
});
const getPublicDirectoryTest = async (done, testNum, dir, val) => {
try {
userfilemgr.getPublicDirectory(dir, async (err, res) => {
if (err) {
console.info(`${testNum} err : ${err}`)
expect.assertFail();
done();
return;
}
expect(res).assertEqual(val);
done();
});
} catch (error) {
console.info(`${testNum}:: error :${error}`);
expect(false).assertTrue();
done();
}
}
/**
* @tc.number : SUB_USERFILE_MGR_GETPUBLICDIRECTORY_CALLBACK_01
* @tc.name : getPublicDirectory
* @tc.desc : getPublicDirectory DIR_CAMERA
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_GETPUBLICDIRECTORY_CALLBACK_01', 0, async function (done) {
let testNum = 'SUB_USERFILE_MGR_GETPUBLICDIRECTORY_CALLBACK_01';
let dir = userFileManager.DirectoryType.DIR_CAMERA;
let val = 'Camera/';
await getPublicDirectoryTest(done, testNum, dir, val)
});
/**
* @tc.number : SUB_USERFILE_MGR_GETPUBLICDIRECTORY_CALLBACK_02
* @tc.name : getPublicDirectory
* @tc.desc : getPublicDirectory DIR_VIDEO
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_GETPUBLICDIRECTORY_CALLBACK_02', 0, async function (done) {
let testNum = 'SUB_USERFILE_MGR_GETPUBLICDIRECTORY_CALLBACK_02';
let dir = userFileManager.DirectoryType.DIR_VIDEO;
let val = 'Videos/';
await getPublicDirectoryTest(done, testNum, dir, val)
});
/**
* @tc.number : SUB_USERFILE_MGR_GETPUBLICDIRECTORY_CALLBACK_03
* @tc.name : getPublicDirectory
* @tc.desc : getPublicDirectory DIR_IMAGE
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_GETPUBLICDIRECTORY_CALLBACK_03', 0, async function (done) {
let testNum = 'SUB_USERFILE_MGR_GETPUBLICDIRECTORY_CALLBACK_03';
let dir = userFileManager.DirectoryType.DIR_IMAGE;
let val = 'Pictures/';
await getPublicDirectoryTest(done, testNum, dir, val)
});
/**
* @tc.number : SUB_USERFILE_MGR_GETPUBLICDIRECTORY_CALLBACK_04
* @tc.name : getPublicDirectory
* @tc.desc : getPublicDirectory DIR_AUDIO
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_GETPUBLICDIRECTORY_CALLBACK_04', 0, async function (done) {
let testNum = 'SUB_USERFILE_MGR_GETPUBLICDIRECTORY_CALLBACK_04';
let dir = userFileManager.DirectoryType.DIR_AUDIO;
let val = 'Audios/';
await getPublicDirectoryTest(done, testNum, dir, val)
});
/**
* @tc.number : SUB_USERFILE_MGR_GETPUBLICDIRECTORY_CALLBACK_05
* @tc.name : getPublicDirectory
* @tc.desc : getPublicDirectory DIR_IMAGE
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_GETPUBLICDIRECTORY_CALLBACK_05', 0, async function (done) {
let testNum = 'SUB_USERFILE_MGR_GETPUBLICDIRECTORY_CALLBACK_05';
let dir = userFileManager.DirectoryType.DIR_DOCUMENTS;
let val = 'Documents/';
await getPublicDirectoryTest(done, testNum, dir, val)
});
/**
* @tc.number : SUB_USERFILE_MGR_GETPUBLICDIRECTORY_CALLBACK_06
* @tc.name : getPublicDirectory
* @tc.desc : getPublicDirectory DIR_DOWNLOAD
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_GETPUBLICDIRECTORY_CALLBACK_06', 0, async function (done) {
let testNum = 'SUB_USERFILE_MGR_GETPUBLICDIRECTORY_CALLBACK_06';
let dir = userFileManager.DirectoryType.DIR_DOWNLOAD;
let val = 'Download/';
await getPublicDirectoryTest(done, testNum, dir, val)
});
});
}
multimedia/userfilemgr/userfilemgr_base/entry/src/main/ets/test/getPublicDirectoryPromise.test.ets
已删除
100644 → 0
浏览文件 @
88d7a482
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import userFileManager from '@ohos.filemanagement.userFileManager';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index';
import {
sleep,
} from '../../../../../../common';
export default function getPublicDirectoryPromiseTest(abilityContext) {
describe('getPublicDirectoryPromiseTest', function () {
const userfilemgr = userFileManager.getUserFileMgr(abilityContext);
beforeAll(async function () {
console.info('beforeAll case');
});
beforeEach(function () {
console.info('beforeEach case');
});
afterEach(async function () {
console.info('afterEach case');
await sleep()
});
afterAll(function () {
console.info('afterAll case');
});
const getPublicDirectoryTest = async (done, testNum, dir, val) => {
try {
let res = await userfilemgr.getPublicDirectory(dir);
expect(res).assertEqual(val);
done();
} catch (error) {
console.info(`${testNum}:: error :${error}`);
expect(false).assertTrue();
done();
}
}
/**
* @tc.number : SUB_USERFILE_MGR_GETPUBLICDIRECTORY_PROMISE_01
* @tc.name : getPublicDirectory
* @tc.desc : getPublicDirectory DIR_CAMERA
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_GETPUBLICDIRECTORY_PROMISE_01', 0, async function (done) {
let testNum = 'SUB_USERFILE_MGR_GETPUBLICDIRECTORY_PROMISE_01';
let dir = userFileManager.DirectoryType.DIR_CAMERA;
let val = 'Camera/';
await getPublicDirectoryTest(done, testNum, dir, val)
});
/**
* @tc.number : SUB_USERFILE_MGR_GETPUBLICDIRECTORY_PROMISE_02
* @tc.name : getPublicDirectory
* @tc.desc : getPublicDirectory DIR_VIDEO
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_GETPUBLICDIRECTORY_PROMISE_02', 0, async function (done) {
let testNum = 'SUB_USERFILE_MGR_GETPUBLICDIRECTORY_PROMISE_02';
let dir = userFileManager.DirectoryType.DIR_VIDEO;
let val = 'Videos/';
await getPublicDirectoryTest(done, testNum, dir, val)
});
/**
* @tc.number : SUB_USERFILE_MGR_GETPUBLICDIRECTORY_PROMISE_03
* @tc.name : getPublicDirectory
* @tc.desc : getPublicDirectory DIR_IMAGE
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_GETPUBLICDIRECTORY_PROMISE_03', 0, async function (done) {
let testNum = 'SUB_USERFILE_MGR_GETPUBLICDIRECTORY_PROMISE_03';
let dir = userFileManager.DirectoryType.DIR_IMAGE;
let val = 'Pictures/';
await getPublicDirectoryTest(done, testNum, dir, val)
});
/**
* @tc.number : SUB_USERFILE_MGR_GETPUBLICDIRECTORY_PROMISE_04
* @tc.name : getPublicDirectory
* @tc.desc : getPublicDirectory DIR_AUDIO
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_GETPUBLICDIRECTORY_PROMISE_04', 0, async function (done) {
let testNum = 'SUB_USERFILE_MGR_GETPUBLICDIRECTORY_PROMISE_04';
let dir = userFileManager.DirectoryType.DIR_AUDIO;
let val = 'Audios/';
await getPublicDirectoryTest(done, testNum, dir, val)
});
/**
* @tc.number : SUB_USERFILE_MGR_GETPUBLICDIRECTORY_PROMISE_05
* @tc.name : getPublicDirectory
* @tc.desc : getPublicDirectory DIR_IMAGE
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_GETPUBLICDIRECTORY_PROMISE_05', 0, async function (done) {
let testNum = 'SUB_USERFILE_MGR_GETPUBLICDIRECTORY_PROMISE_05';
let dir = userFileManager.DirectoryType.DIR_DOCUMENTS;
let val = 'Documents/';
await getPublicDirectoryTest(done, testNum, dir, val)
});
/**
* @tc.number : SUB_USERFILE_MGR_GETPUBLICDIRECTORY_PROMISE_06
* @tc.name : getPublicDirectory
* @tc.desc : getPublicDirectory DIR_DOWNLOAD
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_GETPUBLICDIRECTORY_PROMISE_06', 0, async function (done) {
let testNum = 'SUB_USERFILE_MGR_GETPUBLICDIRECTORY_PROMISE_06';
let dir = userFileManager.DirectoryType.DIR_DOWNLOAD;
let val = 'Download/';
await getPublicDirectoryTest(done, testNum, dir, val)
});
});
}
multimedia/userfilemgr/userfilemgr_fileAsset/entry/src/main/ets/test/List.test.ets
浏览文件 @
41d898ac
...
...
@@ -20,8 +20,6 @@ import fileAssetFavoritePromiseTest from './fileAssetFavoritePromise.test.ets'
import fileAssetFileKeyTest from './fileAssetFileKey.test.ets'
import fileAssetGetThumbnailCallbackTest from './fileAssetGetThumbnailCallback.test.ets'
import fileAssetGetThumbnailPromiseTest from './fileAssetGetThumbnailPromise.test.ets'
//import fileAssetIsDirectoryCallbackTest from './fileAssetIsDirectoryCallback.test.ets'
//import fileAssetIsDirectoryPromiseTest from './fileAssetIsDirectoryPromise.test.ets'
import fileAssetOpenCallbackTest from './fileAssetOpenCallback.test.ets'
import fileAssetOpenPromiseTest from './fileAssetOpenPromise.test.ets'
import fileAssetTrashCallbackTest from './fileAssetTrashCallback.test.ets'
...
...
@@ -34,8 +32,6 @@ export default function testsuite(abilityContext) {
fileAssetFileKeyTest(abilityContext)
fileAssetGetThumbnailCallbackTest(abilityContext)
fileAssetGetThumbnailPromiseTest(abilityContext)
//fileAssetIsDirectoryCallbackTest(abilityContext)
//fileAssetIsDirectoryPromiseTest(abilityContext)
fileAssetOpenCallbackTest(abilityContext)
fileAssetOpenPromiseTest(abilityContext)
fileAssetTrashCallbackTest(abilityContext)
...
...
multimedia/userfilemgr/userfilemgr_fileAsset/entry/src/main/ets/test/fileAssetFileKey.test.ets
浏览文件 @
41d898ac
...
...
@@ -162,36 +162,6 @@ export default function fileAssetFileKeyTest(abilityContext) {
}
}
/**
* @tc.number : SUB_USERFILE_MGR_GETPHOTOALBUMSBYKEY_01
* @tc.name : AlbumKey
* @tc.desc : AlbumKey.URI
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
//it('SUB_USERFILE_MGR_GETPHOTOALBUMSBYKEY_01', 0, async function (done) {
// let testNum = 'SUB_USERFILE_MGR_GETPHOTOALBUMSBYKEY_01';
// let type = 'albumUri';
// let fileKey = AlbumKey.URI;
// await getAlbumsByKey(done, testNum, type, fileKey);
//});
/**
* @tc.number : SUB_USERFILE_MGR_GETPHOTOALBUMSBYKEY_02
* @tc.name : AlbumKey
* @tc.desc : AlbumKey.ALBUM_NAME
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_GETPHOTOALBUMSBYKEY_02', 0, async function (done) {
let testNum = 'SUB_USERFILE_MGR_GETPHOTOALBUMSBYKEY_02';
let type = 'albumName';
let fileKey = AlbumKey.ALBUM_NAME;
await getAlbumsByKey(done, testNum, type, fileKey);
});
/**
* @tc.number : SUB_USERFILE_MGR_GETPHOTOALBUMSBYKEY_03
* @tc.name : AlbumKey
...
...
@@ -224,20 +194,6 @@ export default function fileAssetFileKeyTest(abilityContext) {
//------------------------------------------------------------------------------
/**
* @tc.number : SUB_USERFILE_MGR_GETPHOTOASSETSBYKEY_01
* @tc.name : ImageVideoKey
* @tc.desc : ImageVideoKey.URI
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
//it('SUB_USERFILE_MGR_GETPHOTOASSETSBYKEY_01', 0, async function (done) {
// let testNum = 'SUB_USERFILE_MGR_GETPHOTOASSETSBYKEY_01';
// let fileKey = ImageVideoKey.URI;
// await getPhotoAssetsByKey(done, testNum, fileKey);
//});
//
/**
* @tc.number : SUB_USERFILE_MGR_GETPHOTOASSETSBYKEY_02
* @tc.name : ImageVideoKey
...
...
@@ -394,20 +350,6 @@ export default function fileAssetFileKeyTest(abilityContext) {
//----------------------------------------------------------------------------
/**
* @tc.number : SUB_USERFILE_MGR_GETAUDIOASSETSBYKEY_01
* @tc.name : AUDIOKEY
* @tc.desc : AUDIOKEY.URI
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_GETAUDIOASSETSBYKEY_01', 0, async function (done) {
let testNum = 'SUB_USERFILE_MGR_GETAUDIOASSETSBYKEY_01';
let fileKey = AUDIOKEY.URI;
await getAudioAssetsByKey(done, testNum, fileKey);
});
/**
* @tc.number : SUB_USERFILE_MGR_GETAUDIOASSETSBYKEY_02
* @tc.name : AUDIOKEY
...
...
@@ -478,20 +420,6 @@ export default function fileAssetFileKeyTest(abilityContext) {
await getAudioAssetsByKey(done, testNum, fileKey);
});
/**
* @tc.number : SUB_USERFILE_MGR_GETAUDIOASSETSBYKEY_07
* @tc.name : AUDIOKEY
* @tc.desc : AUDIOKEY.AUDIOALBUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
//it('SUB_USERFILE_MGR_GETAUDIOASSETSBYKEY_07', 0, async function (done) {
// let testNum = 'SUB_USERFILE_MGR_GETAUDIOASSETSBYKEY_07';
// let fileKey = AUDIOKEY.AUDIOALBUM;
// await getAudioAssetsByKey(done, testNum, fileKey);
//});
/**
* @tc.number : SUB_USERFILE_MGR_GETAUDIOASSETSBYKEY_08
* @tc.name : AUDIOKEY
...
...
multimedia/userfilemgr/userfilemgr_fileAsset/entry/src/main/ets/test/fileAssetIsDirectoryCallback.test.ets
已删除
100644 → 0
浏览文件 @
88d7a482
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import userFileManager from '@ohos.filemanagement.userFileManager';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index';
import {
sleep,
checkPresetsAssets,
audioNameFetchOps,
imageVideoNameFetchOps,
} from '../../../../../../common';
export default function fileAssetIsDirectoryCallbackTest(abilityContext) {
describe('fileAssetIsDirectoryCallbackTest', function () {
const userfilemgr = userFileManager.getUserFileMgr(abilityContext);
beforeAll(async function () {
console.info('beforeAll case');
await checkPresetsAssets(userfilemgr, 'ActsUserFileMgrFileAssetJsTest')
});
beforeEach(function () {
console.info('beforeEach case');
});
afterEach(async function () {
console.info('afterEach case');
await sleep()
});
afterAll(function () {
console.info('afterAll case');
});
const isDirectoryTest = async function (done, testNum, fetchOp, isAudio) {
try {
let fetchAssetResult;
if (isAudio) {
fetchAssetResult = await userfilemgr.getAudioAssets(fetchOp);
} else {
fetchAssetResult = await userfilemgr.getPhotoAssets(fetchOp);
}
const asset = await fetchAssetResult.getFirstObject();
fetchAssetResult.close();
asset.isDirectory((err, isDir) =>{
if (err) {
console.info(`${testNum} err : ${err}`);
expect.assertFail();
done();
return;
}
expect(isDir).assertEqual(false);
done();
});
} catch (error) {
console.info(`${testNum} error : ${error}`)
expect(false).assertTrue();
done();
}
}
/**
* @tc.number : SUB_USERFILE_MGR_FILEASSET_ISDIRECTORY_CALLBACK_01
* @tc.name : isDirectory
* @tc.desc : image asset isDirectory
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_FILEASSET_ISDIRECTORY_CALLBACK_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_ISDIRECTORY_CALLBACK_001';
let fetchOp = imageVideoNameFetchOps(testNum, 'Pictures/Static/', '01.jpg');
let isAudio = false;
await isDirectoryTest(done, testNum, fetchOp, isAudio);
});
/**
* @tc.number : SUB_USERFILE_MGR_FILEASSET_ISDIRECTORY_CALLBACK_02
* @tc.name : isDirectory
* @tc.desc : audio asset isDirectory
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_FILEASSET_ISDIRECTORY_CALLBACK_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_ISDIRECTORY_CALLBACK_001';
let fetchOp = audioNameFetchOps(testNum, 'Audios/Static/', '01.mp3');
let isAudio = true;
await isDirectoryTest(done, testNum, fetchOp, isAudio);
});
/**
* @tc.number : SUB_USERFILE_MGR_FILEASSET_ISDIRECTORY_CALLBACK_03
* @tc.name : isDirectory
* @tc.desc : video asset isDirectory
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_FILEASSET_ISDIRECTORY_CALLBACK_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_ISDIRECTORY_CALLBACK_001';
let fetchOp = imageVideoNameFetchOps(testNum, 'Videos/Static/', '01.mp4');
let isAudio = false;
await isDirectoryTest(done, testNum, fetchOp, isAudio);
});
});
}
multimedia/userfilemgr/userfilemgr_fileAsset/entry/src/main/ets/test/fileAssetIsDirectoryPromise.test.ets
已删除
100644 → 0
浏览文件 @
88d7a482
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import userFileManager from '@ohos.filemanagement.userFileManager';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index';
import {
sleep,
audioNameFetchOps,
imageVideoNameFetchOps,
checkPresetsAssets,
} from '../../../../../../common';
export default function fileAssetIsDirectoryPromiseTest(abilityContext) {
describe('fileAssetIsDirectoryPromiseTest', function () {
const userfilemgr = userFileManager.getUserFileMgr(abilityContext);
beforeAll(async function () {
console.info('beforeAll case');
await checkPresetsAssets(userfilemgr, 'ActsUserFileMgrFileAssetJsTest')
});
beforeEach(function () {
console.info('beforeEach case');
});
afterEach(async function () {
console.info('afterEach case');
await sleep()
});
afterAll(function () {
console.info('afterAll case');
});
const isDirectoryTest = async function (done, testNum, fetchOp, isAudio) {
try {
let fetchAssetResult;
if (isAudio) {
fetchAssetResult = await userfilemgr.getAudioAssets(fetchOp);
} else {
fetchAssetResult = await userfilemgr.getPhotoAssets(fetchOp);
}
const asset = await fetchAssetResult.getFirstObject();
fetchAssetResult.close();
const isDir = await asset.isDirectory();
expect(isDir).assertEqual(false);
done();
} catch (error) {
console.info(`${testNum} error : ${error}`);
expect(false).assertTrue();
done();
}
}
/**
* @tc.number : SUB_USERFILE_MGR_FILEASSET_ISDIRECTORY_PROMISE_01
* @tc.name : isDirectory
* @tc.desc : image asset isDirectory
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_FILEASSET_ISDIRECTORY_PROMISE_01', 0, async function (done) {
let testNum = 'SUB_USERFILE_MGR_FILEASSET_ISDIRECTORY_PROMISE_01';
let fetchOp = imageVideoNameFetchOps(testNum, 'Pictures/Static/', '01.jpg');
let isAudio = false;
await isDirectoryTest(done, testNum, fetchOp, isAudio);
});
/**
* @tc.number : SUB_USERFILE_MGR_FILEASSET_ISDIRECTORY_PROMISE_02
* @tc.name : isDirectory
* @tc.desc : audio asset isDirectory
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_FILEASSET_ISDIRECTORY_PROMISE_02', 0, async function (done) {
let testNum = 'SUB_USERFILE_MGR_FILEASSET_ISDIRECTORY_PROMISE_02';
let fetchOp = audioNameFetchOps(testNum, 'Audios/Static/', '01.mp3');
let isAudio = true;
await isDirectoryTest(done, testNum, fetchOp, isAudio);
});
/**
* @tc.number : SUB_USERFILE_MGR_FILEASSET_ISDIRECTORY_PROMISE_03
* @tc.name : isDirectory
* @tc.desc : video asset isDirectory
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_USERFILE_MGR_FILEASSET_ISDIRECTORY_PROMISE_03', 0, async function (done) {
let testNum = 'SUB_USERFILE_MGR_FILEASSET_ISDIRECTORY_PROMISE_03';
let fetchOp = imageVideoNameFetchOps(testNum, 'Videos/Static/', '01.mp4');
let isAudio = false;
await isDirectoryTest(done, testNum, fetchOp, isAudio);
});
});
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录