Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
aafd8616
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看板
提交
aafd8616
编写于
11月 21, 2022
作者:
Y
yangbo
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
nameFetch改为检索display_name
Signed-off-by:
N
yangbo
<
yangbo258@h-partners.com
>
上级
63e674ec
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
93 addition
and
93 deletion
+93
-93
multimedia/medialibrary/common.js
multimedia/medialibrary/common.js
+3
-3
multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestCallback.test.ets
...entry/src/main/ets/test/mediaLibraryTestCallback.test.ets
+1
-1
multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets
.../entry/src/main/ets/test/mediaLibraryTestPromise.test.ets
+1
-1
multimedia/medialibrary/mediaLibrary_favorite/entry/src/main/ets/test/favoriteTestCallback.test.ets
...ite/entry/src/main/ets/test/favoriteTestCallback.test.ets
+12
-12
multimedia/medialibrary/mediaLibrary_favorite/entry/src/main/ets/test/favoriteTestPromise.test.ets
...rite/entry/src/main/ets/test/favoriteTestPromise.test.ets
+12
-12
multimedia/medialibrary/mediaLibrary_file/entry/src/main/ets/test/fileTestCallback.test.ets
...ry_file/entry/src/main/ets/test/fileTestCallback.test.ets
+18
-18
multimedia/medialibrary/mediaLibrary_file/entry/src/main/ets/test/fileTestPromise.test.ets
...ary_file/entry/src/main/ets/test/fileTestPromise.test.ets
+18
-18
multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetCallback2.test.ets
...Asset/entry/src/main/ets/test/fileAssetCallback2.test.ets
+13
-13
multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetPromise2.test.ets
...eAsset/entry/src/main/ets/test/fileAssetPromise2.test.ets
+15
-15
未找到文件。
multimedia/medialibrary/common.js
浏览文件 @
aafd8616
...
...
@@ -67,10 +67,10 @@ const fetchOps = function (testNum, path, type, others) {
console
.
info
(
`
${
testNum
}
: fetchOps
${
JSON
.
stringify
(
ops
)}
`
)
return
ops
}
const
nameFetchOps
=
function
(
testNum
,
path
,
titl
e
,
type
)
{
const
nameFetchOps
=
function
(
testNum
,
path
,
display_nam
e
,
type
)
{
let
ops
=
{
selections
:
FILEKEY
.
RELATIVE_PATH
+
'
= ? AND
'
+
FILEKEY
.
TITL
E
+
'
= ? AND
'
+
FILEKEY
.
MEDIA_TYPE
+
'
=?
'
,
selectionArgs
:
[
path
,
titl
e
,
type
.
toString
()],
selections
:
FILEKEY
.
RELATIVE_PATH
+
'
= ? AND
'
+
FILEKEY
.
DISPLAY_NAM
E
+
'
= ? AND
'
+
FILEKEY
.
MEDIA_TYPE
+
'
=?
'
,
selectionArgs
:
[
path
,
display_nam
e
,
type
.
toString
()],
};
console
.
info
(
`
${
testNum
}
: fetchOps
${
JSON
.
stringify
(
ops
)}
`
)
return
ops
...
...
multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestCallback.test.ets
浏览文件 @
aafd8616
...
...
@@ -106,7 +106,7 @@ export default function mediaLibraryTestCallback(abilityContext) {
relativePath
:
'Audios/Static/'
,
size
:
1958311
,
mediaType
:
AUDIO_TYPE
.
toString
(),
title
:
'
01
'
,
title
:
'
test
'
,
artist
:
'元数据测试'
,
orientation
:
0
,
duration
:
'219600'
,
...
...
multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets
浏览文件 @
aafd8616
...
...
@@ -104,7 +104,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) {
relativePath
:
'Audios/Static/'
,
size
:
1958311
,
mediaType
:
AUDIO_TYPE
.
toString
(),
title
:
'
01
'
,
title
:
'
test
'
,
artist
:
'元数据测试'
,
orientation
:
0
,
duration
:
'219600'
,
...
...
multimedia/medialibrary/mediaLibrary_favorite/entry/src/main/ets/test/favoriteTestCallback.test.ets
浏览文件 @
aafd8616
...
...
@@ -130,7 +130,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_001_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_001_01'
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticCb/', '01', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticCb/', '01
.jpg
', IMAGE_TYPE)
await favoriteDefaultState(done, testNum, currentFetchOp)
});
...
...
@@ -144,7 +144,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_001_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_001_02'
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticCb/', '02', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticCb/', '02
.jpg
', IMAGE_TYPE)
await favoriteByTrue(done, testNum, currentFetchOp)
});
...
...
@@ -158,7 +158,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_001_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_001_03'
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticCb/', '03', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticCb/', '03
.jpg
', IMAGE_TYPE)
await favoriteByFalse(done, testNum, currentFetchOp)
});
...
...
@@ -172,7 +172,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_002_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_002_01'
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticCb/', '01', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticCb/', '01
.mp4
', VIDEO_TYPE)
await favoriteDefaultState(done, testNum, currentFetchOp)
});
...
...
@@ -186,7 +186,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_002_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_002_02'
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticCb/', '02', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticCb/', '02
.mp4
', VIDEO_TYPE)
await favoriteByTrue(done, testNum, currentFetchOp)
});
...
...
@@ -200,7 +200,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_002_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_002_03'
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticCb/', '03', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticCb/', '03
.mp4
', VIDEO_TYPE)
await favoriteByFalse(done, testNum, currentFetchOp)
});
...
...
@@ -214,7 +214,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_003_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_003_01'
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticCb/', '01', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticCb/', '01
.mp3
', AUDIO_TYPE)
await favoriteDefaultState(done, testNum, currentFetchOp)
});
...
...
@@ -228,7 +228,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_003_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_003_02'
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticCb/', '02', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticCb/', '02
.mp3
', AUDIO_TYPE)
await favoriteByTrue(done, testNum, currentFetchOp)
});
...
...
@@ -242,7 +242,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_003_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_003_03'
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticCb/', '03', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticCb/', '03
.mp3
', AUDIO_TYPE)
await favoriteByFalse(done, testNum, currentFetchOp)
});
...
...
@@ -256,7 +256,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_004_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_004_01'
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticCb/', '01', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticCb/', '01
.dat
', FILE_TYPE)
await favoriteDefaultState(done, testNum, currentFetchOp)
});
...
...
@@ -270,7 +270,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_004_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_004_02'
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticCb/', '02', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticCb/', '02
.dat
', FILE_TYPE)
await favoriteByTrue(done, testNum, currentFetchOp)
});
...
...
@@ -284,7 +284,7 @@ export default function favoriteTestCallbackTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_004_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_CALLBACK_004_03'
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticCb/', '03', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticCb/', '03
.dat
', FILE_TYPE)
await favoriteByFalse(done, testNum, currentFetchOp)
});
});
...
...
multimedia/medialibrary/mediaLibrary_favorite/entry/src/main/ets/test/favoriteTestPromise.test.ets
浏览文件 @
aafd8616
...
...
@@ -104,7 +104,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_001_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_001_01'
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticPro/', '01', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticPro/', '01
.jpg
', IMAGE_TYPE)
await favoriteDefaultState(done, testNum, currentFetchOp)
});
...
...
@@ -118,7 +118,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_001_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_001_02'
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticPro/', '02', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticPro/', '02
.jpg
', IMAGE_TYPE)
await favoriteByTrue(done, testNum, currentFetchOp)
});
...
...
@@ -132,7 +132,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_001_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_001_03'
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticPro/', '03', IMAGE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Pictures/StaticPro/', '03
.jpg
', IMAGE_TYPE)
await favoriteByFalse(done, testNum, currentFetchOp)
});
...
...
@@ -146,7 +146,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_002_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_002_01'
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticPro/', '01', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticPro/', '01
.mp4
', VIDEO_TYPE)
await favoriteDefaultState(done, testNum, currentFetchOp)
});
...
...
@@ -160,7 +160,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_002_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_002_02'
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticPro/', '02', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticPro/', '02
.mp4
', VIDEO_TYPE)
await favoriteByTrue(done, testNum, currentFetchOp)
});
...
...
@@ -174,7 +174,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_002_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_002_03'
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticPro/', '03', VIDEO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Videos/StaticPro/', '03
.mp4
', VIDEO_TYPE)
await favoriteByFalse(done, testNum, currentFetchOp)
});
...
...
@@ -188,7 +188,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_003_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_003_01'
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticPro/', '01', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticPro/', '01
.mp3
', AUDIO_TYPE)
await favoriteDefaultState(done, testNum, currentFetchOp)
});
...
...
@@ -202,7 +202,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_003_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_003_02'
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticPro/', '02', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticPro/', '02
.mp3
', AUDIO_TYPE)
await favoriteByTrue(done, testNum, currentFetchOp)
});
...
...
@@ -216,7 +216,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_003_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_003_03'
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticPro/', '03', AUDIO_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Audios/StaticPro/', '03
.mp3
', AUDIO_TYPE)
await favoriteByFalse(done, testNum, currentFetchOp)
});
...
...
@@ -230,7 +230,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_004_01', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_004_01'
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticPro/', '01', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticPro/', '01
.dat
', FILE_TYPE)
await favoriteDefaultState(done, testNum, currentFetchOp)
});
...
...
@@ -244,7 +244,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_004_02', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_004_02'
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticPro/', '02', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticPro/', '02
.dat
', FILE_TYPE)
await favoriteByTrue(done, testNum, currentFetchOp)
});
...
...
@@ -258,7 +258,7 @@ export default function favoriteTestPromiseTest(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_004_03', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FAV_ASSET_PROMISE_004_03'
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticPro/', '03', FILE_TYPE)
let currentFetchOp = nameFetchOps(testNum, 'Documents/StaticPro/', '03
.dat
', FILE_TYPE)
await favoriteByFalse(done, testNum, currentFetchOp)
});
});
...
...
multimedia/medialibrary/mediaLibrary_file/entry/src/main/ets/test/fileTestCallback.test.ets
浏览文件 @
aafd8616
...
...
@@ -168,7 +168,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_01'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_01'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'01'
,
IMAGE_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'01
.jpg
'
,
IMAGE_TYPE
)
let
name
=
'jpg'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_IMAGE
)
+
'create/'
let
type
=
IMAGE_TYPE
;
...
...
@@ -185,7 +185,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_02'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_02'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'02'
,
IMAGE_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'02
.jpg
'
,
IMAGE_TYPE
)
let
name
=
'jpg'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_IMAGE
)
+
'create/'
;
let
type
=
IMAGE_TYPE
;
...
...
@@ -204,7 +204,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_03'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_03'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'03'
,
IMAGE_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'03
.jpg
'
,
IMAGE_TYPE
)
let
name
=
'jpg'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_IMAGE
)
+
'create/'
;
let
type
=
IMAGE_TYPE
;
...
...
@@ -237,7 +237,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_08'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_08'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'04'
,
IMAGE_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'04
.jpg
'
,
IMAGE_TYPE
)
let
name
=
'jpg'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_IMAGE
)
+
'create/'
;
let
type
=
IMAGE_TYPE
;
...
...
@@ -256,7 +256,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_11'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_001_11'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'05'
,
IMAGE_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'05
.jpg
'
,
IMAGE_TYPE
)
let
name
=
'jpg'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_IMAGE
)
+
'create/'
;
let
type
=
IMAGE_TYPE
;
...
...
@@ -278,7 +278,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_01'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_01'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'01'
,
VIDEO_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'01
.mp4
'
,
VIDEO_TYPE
)
let
name
=
'mp4'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_VIDEO
)
+
'create/'
let
type
=
VIDEO_TYPE
;
...
...
@@ -295,7 +295,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_02'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_02'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'02'
,
VIDEO_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'02
.mp4
'
,
VIDEO_TYPE
)
let
name
=
'mp4'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_VIDEO
)
+
'create/'
;
let
type
=
VIDEO_TYPE
;
...
...
@@ -314,7 +314,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_03'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_03'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'03'
,
VIDEO_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'03
.mp4
'
,
VIDEO_TYPE
)
let
name
=
'mp4'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_VIDEO
)
+
'create/'
;
let
type
=
VIDEO_TYPE
;
...
...
@@ -347,7 +347,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_08'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_08'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'04'
,
VIDEO_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'04
.mp4
'
,
VIDEO_TYPE
)
let
name
=
'mp4'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_VIDEO
)
+
'create/'
;
let
type
=
VIDEO_TYPE
;
...
...
@@ -366,7 +366,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_11'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_002_11'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'05'
,
VIDEO_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'05
.mp4
'
,
VIDEO_TYPE
)
let
name
=
'mp4'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_VIDEO
)
+
'create/'
;
let
type
=
VIDEO_TYPE
;
...
...
@@ -387,7 +387,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_003_01'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_003_01'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Audios/Static/'
,
'01'
,
AUDIO_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Audios/Static/'
,
'01
.mp3
'
,
AUDIO_TYPE
)
let
name
=
'mp3'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_AUDIO
)
+
'create/'
let
type
=
AUDIO_TYPE
;
...
...
@@ -404,7 +404,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_003_02'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_003_02'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Audios/Static/'
,
'02'
,
AUDIO_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Audios/Static/'
,
'02
.mp3
'
,
AUDIO_TYPE
)
let
name
=
'mp3'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_AUDIO
)
+
'create/'
;
let
type
=
AUDIO_TYPE
;
...
...
@@ -423,7 +423,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_003_03'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_003_03'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Audios/Static/'
,
'03'
,
AUDIO_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Audios/Static/'
,
'03
.mp3
'
,
AUDIO_TYPE
)
let
name
=
'mp3'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_AUDIO
)
+
'create/'
;
let
type
=
AUDIO_TYPE
;
...
...
@@ -456,7 +456,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_003_08'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_003_08'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Audios/Static/'
,
'05'
,
AUDIO_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Audios/Static/'
,
'05
.mp3
'
,
AUDIO_TYPE
)
let
name
=
'mp3'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_AUDIO
)
+
'create/'
;
let
type
=
AUDIO_TYPE
;
...
...
@@ -478,7 +478,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_004_01'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_004_01'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Documents/Static/'
,
'01'
,
FILE_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Documents/Static/'
,
'01
.dat
'
,
FILE_TYPE
)
let
name
=
'dat'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_DOCUMENTS
)
+
'create/'
let
type
=
FILE_TYPE
;
...
...
@@ -495,7 +495,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_004_02'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_004_02'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Documents/Static/'
,
'02'
,
FILE_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Documents/Static/'
,
'02
.dat
'
,
FILE_TYPE
)
let
name
=
'dat'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_DOCUMENTS
)
+
'create/'
;
let
type
=
FILE_TYPE
;
...
...
@@ -514,7 +514,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_004_03'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_004_03'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Documents/Static/'
,
'03'
,
FILE_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Documents/Static/'
,
'03
.dat
'
,
FILE_TYPE
)
let
name
=
'dat'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_DOCUMENTS
)
+
'create/'
;
let
type
=
FILE_TYPE
;
...
...
@@ -547,7 +547,7 @@ export default function fileTestCallbackTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_004_08'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_CALLBACK_004_08'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Documents/Static/'
,
'04'
,
FILE_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Documents/Static/'
,
'04
.dat
'
,
FILE_TYPE
)
let
name
=
'dat'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_DOCUMENTS
)
+
'create/'
;
let
type
=
FILE_TYPE
;
...
...
multimedia/medialibrary/mediaLibrary_file/entry/src/main/ets/test/fileTestPromise.test.ets
浏览文件 @
aafd8616
...
...
@@ -150,7 +150,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_01'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_01'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'01'
,
IMAGE_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'01
.jpg
'
,
IMAGE_TYPE
)
let
name
=
'jpg'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_IMAGE
)
+
'create/'
let
type
=
IMAGE_TYPE
;
...
...
@@ -167,7 +167,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_02'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_02'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'02'
,
IMAGE_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'02
.jpg
'
,
IMAGE_TYPE
)
let
name
=
'jpg'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_IMAGE
)
+
'create/'
;
let
type
=
IMAGE_TYPE
;
...
...
@@ -186,7 +186,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_03'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_03'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'03'
,
IMAGE_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'03
.jpg
'
,
IMAGE_TYPE
)
let
name
=
'jpg'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_IMAGE
)
+
'create/'
;
let
type
=
IMAGE_TYPE
;
...
...
@@ -219,7 +219,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_08'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_08'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'04'
,
IMAGE_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'04
.jpg
'
,
IMAGE_TYPE
)
let
name
=
'jpg'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_IMAGE
)
+
'create/'
;
let
type
=
IMAGE_TYPE
;
...
...
@@ -238,7 +238,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_11'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_001_11'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'05'
,
IMAGE_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Pictures/Static/'
,
'05
.jpg
'
,
IMAGE_TYPE
)
let
name
=
'jpg'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_IMAGE
)
+
'create/'
;
let
type
=
IMAGE_TYPE
;
...
...
@@ -260,7 +260,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_01'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_01'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'01'
,
VIDEO_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'01
.mp4
'
,
VIDEO_TYPE
)
let
name
=
'mp4'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_VIDEO
)
+
'create/'
let
type
=
VIDEO_TYPE
;
...
...
@@ -277,7 +277,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_02'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_02'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'02'
,
VIDEO_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'02
.mp4
'
,
VIDEO_TYPE
)
let
name
=
'mp4'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_VIDEO
)
+
'create/'
;
let
type
=
VIDEO_TYPE
;
...
...
@@ -296,7 +296,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_03'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_03'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'03'
,
VIDEO_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'03
.mp4
'
,
VIDEO_TYPE
)
let
name
=
'mp4'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_VIDEO
)
+
'create/'
;
let
type
=
VIDEO_TYPE
;
...
...
@@ -329,7 +329,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_08'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_08'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'04'
,
VIDEO_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'04
.mp4
'
,
VIDEO_TYPE
)
let
name
=
'mp4'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_VIDEO
)
+
'create/'
;
let
type
=
VIDEO_TYPE
;
...
...
@@ -348,7 +348,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_11'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_002_11'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'05'
,
VIDEO_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Videos/Static/'
,
'05
.mp4
'
,
VIDEO_TYPE
)
let
name
=
'mp4'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_VIDEO
)
+
'create/'
;
let
type
=
VIDEO_TYPE
;
...
...
@@ -369,7 +369,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_003_01'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_003_01'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Audios/Static/'
,
'01'
,
AUDIO_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Audios/Static/'
,
'01
.mp3
'
,
AUDIO_TYPE
)
let
name
=
'mp3'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_AUDIO
)
+
'create/'
let
type
=
AUDIO_TYPE
;
...
...
@@ -386,7 +386,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_003_02'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_003_02'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Audios/Static/'
,
'02'
,
AUDIO_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Audios/Static/'
,
'02
.mp3
'
,
AUDIO_TYPE
)
let
name
=
'mp3'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_AUDIO
)
+
'create/'
;
let
type
=
AUDIO_TYPE
;
...
...
@@ -405,7 +405,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_003_03'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_003_03'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Audios/Static/'
,
'03'
,
AUDIO_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Audios/Static/'
,
'03
.mp3
'
,
AUDIO_TYPE
)
let
name
=
'mp3'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_AUDIO
)
+
'create/'
;
let
type
=
AUDIO_TYPE
;
...
...
@@ -438,7 +438,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_003_08'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_003_08'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Audios/Static/'
,
'05'
,
AUDIO_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Audios/Static/'
,
'05
.mp3
'
,
AUDIO_TYPE
)
let
name
=
'mp3'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_AUDIO
)
+
'create/'
;
let
type
=
AUDIO_TYPE
;
...
...
@@ -460,7 +460,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_004_01'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_004_01'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Documents/Static/'
,
'01'
,
FILE_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Documents/Static/'
,
'01
.dat
'
,
FILE_TYPE
)
let
name
=
'dat'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_DOCUMENTS
)
+
'create/'
let
type
=
FILE_TYPE
;
...
...
@@ -477,7 +477,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_004_02'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_004_02'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Documents/Static/'
,
'02'
,
FILE_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Documents/Static/'
,
'02
.dat
'
,
FILE_TYPE
)
let
name
=
'dat'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_DOCUMENTS
)
+
'create/'
;
let
type
=
FILE_TYPE
;
...
...
@@ -496,7 +496,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_004_03'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_004_03'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Documents/Static/'
,
'03'
,
FILE_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Documents/Static/'
,
'03
.dat
'
,
FILE_TYPE
)
let
name
=
'dat'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_DOCUMENTS
)
+
'create/'
;
let
type
=
FILE_TYPE
;
...
...
@@ -529,7 +529,7 @@ export default function fileTestPromiseTest(abilityContext) {
*/
it
(
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_004_08'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MEDIALIBRARY_CREATEASSET_PROMISE_004_08'
;
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Documents/Static/'
,
'04'
,
FILE_TYPE
)
let
currentFetchOp
=
nameFetchOps
(
testNum
,
'Documents/Static/'
,
'04
.dat
'
,
FILE_TYPE
)
let
name
=
'dat'
let
path
=
await
media
.
getPublicDirectory
(
mediaLibrary
.
DirectoryType
.
DIR_DOCUMENTS
)
+
'create/'
;
let
type
=
FILE_TYPE
;
...
...
multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetCallback2.test.ets
浏览文件 @
aafd8616
...
...
@@ -117,7 +117,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_001', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_001'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '01', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '01
.jpg
', IMAGE_TYPE);
let prop = 'displayName'
let val = new Date().getTime() + '.jpg'
await checkCommitModify(done, testNum, fetchOp, prop, val)
...
...
@@ -133,7 +133,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_002', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_002'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '02', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '02
.jpg
', IMAGE_TYPE);
let prop = 'title'
let val = new Date().getTime() + 'newTitle'
await checkCommitModify(done, testNum, fetchOp, prop, val)
...
...
@@ -149,7 +149,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_003', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_003'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '03', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '03
.jpg
', IMAGE_TYPE);
let prop = 'relativePath'
let val = 'Pictures/Temp/'
await checkCommitModify(done, testNum, fetchOp, prop, val)
...
...
@@ -166,7 +166,7 @@ export default function fileAssetCallback2Test(abilityContext) {
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_004', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_004'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '04', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '04
.jpg
', IMAGE_TYPE);
let prop = 'orientation'
let val = 1
await checkCommitModify(done, testNum, fetchOp, prop, val)
...
...
@@ -182,7 +182,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_005', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_005'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '05', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '05
.jpg
', IMAGE_TYPE);
let prop = 'displayName'
let val = "";
for (var i = 0; i < 83; i++) {
...
...
@@ -202,7 +202,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_006', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_006'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '06', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '06
.jpg
', IMAGE_TYPE);
let prop = 'displayName'
let val = "";
for (var i = 0; i < 251; i++) {
...
...
@@ -222,7 +222,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_007", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_007";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "07", IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "07
.jpg
", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 85; i++) {
...
...
@@ -241,7 +241,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_008", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_008";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "08", IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "08
.jpg
", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 255; i++) {
...
...
@@ -260,7 +260,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_009', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_009'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '09', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '09
.jpg
', IMAGE_TYPE);
let prop = 'displayName'
let val = "";
for (var i = 0; i < 84; i++) {
...
...
@@ -280,7 +280,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_010', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_010'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '010', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '010
.jpg
', IMAGE_TYPE);
let prop = 'displayName'
let val = "";
for (var i = 0; i < 252; i++) {
...
...
@@ -300,7 +300,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_011", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_011";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "011", IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "011
.jpg
", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 86; i++) {
...
...
@@ -319,7 +319,7 @@ export default function fileAssetCallback2Test(abilityContext) {
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_012", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_CALLBACK_012";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "012", IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyCb/", "012
.jpg
", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 256; i++) {
...
...
@@ -339,7 +339,7 @@ export default function fileAssetCallback2Test(abilityContext) {
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_ISDIRECTORY_CALLBACK_001', 0, async function (done) {
try {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_ISDIRECTORY_CALLBACK_001'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '013', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyCb/', '013
.jpg
', IMAGE_TYPE);
const fetchFileResult = await media.getFileAssets(fetchOp);
const asset = await fetchFileResult.getFirstObject();
asset.isDirectory((err, isDir) =>{
...
...
multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetPromise2.test.ets
浏览文件 @
aafd8616
...
...
@@ -127,7 +127,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_001', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_001'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '01', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '01
.jpg
', IMAGE_TYPE);
let prop = 'displayName'
let val = new Date().getTime() + '.jpg'
await checkCommitModify(done, testNum, fetchOp, prop, val)
...
...
@@ -143,7 +143,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_002', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_002'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '02', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '02
.jpg
', IMAGE_TYPE);
let prop = 'title'
let val = new Date().getTime() + 'newTitle'
await checkCommitModify(done, testNum, fetchOp, prop, val)
...
...
@@ -159,7 +159,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_003', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_003'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '03', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '03
.jpg
', IMAGE_TYPE);
let prop = 'relativePath'
let val = 'Pictures/Temp/'
await checkCommitModify(done, testNum, fetchOp, prop, val)
...
...
@@ -175,7 +175,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_004', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_004'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '04', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '04
.jpg
', IMAGE_TYPE);
let prop = 'orientation'
let val = 1
await checkCommitModify(done, testNum, fetchOp, prop, val)
...
...
@@ -191,7 +191,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_005', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_005'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '05', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '05
.jpg
', IMAGE_TYPE);
let prop = 'displayName'
let val = "";
for (var i = 0; i < 83; i++) {
...
...
@@ -211,7 +211,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_006', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_006'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '06', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '06
.jpg
', IMAGE_TYPE);
let prop = 'displayName'
let val = "";
for (var i = 0; i < 251; i++) {
...
...
@@ -231,7 +231,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_007', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_007'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '07', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '07
.jpg
', IMAGE_TYPE);
let prop = 'title'
let val = "";
for (var i = 0; i < 85; i++) {
...
...
@@ -250,7 +250,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_008", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_008";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyPro/", "08", IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyPro/", "08
.jpg
", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 255; i++) {
...
...
@@ -269,7 +269,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_009', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_009'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '09', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '09
.jpg
', IMAGE_TYPE);
let prop = 'displayName'
let val = "";
for (var i = 0; i < 84; i++) {
...
...
@@ -289,7 +289,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_010', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_010'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '010', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '010
.jpg
', IMAGE_TYPE);
let prop = 'displayName'
let val = "";
for (var i = 0; i < 252; i++) {
...
...
@@ -309,7 +309,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_011", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_011";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyPro/", "011", IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyPro/", "011
.jpg
", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 86; i++) {
...
...
@@ -328,7 +328,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it("SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_012", 0, async function (done) {
let testNum = "SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_012";
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyPro/", "012", IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, "Pictures/ModifyPro/", "012
.jpg
", IMAGE_TYPE);
let prop = "title";
let val = "";
for (var i = 0; i < 256; i++) {
...
...
@@ -347,7 +347,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_02_001', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_02_001'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '013', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '013
.jpg
', IMAGE_TYPE);
let prop = 'uri'
let val = 'newUri'
await staticPropsCommitModify(done, testNum, fetchOp, prop, val)
...
...
@@ -363,7 +363,7 @@ export default function fileAssetPromise2Test(abilityContext) {
*/
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_02_002', 0, async function (done) {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_COMMITMODIFY_PROMISE_02_002'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '014', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '014
.jpg
', IMAGE_TYPE);
let prop = 'mediaType'
let val = 'newMediaType'
await staticPropsCommitModify(done, testNum, fetchOp, prop, val)
...
...
@@ -380,7 +380,7 @@ export default function fileAssetPromise2Test(abilityContext) {
it('SUB_MEDIA_MEDIALIBRARY_FILEASSET_ISDIRECTORY_PROMISE_001', 0, async function (done) {
try {
let testNum = 'SUB_MEDIA_MEDIALIBRARY_FILEASSET_ISDIRECTORY_PROMISE_001'
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '015', IMAGE_TYPE);
let fetchOp = nameFetchOps(testNum, 'Pictures/ModifyPro/', '015
.jpg
', IMAGE_TYPE);
const fetchFileResult = await media.getFileAssets(fetchOp);
const asset = await fetchFileResult.getFirstObject();
const isDir = await asset.isDirectory();
...
...
鸿蒙社区
@harmonycommunity
mentioned in commit
1d2feecf
·
11月 23, 2022
mentioned in commit
1d2feecf
mentioned in commit 1d2feecfff265cad98c4d79ca317cc2037422e01
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录