Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
03eb0b96
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看板
未验证
提交
03eb0b96
编写于
8月 01, 2023
作者:
O
openharmony_ci
提交者:
Gitee
8月 01, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9521 uri规格修改,xts适配修改
Merge pull request !9521 from yangbo/xts0727
上级
9a636b14
98970c75
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
82 addition
and
79 deletion
+82
-79
multimedia/photoAccess/photoAccess/entry/src/main/ets/test/PhotoAccessHelper/registerChange.ets
...ry/src/main/ets/test/PhotoAccessHelper/registerChange.ets
+4
-4
multimedia/photoAccess/photoAccess/entry/src/main/ets/test/PhotoAccessHelper/unRegisterChange.ets
.../src/main/ets/test/PhotoAccessHelper/unRegisterChange.ets
+10
-10
multimedia/photoAccess/photoAccess/entry/src/main/ets/test/PhotoAsset/commitModify.ets
...ccess/entry/src/main/ets/test/PhotoAsset/commitModify.ets
+2
-2
multimedia/photoAccess/photoAccess/entry/src/main/ets/test/PhotoAsset/get.ets
...ss/photoAccess/entry/src/main/ets/test/PhotoAsset/get.ets
+32
-32
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/publicApiTestWithSystemApi.ets
...em/entry/src/main/ets/test/publicApiTestWithSystemApi.ets
+34
-31
未找到文件。
multimedia/photoAccess/photoAccess/entry/src/main/ets/test/PhotoAccessHelper/registerChange.ets
浏览文件 @
03eb0b96
...
@@ -34,7 +34,7 @@ export default function registerChangeTest () {
...
@@ -34,7 +34,7 @@ export default function registerChangeTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_REGISTERCHANGE_CALLBACK_0100
* @tc.number : SUB_PHOTOACCESS_HELPER_REGISTERCHANGE_CALLBACK_0100
* @tc.name : registerChange_callback_001
* @tc.name : registerChange_callback_001
* @tc.desc : listening motify file
displayNam
e, type NOTIFY_UPDATE
* @tc.desc : listening motify file
titl
e, type NOTIFY_UPDATE
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
...
@@ -143,12 +143,12 @@ export default function registerChangeTest () {
...
@@ -143,12 +143,12 @@ export default function registerChangeTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_REGISTERCHANGE_CALLBACK_1100
* @tc.number : SUB_PHOTOACCESS_HELPER_REGISTERCHANGE_CALLBACK_1100
* @tc.name : registerChange_callback_011
* @tc.name : registerChange_callback_011
* @tc.desc : listening album
remove
Assets, type NOTIFY_ALBUM_ADD_ASSET
* @tc.desc : listening album
add
Assets, type NOTIFY_ALBUM_ADD_ASSET
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it('registerChange_callback_011',
0
, async function (done) {
it('registerChange_callback_011',
2
, async function (done) {
const testNum = 'registerChange_callback_011';
const testNum = 'registerChange_callback_011';
try {
try {
let albumName = 'testAlbum' + Date.now();
let albumName = 'testAlbum' + Date.now();
...
@@ -185,7 +185,7 @@ export default function registerChangeTest () {
...
@@ -185,7 +185,7 @@ export default function registerChangeTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it('registerChange_callback_012',
0
, async function (done) {
it('registerChange_callback_012',
2
, async function (done) {
const testNum = 'registerChange_callback_012';
const testNum = 'registerChange_callback_012';
try {
try {
let albumName = 'testAlbum' + Date.now();
let albumName = 'testAlbum' + Date.now();
...
...
multimedia/photoAccess/photoAccess/entry/src/main/ets/test/PhotoAccessHelper/unRegisterChange.ets
浏览文件 @
03eb0b96
...
@@ -32,7 +32,7 @@ export default function unRegisterChangeTest () {
...
@@ -32,7 +32,7 @@ export default function unRegisterChangeTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0100
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0100
* @tc.name : unRegisterChange_001
* @tc.name : unRegisterChange_001
* @tc.desc :
off listening motify file displayName, type NOTIFY_UPDATE
* @tc.desc :
unRegister listening motify file displayName
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
...
@@ -67,7 +67,7 @@ export default function unRegisterChangeTest () {
...
@@ -67,7 +67,7 @@ export default function unRegisterChangeTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0700
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0700
* @tc.name : unRegisterChange_007
* @tc.name : unRegisterChange_007
* @tc.desc :
off listening create album, type NOTIFY_ADD
* @tc.desc :
unRegister listening create album
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
...
@@ -98,7 +98,7 @@ export default function unRegisterChangeTest () {
...
@@ -98,7 +98,7 @@ export default function unRegisterChangeTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0800
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0800
* @tc.name : unRegisterChange_008
* @tc.name : unRegisterChange_008
* @tc.desc :
off listening create album, type NOTIFY_UPDATE
* @tc.desc :
unRegister listening create album
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
...
@@ -134,7 +134,7 @@ export default function unRegisterChangeTest () {
...
@@ -134,7 +134,7 @@ export default function unRegisterChangeTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_1000
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_1000
* @tc.name : unRegisterChange_010
* @tc.name : unRegisterChange_010
* @tc.desc :
off listening change album overUri, type NOTIFY_UPDATE
* @tc.desc :
unRegister listening change album overUri
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
...
@@ -173,7 +173,7 @@ export default function unRegisterChangeTest () {
...
@@ -173,7 +173,7 @@ export default function unRegisterChangeTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_1100
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_1100
* @tc.name : unRegisterChange_011
* @tc.name : unRegisterChange_011
* @tc.desc :
off listening album removeAssets, type NOTIFY_ALBUM_ADD_ASSET
* @tc.desc :
unRegister listening album addAssets
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
...
@@ -208,7 +208,7 @@ export default function unRegisterChangeTest () {
...
@@ -208,7 +208,7 @@ export default function unRegisterChangeTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_1200
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_1200
* @tc.name : unRegisterChange_012
* @tc.name : unRegisterChange_012
* @tc.desc :
off listening album removeAssets, type NOTIFY_ALBUM_REMOVE_ASSET
* @tc.desc :
unRegister listening album removeAssets
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
...
@@ -244,12 +244,12 @@ export default function unRegisterChangeTest () {
...
@@ -244,12 +244,12 @@ export default function unRegisterChangeTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_1500
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_1500
* @tc.name : unRegisterChange_015
* @tc.name : unRegisterChange_015
* @tc.desc :
off
remove all listening
* @tc.desc :
unRegister
remove all listening
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 3
* @tc.level : Level 3
*/
*/
it
(
'unRegisterChange_015'
,
0
,
async
function
(
done
)
{
it
(
'unRegisterChange_015'
,
3
,
async
function
(
done
)
{
const
testNum
=
'unRegisterChange_015'
;
const
testNum
=
'unRegisterChange_015'
;
try
{
try
{
let
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'off15.jpg'
);
let
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'off15.jpg'
);
...
@@ -283,12 +283,12 @@ export default function unRegisterChangeTest () {
...
@@ -283,12 +283,12 @@ export default function unRegisterChangeTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_CALLBACK_0000
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_CALLBACK_0000
* @tc.name : unRegisterChange_callback_000
* @tc.name : unRegisterChange_callback_000
* @tc.desc :
off
remove specified callback
* @tc.desc :
unRegister
remove specified callback
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 3
* @tc.level : Level 3
*/
*/
it
(
'unRegisterChange_callback_000'
,
0
,
async
function
(
done
)
{
it
(
'unRegisterChange_callback_000'
,
3
,
async
function
(
done
)
{
const
testNum
=
'unRegisterChange_callback_000'
;
const
testNum
=
'unRegisterChange_callback_000'
;
try
{
try
{
let
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'offCb01.jpg'
);
let
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'offCb01.jpg'
);
...
...
multimedia/photoAccess/photoAccess/entry/src/main/ets/test/PhotoAsset/commitModify.ets
浏览文件 @
03eb0b96
...
@@ -136,7 +136,7 @@ export default function commitModifyTest () {
...
@@ -136,7 +136,7 @@ export default function commitModifyTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_FILE_ASSET_COMMITMODIFY_0100
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_FILE_ASSET_COMMITMODIFY_0100
* @tc.name : photoAsset_commitModify_callback_001
* @tc.name : photoAsset_commitModify_callback_001
* @tc.desc : modify image displayName '一...' (8
4
)
* @tc.desc : modify image displayName '一...' (8
3
)
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
...
@@ -260,7 +260,7 @@ export default function commitModifyTest () {
...
@@ -260,7 +260,7 @@ export default function commitModifyTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_FILE_ASSET_COMMITMODIFY_0800
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_FILE_ASSET_COMMITMODIFY_0800
* @tc.name : photoAsset_commitModify_callback_008
* @tc.name : photoAsset_commitModify_callback_008
* @tc.desc : modify video displayName '三三...' (8
4
)
* @tc.desc : modify video displayName '三三...' (8
3
)
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
...
...
multimedia/photoAccess/photoAccess/entry/src/main/ets/test/PhotoAsset/get.ets
浏览文件 @
03eb0b96
...
@@ -58,7 +58,7 @@ export default function getTest () {
...
@@ -58,7 +58,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_000'
,
0
,
async
function
(
done
)
{
it
(
'get_000'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_000'
;
const
testNum
=
'get_000'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
key
=
photoKeys
.
URI
;
const
key
=
photoKeys
.
URI
;
...
@@ -74,7 +74,7 @@ export default function getTest () {
...
@@ -74,7 +74,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_001'
,
0
,
async
function
(
done
)
{
it
(
'get_001'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_001'
;
const
testNum
=
'get_001'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
key
=
photoKeys
.
PHOTO_TYPE
;
const
key
=
photoKeys
.
PHOTO_TYPE
;
...
@@ -90,7 +90,7 @@ export default function getTest () {
...
@@ -90,7 +90,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_002'
,
0
,
async
function
(
done
)
{
it
(
'get_002'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_002'
;
const
testNum
=
'get_002'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
key
=
photoKeys
.
DISPLAY_NAME
;
const
key
=
photoKeys
.
DISPLAY_NAME
;
...
@@ -106,7 +106,7 @@ export default function getTest () {
...
@@ -106,7 +106,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_003'
,
0
,
async
function
(
done
)
{
it
(
'get_003'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_003'
;
const
testNum
=
'get_003'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
key
=
photoKeys
.
DATE_ADDED
;
const
key
=
photoKeys
.
DATE_ADDED
;
...
@@ -122,7 +122,7 @@ export default function getTest () {
...
@@ -122,7 +122,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_004'
,
0
,
async
function
(
done
)
{
it
(
'get_004'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_004'
;
const
testNum
=
'get_004'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
key
=
photoKeys
.
DATE_MODIFIED
;
const
key
=
photoKeys
.
DATE_MODIFIED
;
...
@@ -138,7 +138,7 @@ export default function getTest () {
...
@@ -138,7 +138,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_005'
,
0
,
async
function
(
done
)
{
it
(
'get_005'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_005'
;
const
testNum
=
'get_005'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
key
=
photoKeys
.
DURATION
;
const
key
=
photoKeys
.
DURATION
;
...
@@ -154,7 +154,7 @@ export default function getTest () {
...
@@ -154,7 +154,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_006'
,
0
,
async
function
(
done
)
{
it
(
'get_006'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_006'
;
const
testNum
=
'get_006'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
key
=
photoKeys
.
WIDTH
;
const
key
=
photoKeys
.
WIDTH
;
...
@@ -170,7 +170,7 @@ export default function getTest () {
...
@@ -170,7 +170,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_007'
,
0
,
async
function
(
done
)
{
it
(
'get_007'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_007'
;
const
testNum
=
'get_007'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
key
=
photoKeys
.
HEIGHT
;
const
key
=
photoKeys
.
HEIGHT
;
...
@@ -186,7 +186,7 @@ export default function getTest () {
...
@@ -186,7 +186,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_008'
,
0
,
async
function
(
done
)
{
it
(
'get_008'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_008'
;
const
testNum
=
'get_008'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
key
=
photoKeys
.
DATE_TAKEN
;
const
key
=
photoKeys
.
DATE_TAKEN
;
...
@@ -202,7 +202,7 @@ export default function getTest () {
...
@@ -202,7 +202,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_009'
,
0
,
async
function
(
done
)
{
it
(
'get_009'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_009'
;
const
testNum
=
'get_009'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
key
=
photoKeys
.
ORIENTATION
;
const
key
=
photoKeys
.
ORIENTATION
;
...
@@ -218,7 +218,7 @@ export default function getTest () {
...
@@ -218,7 +218,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_010'
,
0
,
async
function
(
done
)
{
it
(
'get_010'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_010'
;
const
testNum
=
'get_010'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
key
=
photoKeys
.
FAVORITE
;
const
key
=
photoKeys
.
FAVORITE
;
...
@@ -234,7 +234,7 @@ export default function getTest () {
...
@@ -234,7 +234,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_011'
,
0
,
async
function
(
done
)
{
it
(
'get_011'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_011'
;
const
testNum
=
'get_011'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
key
=
photoKeys
.
SIZE
;
const
key
=
photoKeys
.
SIZE
;
...
@@ -250,7 +250,7 @@ export default function getTest () {
...
@@ -250,7 +250,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_012'
,
0
,
async
function
(
done
)
{
it
(
'get_012'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_012'
;
const
testNum
=
'get_012'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
key
=
photoKeys
.
TITLE
;
const
key
=
photoKeys
.
TITLE
;
...
@@ -266,7 +266,7 @@ export default function getTest () {
...
@@ -266,7 +266,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_013'
,
0
,
async
function
(
done
)
{
it
(
'get_013'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_013'
;
const
testNum
=
'get_013'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
key
=
photoKeys
.
POSITION
;
const
key
=
photoKeys
.
POSITION
;
...
@@ -282,7 +282,7 @@ export default function getTest () {
...
@@ -282,7 +282,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_014'
,
0
,
async
function
(
done
)
{
it
(
'get_014'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_014'
;
const
testNum
=
'get_014'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
key
=
photoKeys
.
DATE_TRASHED
;
const
key
=
photoKeys
.
DATE_TRASHED
;
...
@@ -298,7 +298,7 @@ export default function getTest () {
...
@@ -298,7 +298,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_015'
,
0
,
async
function
(
done
)
{
it
(
'get_015'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_015'
;
const
testNum
=
'get_015'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.jpg'
);
const
key
=
photoKeys
.
HIDDEN
;
const
key
=
photoKeys
.
HIDDEN
;
...
@@ -315,7 +315,7 @@ export default function getTest () {
...
@@ -315,7 +315,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_050'
,
0
,
async
function
(
done
)
{
it
(
'get_050'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_050'
;
const
testNum
=
'get_050'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
key
=
photoKeys
.
URI
;
const
key
=
photoKeys
.
URI
;
...
@@ -331,7 +331,7 @@ export default function getTest () {
...
@@ -331,7 +331,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_051'
,
0
,
async
function
(
done
)
{
it
(
'get_051'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_051'
;
const
testNum
=
'get_051'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
key
=
photoKeys
.
PHOTO_TYPE
;
const
key
=
photoKeys
.
PHOTO_TYPE
;
...
@@ -347,7 +347,7 @@ export default function getTest () {
...
@@ -347,7 +347,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_052'
,
0
,
async
function
(
done
)
{
it
(
'get_052'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_052'
;
const
testNum
=
'get_052'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
key
=
photoKeys
.
DISPLAY_NAME
;
const
key
=
photoKeys
.
DISPLAY_NAME
;
...
@@ -363,7 +363,7 @@ export default function getTest () {
...
@@ -363,7 +363,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_053'
,
0
,
async
function
(
done
)
{
it
(
'get_053'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_053'
;
const
testNum
=
'get_053'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
key
=
photoKeys
.
DATE_ADDED
;
const
key
=
photoKeys
.
DATE_ADDED
;
...
@@ -379,7 +379,7 @@ export default function getTest () {
...
@@ -379,7 +379,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_054'
,
0
,
async
function
(
done
)
{
it
(
'get_054'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_054'
;
const
testNum
=
'get_054'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
key
=
photoKeys
.
DATE_MODIFIED
;
const
key
=
photoKeys
.
DATE_MODIFIED
;
...
@@ -395,7 +395,7 @@ export default function getTest () {
...
@@ -395,7 +395,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_055'
,
0
,
async
function
(
done
)
{
it
(
'get_055'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_055'
;
const
testNum
=
'get_055'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
key
=
photoKeys
.
DURATION
;
const
key
=
photoKeys
.
DURATION
;
...
@@ -411,7 +411,7 @@ export default function getTest () {
...
@@ -411,7 +411,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_056'
,
0
,
async
function
(
done
)
{
it
(
'get_056'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_056'
;
const
testNum
=
'get_056'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
key
=
photoKeys
.
WIDTH
;
const
key
=
photoKeys
.
WIDTH
;
...
@@ -427,7 +427,7 @@ export default function getTest () {
...
@@ -427,7 +427,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_057'
,
0
,
async
function
(
done
)
{
it
(
'get_057'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_057'
;
const
testNum
=
'get_057'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
key
=
photoKeys
.
HEIGHT
;
const
key
=
photoKeys
.
HEIGHT
;
...
@@ -443,7 +443,7 @@ export default function getTest () {
...
@@ -443,7 +443,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_058'
,
0
,
async
function
(
done
)
{
it
(
'get_058'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_058'
;
const
testNum
=
'get_058'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
key
=
photoKeys
.
DATE_TAKEN
;
const
key
=
photoKeys
.
DATE_TAKEN
;
...
@@ -459,7 +459,7 @@ export default function getTest () {
...
@@ -459,7 +459,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_059'
,
0
,
async
function
(
done
)
{
it
(
'get_059'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_059'
;
const
testNum
=
'get_059'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
key
=
photoKeys
.
ORIENTATION
;
const
key
=
photoKeys
.
ORIENTATION
;
...
@@ -475,7 +475,7 @@ export default function getTest () {
...
@@ -475,7 +475,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_060'
,
0
,
async
function
(
done
)
{
it
(
'get_060'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_060'
;
const
testNum
=
'get_060'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
key
=
photoKeys
.
FAVORITE
;
const
key
=
photoKeys
.
FAVORITE
;
...
@@ -491,7 +491,7 @@ export default function getTest () {
...
@@ -491,7 +491,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_061'
,
0
,
async
function
(
done
)
{
it
(
'get_061'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_061'
;
const
testNum
=
'get_061'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
key
=
photoKeys
.
SIZE
;
const
key
=
photoKeys
.
SIZE
;
...
@@ -507,7 +507,7 @@ export default function getTest () {
...
@@ -507,7 +507,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_062'
,
0
,
async
function
(
done
)
{
it
(
'get_062'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_062'
;
const
testNum
=
'get_062'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
key
=
photoKeys
.
TITLE
;
const
key
=
photoKeys
.
TITLE
;
...
@@ -523,7 +523,7 @@ export default function getTest () {
...
@@ -523,7 +523,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_063'
,
0
,
async
function
(
done
)
{
it
(
'get_063'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_063'
;
const
testNum
=
'get_063'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
key
=
photoKeys
.
POSITION
;
const
key
=
photoKeys
.
POSITION
;
...
@@ -539,7 +539,7 @@ export default function getTest () {
...
@@ -539,7 +539,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_064'
,
0
,
async
function
(
done
)
{
it
(
'get_064'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_064'
;
const
testNum
=
'get_064'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
key
=
photoKeys
.
DATE_TRASHED
;
const
key
=
photoKeys
.
DATE_TRASHED
;
...
@@ -555,7 +555,7 @@ export default function getTest () {
...
@@ -555,7 +555,7 @@ export default function getTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'get_065'
,
0
,
async
function
(
done
)
{
it
(
'get_065'
,
2
,
async
function
(
done
)
{
const
testNum
=
'get_065'
;
const
testNum
=
'get_065'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'01.mp4'
);
const
key
=
photoKeys
.
HIDDEN
;
const
key
=
photoKeys
.
HIDDEN
;
...
...
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/publicApiTestWithSystemApi.ets
浏览文件 @
03eb0b96
...
@@ -269,7 +269,7 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -269,7 +269,7 @@ export default function publicApiTestWithSystemApiTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0000
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0000
* @tc.name : unRegisterChange_000
* @tc.name : unRegisterChange_000
* @tc.desc :
off listening create file, type NOTIFY_ADD
* @tc.desc :
unRegister listening create file
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
...
@@ -304,7 +304,7 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -304,7 +304,7 @@ export default function publicApiTestWithSystemApiTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0200
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0200
* @tc.name : unRegisterChange_002
* @tc.name : unRegisterChange_002
* @tc.desc :
off listening setFavorite(true) file, type NOTIFY_UPDATE
* @tc.desc :
unRegister listening setFavorite(true) file
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
...
@@ -337,7 +337,7 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -337,7 +337,7 @@ export default function publicApiTestWithSystemApiTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0300
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0300
* @tc.name : unRegisterChange_003
* @tc.name : unRegisterChange_003
* @tc.desc :
off listening setFavorite(false) file, type NOTIFY_UPDATE
* @tc.desc :
unRegister listening setFavorite(false) file
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
...
@@ -371,12 +371,12 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -371,12 +371,12 @@ export default function publicApiTestWithSystemApiTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0400
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0400
* @tc.name : unRegisterChange_004
* @tc.name : unRegisterChange_004
* @tc.desc :
off listening delete file, type NOTIFY_REMOVE
* @tc.desc :
unRegister listening delete file
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'unRegisterChange_004'
,
0
,
async
function
(
done
)
{
it
(
'unRegisterChange_004'
,
2
,
async
function
(
done
)
{
const
testNum
=
'unRegisterChange_004'
;
const
testNum
=
'unRegisterChange_004'
;
try
{
try
{
const
fetchOps
=
fetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'off04.jpg'
);
const
fetchOps
=
fetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'off04.jpg'
);
...
@@ -404,12 +404,12 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -404,12 +404,12 @@ export default function publicApiTestWithSystemApiTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0500
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0500
* @tc.name : unRegisterChange_005
* @tc.name : unRegisterChange_005
* @tc.desc :
off listening recover file, type NOTIFY_ADD
* @tc.desc :
unRegister listening recover file
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'unRegisterChange_005'
,
0
,
async
function
(
done
)
{
it
(
'unRegisterChange_005'
,
2
,
async
function
(
done
)
{
const
testNum
=
'unRegisterChange_005'
;
const
testNum
=
'unRegisterChange_005'
;
try
{
try
{
let
testFileName
=
'testCreateFile'
+
Date
.
now
()
+
'.jpg'
;
let
testFileName
=
'testCreateFile'
+
Date
.
now
()
+
'.jpg'
;
...
@@ -447,12 +447,12 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -447,12 +447,12 @@ export default function publicApiTestWithSystemApiTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0600
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0600
* @tc.name : unRegisterChange_006
* @tc.name : unRegisterChange_006
* @tc.desc :
off listening trash delete file, type NOTIFY_REMOVE
* @tc.desc :
unRegister listening trash delete file
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'unRegisterChange_006'
,
0
,
async
function
(
done
)
{
it
(
'unRegisterChange_006'
,
2
,
async
function
(
done
)
{
const
testNum
=
'unRegisterChange_006'
;
const
testNum
=
'unRegisterChange_006'
;
try
{
try
{
let
testFileName
=
'testCreateFile'
+
Date
.
now
()
+
'.jpg'
;
let
testFileName
=
'testCreateFile'
+
Date
.
now
()
+
'.jpg'
;
...
@@ -488,7 +488,7 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -488,7 +488,7 @@ export default function publicApiTestWithSystemApiTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0900
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0900
* @tc.name : unRegisterChange_009
* @tc.name : unRegisterChange_009
* @tc.desc :
off listening delete album, type NOTIFY_REMOVE
* @tc.desc :
unRegister listening delete album
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
...
@@ -521,12 +521,12 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -521,12 +521,12 @@ export default function publicApiTestWithSystemApiTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_1300
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_1300
* @tc.name : unRegisterChange_013
* @tc.name : unRegisterChange_013
* @tc.desc :
off
listening DEFAULT_ALBUM_URI
* @tc.desc :
unRegister
listening DEFAULT_ALBUM_URI
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 3
* @tc.level : Level 3
*/
*/
it
(
'unRegisterChange_013'
,
0
,
async
function
(
done
)
{
it
(
'unRegisterChange_013'
,
3
,
async
function
(
done
)
{
const
testNum
=
'unRegisterChange_013'
;
const
testNum
=
'unRegisterChange_013'
;
try
{
try
{
const
fetchOps
=
fetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'off13.jpg'
);
const
fetchOps
=
fetchOption
(
testNum
,
photoKeys
.
DISPLAY_NAME
,
'off13.jpg'
);
...
@@ -581,12 +581,12 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -581,12 +581,12 @@ export default function publicApiTestWithSystemApiTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_1400
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_1400
* @tc.name : unRegisterChange_014
* @tc.name : unRegisterChange_014
* @tc.desc :
off
listening DEFAULT_PHOTO_URI
* @tc.desc :
unRegister
listening DEFAULT_PHOTO_URI
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 3
* @tc.level : Level 3
*/
*/
it
(
'unRegisterChange_014'
,
0
,
async
function
(
done
)
{
it
(
'unRegisterChange_014'
,
3
,
async
function
(
done
)
{
const
testNum
=
'unRegisterChange_014'
;
const
testNum
=
'unRegisterChange_014'
;
try
{
try
{
let
listenCount
=
0
;
let
listenCount
=
0
;
...
@@ -638,7 +638,7 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -638,7 +638,7 @@ export default function publicApiTestWithSystemApiTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_REGISTERCHANGE_CALLBACK_0000
* @tc.number : SUB_PHOTOACCESS_HELPER_REGISTERCHANGE_CALLBACK_0000
* @tc.name : registerChange_callback_000
* @tc.name : registerChange_callback_000
* @tc.desc :
off
listening create file, type NOTIFY_ADD
* @tc.desc : listening create file, type NOTIFY_ADD
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 0
* @tc.level : Level 0
...
@@ -758,7 +758,7 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -758,7 +758,7 @@ export default function publicApiTestWithSystemApiTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'registerChange_callback_005'
,
0
,
async
function
(
done
)
{
it
(
'registerChange_callback_005'
,
2
,
async
function
(
done
)
{
const
testNum
=
'registerChange_callback_005'
;
const
testNum
=
'registerChange_callback_005'
;
let
uri
;
let
uri
;
try
{
try
{
...
@@ -800,12 +800,12 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -800,12 +800,12 @@ export default function publicApiTestWithSystemApiTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_REGISTERCHANGE_CALLBACK_0600
* @tc.number : SUB_PHOTOACCESS_HELPER_REGISTERCHANGE_CALLBACK_0600
* @tc.name : registerChange_callback_006
* @tc.name : registerChange_callback_006
* @tc.desc : listening trash delete file, type NOTIFY_
REMOVE
* @tc.desc : listening trash delete file, type NOTIFY_
ALBUM_REMOVE_ASSET
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 2
*/
*/
it
(
'registerChange_callback_006'
,
0
,
async
function
(
done
)
{
it
(
'registerChange_callback_006'
,
2
,
async
function
(
done
)
{
const
testNum
=
'registerChange_callback_006'
;
const
testNum
=
'registerChange_callback_006'
;
let
uri
;
let
uri
;
try
{
try
{
...
@@ -894,7 +894,7 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -894,7 +894,7 @@ export default function publicApiTestWithSystemApiTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 3
* @tc.level : Level 3
*/
*/
it
(
'registerChange_callback_013'
,
0
,
async
function
(
done
)
{
it
(
'registerChange_callback_013'
,
3
,
async
function
(
done
)
{
const
testNum
=
'registerChange_callback_013'
;
const
testNum
=
'registerChange_callback_013'
;
let
uri
;
let
uri
;
try
{
try
{
...
@@ -1023,7 +1023,7 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -1023,7 +1023,7 @@ export default function publicApiTestWithSystemApiTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 3
* @tc.level : Level 3
*/
*/
it
(
'registerChange_callback_014'
,
0
,
async
function
(
done
)
{
it
(
'registerChange_callback_014'
,
3
,
async
function
(
done
)
{
const
testNum
=
'registerChange_callback_014'
;
const
testNum
=
'registerChange_callback_014'
;
let
uri
;
let
uri
;
try
{
try
{
...
@@ -1033,23 +1033,27 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -1033,23 +1033,27 @@ export default function publicApiTestWithSystemApiTest () {
let
photoAssetUri
=
asset
.
uri
;
let
photoAssetUri
=
asset
.
uri
;
await
sleep
(
550
);
await
sleep
(
550
);
uri
=
DEFAULT_PHOTO_URI
;
uri
=
DEFAULT_PHOTO_URI
;
let
expectUri
=
photoAssetUri
;
helper
.
registerChange
(
uri
,
true
,
async
(
changeData
)
=>
{
helper
.
registerChange
(
uri
,
true
,
async
(
changeData
)
=>
{
listenCount
++
;
listenCount
++
;
switch
(
listenCount
)
{
switch
(
listenCount
)
{
case
1
:
case
1
:
console
.
info
(
`${testNum} 1 changeData: ${JSON.stringify(changeData)}`
);
console
.
info
(
`${testNum} 1 changeData: ${JSON.stringify(changeData)}`
);
expect
(
changeData
.
type
)
.
assertEqual
(
NOTIFY_UPDATE
);
expect
(
changeData
.
type
)
.
assertEqual
(
NOTIFY_UPDATE
);
expect
(
changeData
.
uris
[
0
])
.
assertEqual
(
photoAsse
tUri
);
expect
(
changeData
.
uris
[
0
])
.
assertEqual
(
expec
tUri
);
break
;
break
;
case
2
:
case
2
:
console
.
info
(
`${testNum} 2 changeData: ${JSON.stringify(changeData)}`
);
console
.
info
(
`${testNum} 2 changeData: ${JSON.stringify(changeData)}`
);
const
option
=
fetchOption
(
testNum
,
photoKeys
.
URI
,
photoAssetUri
);
const
newAsset
=
await
getFileAsset
(
testNum
,
option
);
expectUri
=
newAsset
.
uri
;
expect
(
changeData
.
type
)
.
assertEqual
(
NOTIFY_UPDATE
);
expect
(
changeData
.
type
)
.
assertEqual
(
NOTIFY_UPDATE
);
expect
(
changeData
.
uris
[
0
])
.
assertEqual
(
photoAsse
tUri
);
expect
(
changeData
.
uris
[
0
])
.
assertEqual
(
expec
tUri
);
break
;
break
;
case
3
:
case
3
:
console
.
info
(
`${testNum} 3 changeData: ${JSON.stringify(changeData)}`
);
console
.
info
(
`${testNum} 3 changeData: ${JSON.stringify(changeData)}`
);
expect
(
changeData
.
type
)
.
assertEqual
(
NOTIFY_UPDATE
);
expect
(
changeData
.
type
)
.
assertEqual
(
NOTIFY_UPDATE
);
expect
(
changeData
.
uris
[
0
])
.
assertEqual
(
photoAsse
tUri
);
expect
(
changeData
.
uris
[
0
])
.
assertEqual
(
expec
tUri
);
break
;
break
;
default
:
default
:
break
;
break
;
...
@@ -1082,12 +1086,12 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -1082,12 +1086,12 @@ export default function publicApiTestWithSystemApiTest () {
/**
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_REGISTERCHANGE_CALLBACK_1500
* @tc.number : SUB_PHOTOACCESS_HELPER_REGISTERCHANGE_CALLBACK_1500
* @tc.name : registerChange_callback_015
* @tc.name : registerChange_callback_015
* @tc.desc : listening
32
* @tc.desc : listening
in 500ms, notify times lessthan update times
* @tc.size : MEDIUM
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 3
* @tc.level : Level 3
*/
*/
it
(
'registerChange_callback_015'
,
0
,
async
function
(
done
)
{
it
(
'registerChange_callback_015'
,
3
,
async
function
(
done
)
{
const
testNum
=
'registerChange_callback_015'
;
const
testNum
=
'registerChange_callback_015'
;
let
uri
;
let
uri
;
try
{
try
{
...
@@ -1101,19 +1105,18 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -1101,19 +1105,18 @@ export default function publicApiTestWithSystemApiTest () {
helper
.
registerChange
(
DEFAULT_PHOTO_URI
,
true
,
async
(
changeData
)
=>
{
helper
.
registerChange
(
DEFAULT_PHOTO_URI
,
true
,
async
(
changeData
)
=>
{
listenCount
++
;
listenCount
++
;
console
.
info
(
`${testNum} i: ${i}, listenCount: ${listenCount}`
);
console
.
info
(
`${testNum} i: ${i}, listenCount: ${listenCount}`
);
expect
(
i
>
1
)
.
assertTrue
()
expect
(
listenCount
<
i
)
.
assertTrue
()
console
.
info
(
`${testNum} changeData: ${JSON.stringify(changeData)}`
);
console
.
info
(
`${testNum} changeData: ${JSON.stringify(changeData)}`
);
expect
(
changeData
.
type
)
.
assertEqual
(
NOTIFY_UPDATE
);
expect
(
changeData
.
type
)
.
assertEqual
(
NOTIFY_UPDATE
);
expect
(
changeData
.
uris
[
0
])
.
assertEqual
(
asset
.
uri
);
expect
(
changeData
.
uris
[
0
])
.
assertEqual
(
asset
.
uri
);
});
});
await
sleep
(
550
);
await
sleep
(
550
);
const
isFav
=
(
asset
.
get
(
photoKeys
.
FAVORITE
)
===
1
)
?
true
:
false
;
const
endTime
=
Date
.
now
()
+
500
;
const
endTime
=
Date
.
now
()
+
500
;
for
(
let
now
=
Date
.
now
();
now
<
endTime
;
now
=
Date
.
now
())
{
for
(
let
now
=
Date
.
now
();
now
<
endTime
;
now
=
Date
.
now
())
{
i
++
;
i
++
;
const
newTitle
=
asset
.
get
(
photoKeys
.
TITLE
)
.
toString
()
+
i
;
await
asset
.
setFavorite
(
!
isFav
);
asset
.
set
(
photoKeys
.
TITLE
,
newTitle
);
await
asset
.
commitModify
();
}
}
await
sleep
(
1000
);
await
sleep
(
1000
);
done
();
done
();
...
@@ -1134,7 +1137,7 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -1134,7 +1137,7 @@ export default function publicApiTestWithSystemApiTest () {
* @tc.type : Function
* @tc.type : Function
* @tc.level : Level 3
* @tc.level : Level 3
*/
*/
it
(
'registerChange_callback_016'
,
0
,
async
function
(
done
)
{
it
(
'registerChange_callback_016'
,
3
,
async
function
(
done
)
{
const
testNum
=
'registerChange_callback_016'
;
const
testNum
=
'registerChange_callback_016'
;
let
uri
;
let
uri
;
try
{
try
{
...
@@ -1158,7 +1161,7 @@ export default function publicApiTestWithSystemApiTest () {
...
@@ -1158,7 +1161,7 @@ export default function publicApiTestWithSystemApiTest () {
}
else
{
}
else
{
await
asset
.
setFavorite
(
false
);
await
asset
.
setFavorite
(
false
);
}
}
await
sleep
(
5
5
0
);
await
sleep
(
5
0
0
);
}
}
await
sleep
(
1000
);
await
sleep
(
1000
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录