Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
ac95ec71
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看板
未验证
提交
ac95ec71
编写于
8月 29, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 29, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5282 mediaLibray xts check dateModified change
Merge pull request !5282 from caochuan/dateModified
上级
813f3a54
8fb8250c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
59 addition
and
6 deletion
+59
-6
multimedia/medialibrary/common.js
multimedia/medialibrary/common.js
+11
-1
multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestCallback.test.ets
...entry/src/main/ets/test/mediaLibraryTestCallback.test.ets
+17
-2
multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets
.../entry/src/main/ets/test/mediaLibraryTestPromise.test.ets
+19
-3
multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestCallback.test.ets
...et/entry/src/main/ets/test/fileAssetTestCallback.test.ets
+6
-0
multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestPromise.test.ets
...set/entry/src/main/ets/test/fileAssetTestPromise.test.ets
+6
-0
未找到文件。
multimedia/medialibrary/common.js
浏览文件 @
ac95ec71
...
...
@@ -75,6 +75,15 @@ const idFetchOps = function (testNum, albumId) {
return
ops
}
const
fileIdFetchOps
=
function
(
testNum
,
id
)
{
let
ops
=
{
selections
:
FILEKEY
.
ID
+
"
= ?
"
,
selectionArgs
:
[
id
+
""
],
};
console
.
info
(
`
${
testNum
}
: fetchOps
${
JSON
.
stringify
(
ops
)}
`
);
return
ops
;
};
const
albumFetchOps
=
function
(
testNum
,
path
,
albumName
,
type
,
others
=
{
order
:
FILEKEY
.
DATE_ADDED
+
"
DESC
"
,
})
{
let
ops
=
{
...
...
@@ -214,4 +223,5 @@ export {
checkAlbumsCount
,
MODIFY_ERROR_CODE_01
,
isNum
,
}
fileIdFetchOps
,
};
multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestCallback.test.ets
浏览文件 @
ac95ec71
...
...
@@ -528,7 +528,7 @@ export default function mediaLibraryTestCallback(abilityContext) {
/**
* @tc.number : SUB_MEDIA_MIDIALIBRARY_CALLBACK_GETPUBLICDIRECTORY_004
* @tc.name : getPublicDirectory
* @tc.desc : getPublicDirectory DIR_
IMAGE
* @tc.desc : getPublicDirectory DIR_
AUDIO
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
...
...
@@ -549,7 +549,7 @@ export default function mediaLibraryTestCallback(abilityContext) {
* @tc.level : Level 0
*/
it
(
'SUB_MEDIA_MIDIALIBRARY_CALLBACK_GETPUBLICDIRECTORY_005'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MIDIALIBRARY_CALLBACK_GETPUBLICDIRECTORY_00
4
'
;
let
testNum
=
'SUB_MEDIA_MIDIALIBRARY_CALLBACK_GETPUBLICDIRECTORY_00
5
'
;
let
dir
=
mediaLibrary
.
DirectoryType
.
DIR_DOCUMENTS
;
let
val
=
'Documents/'
;
await
checkGetPublicDirectory
(
done
,
testNum
,
dir
,
val
)
...
...
@@ -576,6 +576,21 @@ export default function mediaLibraryTestCallback(abilityContext) {
}
});
/**
* @tc.number : SUB_MEDIA_MIDIALIBRARY_CALLBACK_GETPUBLICDIRECTORY_007
* @tc.name : getPublicDirectory
* @tc.desc : getPublicDirectory DIR_DOWNLOAD
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_MEDIA_MIDIALIBRARY_CALLBACK_GETPUBLICDIRECTORY_007'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MIDIALIBRARY_CALLBACK_GETPUBLICDIRECTORY_007'
;
let
dir
=
mediaLibrary
.
DirectoryType
.
DIR_DOWNLOAD
;
let
val
=
'Download/'
;
await
checkGetPublicDirectory
(
done
,
testNum
,
dir
,
val
)
});
/**
* @tc.number : SUB_MEDIA_MIDIALIBRARY_CALLBACK_CREATEASSET_001
* @tc.name : createAsset
...
...
multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets
浏览文件 @
ac95ec71
...
...
@@ -507,7 +507,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) {
/**
* @tc.number : SUB_MEDIA_MIDIALIBRARY_PROMISE_GETPUBLICDIRECTORY_004
* @tc.name : getPublicDirectory
* @tc.desc : getPublicDirectory DIR_
IMAGE
* @tc.desc : getPublicDirectory DIR_
AUDIO
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
...
...
@@ -522,13 +522,13 @@ export default function mediaLibraryTestPromiseTest(abilityContext) {
/**
* @tc.number : SUB_MEDIA_MIDIALIBRARY_PROMISE_GETPUBLICDIRECTORY_005
* @tc.name : getPublicDirectory
* @tc.desc : getPublicDirectory DIR_
IMAGE
* @tc.desc : getPublicDirectory DIR_
DOCUMENTS
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_MEDIA_MIDIALIBRARY_PROMISE_GETPUBLICDIRECTORY_005'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MIDIALIBRARY_PROMISE_GETPUBLICDIRECTORY_00
4
'
;
let
testNum
=
'SUB_MEDIA_MIDIALIBRARY_PROMISE_GETPUBLICDIRECTORY_00
5
'
;
let
dir
=
mediaLibrary
.
DirectoryType
.
DIR_DOCUMENTS
;
let
val
=
'Documents/'
;
await
checkGetPublicDirectory
(
done
,
testNum
,
dir
,
val
)
...
...
@@ -555,6 +555,22 @@ export default function mediaLibraryTestPromiseTest(abilityContext) {
}
});
/**
* @tc.number : SUB_MEDIA_MIDIALIBRARY_PROMISE_GETPUBLICDIRECTORY_007
* @tc.name : getPublicDirectory
* @tc.desc : getPublicDirectory DIR_DOWNLOAD
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_MEDIA_MIDIALIBRARY_PROMISE_GETPUBLICDIRECTORY_007'
,
0
,
async
function
(
done
)
{
let
testNum
=
'SUB_MEDIA_MIDIALIBRARY_PROMISE_GETPUBLICDIRECTORY_007'
;
let
dir
=
mediaLibrary
.
DirectoryType
.
DIR_DOWNLOAD
;
let
val
=
'Download/'
;
await
checkGetPublicDirectory
(
done
,
testNum
,
dir
,
val
)
});
/**
* @tc.number : SUB_MEDIA_MIDIALIBRARY_PROMISE_CREATEASSET_001
* @tc.name : createAsset
...
...
multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestCallback.test.ets
浏览文件 @
ac95ec71
...
...
@@ -26,6 +26,7 @@ import {
checkAssetsCount,
fetchOps,
isNum,
fileIdFetchOps,
} from '../../../../../../common';
export default function fileAssetTestCallbackTest(abilityContext) {
describe('fileAssetTestCallbackTest', function () {
...
...
@@ -76,6 +77,11 @@ export default function fileAssetTestCallbackTest(abilityContext) {
console.info(`fd1:${fd1},fd:${fd}`)
await asset.close(fd);
await asset1.close(fd1);
let newFetchFileResult = await media.getFileAssets(fileIdFetchOps(testNum, asset.id));
let checkAssetCountPass = await checkAssetsCount(done, testNum, newFetchFileResult, 1);
if (!checkAssetCountPass) return;
let newAsset = await newFetchFileResult.getFirstObject();
expect(newAsset.dateModified != asset.dateModified).assertTrue();
done();
});
...
...
multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestPromise.test.ets
浏览文件 @
ac95ec71
...
...
@@ -26,6 +26,7 @@ import {
checkAssetsCount,
fetchOps,
isNum,
fileIdFetchOps,
} from '../../../../../../common';
export default function fileAssetTestPromiseTest(abilityContext) {
describe('fileAssetTestPromiseTest', function () {
...
...
@@ -70,6 +71,11 @@ export default function fileAssetTestPromiseTest(abilityContext) {
console.info(`fd1:${fd1},fd:${fd}`)
await asset.close(fd);
await asset1.close(fd1);
let newFetchFileResult = await media.getFileAssets(fileIdFetchOps(testNum, asset.id));
checkAssetCountPass = await checkAssetsCount(done, testNum, newFetchFileResult, 1);
if (!checkAssetCountPass) return;
let newAsset = await newFetchFileResult.getFirstObject();
expect(newAsset.dateModified != asset.dateModified).assertTrue();
done();
} catch (error) {
console.info(`${testNum} :: error: ${error}`);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录