Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
852a3961
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看板
未验证
提交
852a3961
编写于
8月 07, 2023
作者:
O
openharmony_ci
提交者:
Gitee
8月 07, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9667 add cameraShotKey xts tests
Merge pull request !9667 from shenshensun/cameraShotKey
上级
b963a58e
53278d09
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
611 addition
and
98 deletion
+611
-98
multimedia/photoAccess/common.ts
multimedia/photoAccess/common.ts
+2
-1
multimedia/photoAccess/photoAccess/entry/src/main/ets/test/PhotoAccessHelper/unRegisterChange.ets
.../src/main/ets/test/PhotoAccessHelper/unRegisterChange.ets
+1
-1
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/createAsset.ets
...photoAccessSystem/entry/src/main/ets/test/createAsset.ets
+608
-96
未找到文件。
multimedia/photoAccess/common.ts
浏览文件 @
852a3961
...
...
@@ -80,6 +80,7 @@ export function photoFetchOption(testNum, key, value) : photoAccessHelper.FetchO
photoKeys
.
POSITION
,
photoKeys
.
DATE_TRASHED
,
photoKeys
.
HIDDEN
,
photoKeys
.
CAMERA_SHOT_KEY
,
],
predicates
:
predicates
};
...
...
@@ -161,7 +162,7 @@ export async function createUserAlbum(testNum, albumName) : Promise<photoAccessH
console
.
info
(
`Failed to createUserAlbum! error:
${
error
}
`
);
throw
error
;
}
return
new
Promise
((
resolve
,
reject
)
=>
{
resolve
(
album
);
});
...
...
multimedia/photoAccess/photoAccess/entry/src/main/ets/test/PhotoAccessHelper/unRegisterChange.ets
浏览文件 @
852a3961
...
...
@@ -32,7 +32,7 @@ export default function unRegisterChangeTest () {
/**
* @tc.number : SUB_PHOTOACCESS_UNREGISTERCHANGE_0100
* @tc.name : unRegisterChange_001
* @tc.desc : unRegister listening motify file
displayNam
e
* @tc.desc : unRegister listening motify file
titl
e
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
...
...
multimedia/photoAccess/photoAccessSystem/entry/src/main/ets/test/createAsset.ets
浏览文件 @
852a3961
...
...
@@ -17,6 +17,9 @@
import
photoAccessHelper
from
'@ohos.file.photoAccessHelper'
import
{
describe
,
beforeAll
,
it
,
expect
}
from
'deccjsunit/index'
import
{
photoKeys
,
photoFetchOption
,
getFileAsset
,
getPermission
}
from
'../../../../../../common'
...
...
@@ -30,7 +33,7 @@ export default function createAssetTest () {
async
function
createAssetCallback1
(
done
,
testNum
,
displayName
)
{
try
{
helper
.
createAsset
(
displayName
,
(
err
,
createAsset
)
=>
{
helper
.
createAsset
(
displayName
,
(
err
,
createAsset
)
=>
{
try
{
if
(
err
!==
undefined
)
{
console
.
info
(
`${testNum} createAsset failed; err: ${err}`
);
...
...
@@ -44,21 +47,49 @@ export default function createAssetTest () {
done
();
})
}
catch
(
error
)
{
console
.
info
(
`${testNum} failed; error: ${error}`
);
expect
(
false
)
.
assertTrue
();
done
();
console
.
info
(
`${testNum} failed; error: ${error}`
);
expect
(
false
)
.
assertTrue
();
done
();
}
}
async
function
createAssetCallback2
(
done
,
testNum
,
displayName
,
createOption
)
{
try
{
helper
.
createAsset
(
displayName
,
createOption
,
(
err
,
createAsset
)
=>
{
helper
.
createAsset
(
displayName
,
createOption
,
(
err
,
createAsset
)
=>
{
try
{
if
(
err
!==
undefined
)
{
console
.
info
(
`${testNum} createAsset failed; err: ${err}`
);
expect
(
false
)
.
assertTrue
();
}
else
{
expect
(
createAsset
.
displayName
)
.
assertEqual
(
displayName
);
}
}
catch
(
error
)
{
console
.
info
(
`${testNum} createAsset failed; error: ${error}`
);
}
done
();
})
}
catch
(
error
)
{
console
.
info
(
`${testNum} failed; error: ${error}`
);
expect
(
false
)
.
assertTrue
();
done
();
}
}
async
function
createAssetCallback3
(
done
,
testNum
,
displayName
,
createOption
,
fetchOps
)
{
let
asset
:
photoAccessHelper
.
PhotoAsset
;
try
{
helper
.
createAsset
(
displayName
,
createOption
,
async
(
err
,
createAsset
)
=>
{
try
{
if
(
err
!==
undefined
)
{
console
.
info
(
`${testNum} createAsset failed; err: ${err}`
);
expect
(
false
)
.
assertTrue
();
}
else
{
let
fd
=
await
createAsset
.
open
(
"rw"
);
await
createAsset
.
close
(
fd
);
expect
(
createAsset
.
displayName
)
.
assertEqual
(
displayName
);
asset
=
await
getFileAsset
(
testNum
,
fetchOps
);
console
.
info
(
`${testNum} createAsset displayName: ${asset.displayName}`
);
expect
(
asset
.
displayName
)
.
assertEqual
(
displayName
);
}
}
catch
(
error
)
{
console
.
info
(
`${testNum} createAsset failed; error: ${error}`
);
...
...
@@ -66,15 +97,15 @@ export default function createAssetTest () {
done
();
})
}
catch
(
error
)
{
console
.
info
(
`${testNum} failed; error: ${error}`
);
expect
(
false
)
.
assertTrue
();
done
();
console
.
info
(
`${testNum} failed; error: ${error}`
);
expect
(
false
)
.
assertTrue
();
done
();
}
}
async
function
createAssetAbnormalCallback1
(
done
,
testNum
,
displayName
)
{
try
{
helper
.
createAsset
(
displayName
,
(
err
,
createAsset
)
=>
{
helper
.
createAsset
(
displayName
,
(
err
,
createAsset
)
=>
{
if
(
err
!==
undefined
)
{
console
.
info
(
`${testNum} createAsset failed; err: ${err}`
);
expect
(
true
)
.
assertTrue
();
...
...
@@ -84,27 +115,32 @@ export default function createAssetTest () {
done
();
})
}
catch
(
error
)
{
console
.
info
(
`${testNum} failed; error: ${error}`
);
expect
(
true
)
.
assertTrue
();
done
();
console
.
info
(
`${testNum} failed; error: ${error}`
);
expect
(
true
)
.
assertTrue
();
done
();
}
}
async
function
createAssetAbnormalCallback2
(
done
,
testNum
,
displayName
,
createOption
)
{
try
{
helper
.
createAsset
(
displayName
,
createOption
,
(
err
,
createAsset
)
=>
{
if
(
err
!==
undefined
)
{
console
.
info
(
`${testNum} createAsset failed; err: ${err}`
);
expect
(
true
)
.
assertTrue
();
}
else
{
expect
(
false
)
.
assertTrue
();
helper
.
createAsset
(
displayName
,
createOption
,
(
err
,
createAsset
)
=>
{
try
{
if
(
err
!==
undefined
)
{
console
.
info
(
`${testNum} createAsset failed; err: ${err}`
);
expect
(
true
)
.
assertTrue
();
}
else
{
console
.
info
(
`${testNum} createAsset success`
);
expect
(
false
)
.
assertTrue
();
}
}
catch
(
error
)
{
console
.
info
(
`${testNum} error: ${error}`
);
}
done
();
})
}
catch
(
error
)
{
console
.
info
(
`${testNum} failed; error: ${error}`
);
expect
(
true
)
.
assertTrue
();
done
();
console
.
info
(
`${testNum} failed; error: ${error}`
);
expect
(
true
)
.
assertTrue
();
done
();
}
}
...
...
@@ -115,9 +151,9 @@ export default function createAssetTest () {
expect
(
createAsset
.
displayName
)
.
assertEqual
(
displayName
);
done
();
}
catch
(
error
)
{
console
.
info
(
`${testNum} failed; error: ${error}`
);
expect
(
false
)
.
assertTrue
();
done
();
console
.
info
(
`${testNum} failed; error: ${error}`
);
expect
(
false
)
.
assertTrue
();
done
();
}
}
...
...
@@ -128,33 +164,53 @@ export default function createAssetTest () {
expect
(
createAsset
.
displayName
)
.
assertEqual
(
displayName
);
done
();
}
catch
(
error
)
{
console
.
info
(
`${testNum} failed; error: ${error}`
);
expect
(
false
)
.
assertTrue
();
done
();
console
.
info
(
`${testNum} failed; error: ${error}`
);
expect
(
false
)
.
assertTrue
();
done
();
}
}
async
function
createAssetPromise3
(
done
,
testNum
,
displayName
,
createOption
,
fetchOps
)
{
try
{
let
createAsset
:
photoAccessHelper
.
PhotoAsset
;
createAsset
=
await
helper
.
createAsset
(
displayName
,
createOption
);
expect
(
createAsset
.
displayName
)
.
assertEqual
(
displayName
);
let
fd
=
await
createAsset
.
open
(
"rw"
);
await
createAsset
.
close
(
fd
);
expect
(
createAsset
.
displayName
)
.
assertEqual
(
displayName
);
let
asset
:
photoAccessHelper
.
PhotoAsset
;
asset
=
await
getFileAsset
(
testNum
,
fetchOps
);
console
.
info
(
`${testNum} createAsset displayName: ${asset.displayName}`
);
expect
(
asset
.
displayName
)
.
assertEqual
(
displayName
);
done
();
}
catch
(
error
)
{
console
.
info
(
`${testNum} failed; error: ${error}`
);
expect
(
false
)
.
assertTrue
();
done
();
}
}
async
function
createAssetAbnormalPromise1
(
done
,
testNum
,
displayName
)
{
try
{
await
helper
.
createAsset
(
displayName
);
expect
(
false
)
.
assertTrue
();
expect
(
false
)
.
assertTrue
();
done
()
}
catch
(
error
)
{
console
.
info
(
`${testNum} failed; error: ${error}`
);
expect
(
true
)
.
assertTrue
();
done
();
console
.
info
(
`${testNum} failed; error: ${error}`
);
expect
(
true
)
.
assertTrue
();
done
();
}
}
async
function
createAssetAbnormalPromise2
(
done
,
testNum
,
displayName
,
createOption
)
{
try
{
await
helper
.
createAsset
(
displayName
,
createOption
);
expect
(
false
)
.
assertTrue
();
expect
(
false
)
.
assertTrue
();
done
()
}
catch
(
error
)
{
console
.
info
(
`${testNum} failed; error: ${error}`
);
expect
(
true
)
.
assertTrue
();
done
();
console
.
info
(
`${testNum} failed; error: ${error}`
);
expect
(
true
)
.
assertTrue
();
done
();
}
}
...
...
@@ -163,15 +219,15 @@ export default function createAssetTest () {
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_0000
* @tc.name : createAsset_callback_000
* @tc.desc : createAsset
* @tc.desc : createAsset
by displayname
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'createAsset_callback_000'
,
0
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_000'
;
const
testNum
=
'createAsset_callback_000'
;
const
displayName
=
testNum
+
'.jpg'
;
await
createAssetCallback1
(
done
,
testNum
,
displayName
);
await
createAssetCallback1
(
done
,
testNum
,
displayName
);
});
/**
...
...
@@ -183,12 +239,12 @@ export default function createAssetTest () {
* @tc.level : Level 2
*/
it
(
'createAsset_callback_001'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_001'
;
const
testNum
=
'createAsset_callback_001'
;
const
displayName
=
testNum
+
'.jpg'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
DEFAULT
,
};
await
createAssetCallback2
(
done
,
testNum
,
displayName
,
createOption
);
await
createAssetCallback2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
...
...
@@ -200,126 +256,240 @@ export default function createAssetTest () {
* @tc.level : Level 2
*/
it
(
'createAsset_callback_002'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_002'
;
const
testNum
=
'createAsset_callback_002'
;
const
displayName
=
testNum
+
'.jpg'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
SCREENSHOT
,
};
await
createAssetCallback2
(
done
,
testNum
,
displayName
,
createOption
);
await
createAssetCallback2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_0400
* @tc.name : createAsset_callback_004
* @tc.desc : createAsset
abnormal param
* @tc.desc : createAsset
displayname is undefined and no createoption
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_callback_004'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_004'
;
await
createAssetAbnormalCallback1
(
done
,
testNum
,
undefined
);
const
testNum
=
'createAsset_callback_004'
;
await
createAssetAbnormalCallback1
(
done
,
testNum
,
undefined
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_0500
* @tc.name : createAsset_callback_005
* @tc.desc : createAsset
abnormal param
* @tc.desc : createAsset
displayname is not has extension and no createoption
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_callback_005'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_005'
;
const
testNum
=
'createAsset_callback_005'
;
const
displayName
=
testNum
;
await
createAssetAbnormalCallback1
(
done
,
testNum
,
displayName
);
await
createAssetAbnormalCallback1
(
done
,
testNum
,
displayName
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_0600
* @tc.name : createAsset_callback_006
* @tc.desc : createAsset
abnormal param
* @tc.desc : createAsset
with too long displayname
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_callback_006'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_006'
;
const
testNum
=
'createAsset_callback_006'
;
let
value
=
''
;
for
(
let
i
=
0
;
i
<
253
;
i
++
)
{
value
+=
'a'
;
}
const
displayName
=
value
+
'.jpg'
;
await
createAssetAbnormalCallback1
(
done
,
testNum
,
displayName
);
await
createAssetAbnormalCallback1
(
done
,
testNum
,
displayName
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_0700
* @tc.name : createAsset_callback_007
* @tc.desc : createAsset
abnormal param
* @tc.desc : createAsset
with undefined displayname
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_callback_007'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_007'
;
const
testNum
=
'createAsset_callback_007'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
DEFAULT
,
};
await
createAssetAbnormalCallback2
(
done
,
testNum
,
undefined
,
createOption
);
await
createAssetAbnormalCallback2
(
done
,
testNum
,
undefined
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_0800
* @tc.name : createAsset_callback_008
* @tc.desc : createAsset
abnormal param
* @tc.desc : createAsset
displayname is not has extension and subtype is DEFAULT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_callback_008'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_008'
;
const
testNum
=
'createAsset_callback_008'
;
const
displayName
=
testNum
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
DEFAULT
,
};
await
createAssetAbnormalCallback2
(
done
,
testNum
,
displayName
,
createOption
);
await
createAssetAbnormalCallback2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_0900
* @tc.name : createAsset_callback_009
* @tc.desc : createAsset
abnormal param
* @tc.desc : createAsset
with too long displayname and subtype is DEFAULT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_callback_009'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_009'
;
const
testNum
=
'createAsset_callback_009'
;
let
value
=
''
;
for
(
let
i
=
0
;
i
<
253
;
i
++
)
{
value
+=
'a'
;
}
const
displayName
=
value
+
'.jpg'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
DEFAULT
,
};
await
createAssetAbnormalCallback2
(
done
,
testNum
,
displayName
,
createOption
);
await
createAssetAbnormalCallback2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_01000
* @tc.name : createAsset_callback_0010
* @tc.desc : createAsset with normal cameraShotKey.length is greater than or equal to 30 and subtype is DEFAULT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_callback_0010'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_0010'
;
const
displayName
=
testNum
+
'.jpg'
;
const
cameraShotKey
=
'createAsset_callback_0010aaaaa'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
CAMERA_SHOT_KEY
,
cameraShotKey
);
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
DEFAULT
,
cameraShotKey
:
cameraShotKey
,
};
await
createAssetCallback3
(
done
,
testNum
,
displayName
,
createOption
,
fetchOps
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_01100
* @tc.name : createAsset_callback_0011
* @tc.desc : createAsset with cameraShotKey.length is greater than or equal to 30 and has no subtype
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_callback_0011'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_0011'
;
const
displayName
=
testNum
+
'.jpg'
;
const
cameraShotKey
=
'createAsset_callback_0011aaaaa'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
CAMERA_SHOT_KEY
,
cameraShotKey
);
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
cameraShotKey
:
cameraShotKey
,
};
await
createAssetCallback3
(
done
,
testNum
,
displayName
,
createOption
,
fetchOps
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_01200
* @tc.name : createAsset_callback_0012
* @tc.desc : createAsset with normal cameraShotKey.length is greater than or equal to 30 and subtype is SCREENSHOT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_callback_0012'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_0012'
;
const
displayName
=
testNum
+
'.jpg'
;
const
cameraShotKey
=
'createAsset_callback_0012aaaaa'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
SCREENSHOT
,
cameraShotKey
:
cameraShotKey
,
};
await
createAssetAbnormalCallback2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_01300
* @tc.name : createAsset_callback_0013
* @tc.desc : createAsset with abnormal cameraShotKey.length is less than 30 and has no subtype
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_callback_0013'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_0013'
;
const
displayName
=
testNum
+
'.jpg'
;
const
cameraShotKey
=
'createAsset_callback_0013a'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
cameraShotKey
:
cameraShotKey
,
};
await
createAssetAbnormalCallback2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_01400
* @tc.name : createAsset_callback_0014
* @tc.desc : createAsset with abnormal cameraShotKey.length is less than 30 and subtype is DEFAULT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_callback_0014'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_0014'
;
const
displayName
=
testNum
+
'.jpg'
;
const
cameraShotKey
=
'createAsset_callback_0014a'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
DEFAULT
,
cameraShotKey
:
cameraShotKey
,
};
await
createAssetAbnormalCallback2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_01500
* @tc.name : createAsset_callback_0015
* @tc.desc : createAsset with abnormal cameraShotKey.length is less than 30 and subtype is SCREENSHOT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_callback_0015'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_0015'
;
const
displayName
=
testNum
+
'.jpg'
;
const
cameraShotKey
=
'createAsset_callback_0015a'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
SCREENSHOT
,
cameraShotKey
:
cameraShotKey
,
};
await
createAssetAbnormalCallback2
(
done
,
testNum
,
displayName
,
createOption
);
});
//promise
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_0000
* @tc.name : createAsset_promise_000
* @tc.desc : createAsset
* @tc.desc : createAsset
by displayname
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'createAsset_promise_000'
,
0
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_000'
;
const
testNum
=
'createAsset_promise_000'
;
const
displayName
=
testNum
+
'.jpg'
;
await
createAssetPromise1
(
done
,
testNum
,
displayName
);
await
createAssetPromise1
(
done
,
testNum
,
displayName
);
});
/**
...
...
@@ -331,128 +501,242 @@ export default function createAssetTest () {
* @tc.level : Level 2
*/
it
(
'createAsset_promise_001'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_001'
;
const
testNum
=
'createAsset_promise_001'
;
const
displayName
=
testNum
+
'.jpg'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
DEFAULT
,
};
await
createAssetPromise2
(
done
,
testNum
,
displayName
,
createOption
);
await
createAssetPromise2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_0200
* @tc.name : createAsset_promise_002
* @tc.desc : createAsset with createOption(PhotoSubtype.SCREENSHOT)
* @tc.desc : createAsset
by displayname
with createOption(PhotoSubtype.SCREENSHOT)
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_002'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_002'
;
const
testNum
=
'createAsset_promise_002'
;
const
displayName
=
testNum
+
'.jpg'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
SCREENSHOT
,
};
await
createAssetPromise2
(
done
,
testNum
,
displayName
,
createOption
);
await
createAssetPromise2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_0400
* @tc.name : createAsset_promise_004
* @tc.desc : createAsset
abnormal param
* @tc.desc : createAsset
displayname has no extension
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_004'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_004'
;
await
createAssetAbnormalPromise1
(
done
,
testNum
,
undefined
);
const
testNum
=
'createAsset_promise_004'
;
await
createAssetAbnormalPromise1
(
done
,
testNum
,
undefined
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_0500
* @tc.name : createAsset_promise_005
* @tc.desc : createAsset
abnormal param
* @tc.desc : createAsset
displayname has no extension
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_005'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_005'
;
const
testNum
=
'createAsset_promise_005'
;
const
displayName
=
testNum
;
await
createAssetAbnormalPromise1
(
done
,
testNum
,
displayName
);
await
createAssetAbnormalPromise1
(
done
,
testNum
,
displayName
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_0600
* @tc.name : createAsset_promise_006
* @tc.desc : createAsset
abnormal param
* @tc.desc : createAsset
displayname is too long
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_006'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_006'
;
const
testNum
=
'createAsset_promise_006'
;
let
value
=
''
;
for
(
let
i
=
0
;
i
<
253
;
i
++
)
{
value
+=
'a'
;
}
const
displayName
=
value
+
'.jpg'
;
await
createAssetAbnormalPromise1
(
done
,
testNum
,
displayName
);
await
createAssetAbnormalPromise1
(
done
,
testNum
,
displayName
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_0700
* @tc.name : createAsset_promise_007
* @tc.desc : createAsset
abnormal param
* @tc.desc : createAsset
with undefined displayname
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_007'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_007'
;
const
testNum
=
'createAsset_promise_007'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
DEFAULT
,
};
await
createAssetAbnormalPromise2
(
done
,
testNum
,
undefined
,
createOption
);
await
createAssetAbnormalPromise2
(
done
,
testNum
,
undefined
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_0800
* @tc.name : createAsset_promise_008
* @tc.desc : createAsset
abnormal param
* @tc.desc : createAsset
displayname has no extension
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_008'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_008'
;
const
testNum
=
'createAsset_promise_008'
;
const
displayName
=
testNum
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
DEFAULT
,
};
await
createAssetAbnormalPromise2
(
done
,
testNum
,
displayName
,
createOption
);
await
createAssetAbnormalPromise2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_0900
* @tc.name : createAsset_promise_009
* @tc.desc : createAsset
abnormal param
* @tc.desc : createAsset
displayname is too long with subtype is DEFAULT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_009'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_009'
;
const
testNum
=
'createAsset_promise_009'
;
let
value
=
''
;
for
(
let
i
=
0
;
i
<
253
;
i
++
)
{
value
+=
'a'
;
}
const
displayName
=
value
+
'.jpg'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
DEFAULT
,
};
await
createAssetAbnormalPromise2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_01000
* @tc.name : createAsset_promise_0010
* @tc.desc : createAsset with normal cameraShotKey.length is is greater than or equal to 30 and has no subtype
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_0010'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_0010'
;
const
displayName
=
testNum
+
'.jpg'
;
const
cameraShotKey
=
'createAsset_promise_0010aaaaaa'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
CAMERA_SHOT_KEY
,
cameraShotKey
);
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
cameraShotKey
:
cameraShotKey
,
};
await
createAssetPromise3
(
done
,
testNum
,
displayName
,
createOption
,
fetchOps
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_01100
* @tc.name : createAsset_promise_0011
* @tc.desc : createAsset with normal cameraShotKey.length is greater than or equal to 30 and subtype is DEFAULT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_0011'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_0011'
;
const
displayName
=
testNum
+
'.jpg'
;
const
cameraShotKey
=
'createAsset_promise_0011aaaaaa'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
CAMERA_SHOT_KEY
,
cameraShotKey
);
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
DEFAULT
,
cameraShotKey
:
cameraShotKey
,
};
await
createAssetPromise3
(
done
,
testNum
,
displayName
,
createOption
,
fetchOps
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_01200
* @tc.name : createAsset_promise_0012
* @tc.desc : createAsset with normal cameraShotKey.length is greater than or equal to 30 and subtype is SCREENSHOT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_0012'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_0012'
;
const
displayName
=
testNum
+
'.jpg'
;
const
cameraShotKey
=
'createAsset_promise_0012aaaaaa'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
SCREENSHOT
,
cameraShotKey
:
cameraShotKey
,
};
await
createAssetAbnormalPromise2
(
done
,
testNum
,
displayName
,
createOption
);
await
createAssetAbnormalPromise2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_01300
* @tc.name : createAsset_promise_0013
* @tc.desc : createAsset with cameraShotKey.length is less than 30 and subtype is SCREENSHOT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_0013'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_0013'
;
const
displayName
=
testNum
+
'.jpg'
;
const
cameraShotKey
=
'createAsset_promise_0013a'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
SCREENSHOT
,
cameraShotKey
:
cameraShotKey
,
};
await
createAssetAbnormalPromise2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_01400
* @tc.name : createAsset_promise_0014
* @tc.desc : createAsset with cameraShotKey.length is less than 30 and subtype is DEFAULT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_0014'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_0014'
;
const
displayName
=
testNum
+
'.jpg'
;
const
cameraShotKey
=
'createAsset_promise_0014a'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
DEFAULT
,
cameraShotKey
:
cameraShotKey
,
};
await
createAssetAbnormalPromise2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_01500
* @tc.name : createAsset_promise_0015
* @tc.desc : createAsset with cameraShotKey.length is less than 30 and has no subtype
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_0015'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_0015'
;
const
displayName
=
testNum
+
'.jpg'
;
const
cameraShotKey
=
'createAsset_promise_0015a'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
cameraShotKey
:
cameraShotKey
,
};
await
createAssetAbnormalPromise2
(
done
,
testNum
,
displayName
,
createOption
);
});
//video
...
...
@@ -460,7 +744,7 @@ export default function createAssetTest () {
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_1100
* @tc.name : createAsset_callback_011
* @tc.desc : createAsset
* @tc.desc : createAsset
by displayname
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
...
...
@@ -508,7 +792,7 @@ export default function createAssetTest () {
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_1500
* @tc.name : createAsset_callback_015
* @tc.desc : createAsset
abnormal param
* @tc.desc : createAsset
with displayname is too long
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
...
...
@@ -526,7 +810,7 @@ export default function createAssetTest () {
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_1600
* @tc.name : createAsset_callback_016
* @tc.desc : createAsset
abnormal param
* @tc.desc : createAsset
with displayname is too long and subtype is DEFAULT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
...
...
@@ -544,11 +828,125 @@ export default function createAssetTest () {
await
createAssetAbnormalCallback2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_1700
* @tc.name : createAsset_callback_017
* @tc.desc : createAsset with normal cameraShotKey.length is greater than or equal to 30 and subtype is DEFAULT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_callback_017'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_017'
;
const
displayName
=
testNum
+
'.mp4'
;
const
cameraShotKey
=
'createAsset_callback_0170aaaaa'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
CAMERA_SHOT_KEY
,
cameraShotKey
);
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
DEFAULT
,
cameraShotKey
:
cameraShotKey
,
};
await
createAssetCallback3
(
done
,
testNum
,
displayName
,
createOption
,
fetchOps
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_1800
* @tc.name : createAsset_callback_0180
* @tc.desc : createAsset with normal cameraShotKey.length is greater than or equal to 30 and has no subtype
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_callback_018'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_018'
;
const
displayName
=
testNum
+
'.mp4'
;
const
cameraShotKey
=
'createAsset_callback_0180aaaaa'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
CAMERA_SHOT_KEY
,
cameraShotKey
);
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
cameraShotKey
:
cameraShotKey
,
};
await
createAssetCallback3
(
done
,
testNum
,
displayName
,
createOption
,
fetchOps
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_1900
* @tc.name : createAsset_callback_019
* @tc.desc : createAsset with normal cameraShotKey.length is greater than or equal to 30 and subtype is SCREENSHOT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_callback_019'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_019'
;
const
displayName
=
testNum
+
'.mp4'
;
const
cameraShotKey
=
'createAsset_callback_0190aaaaa'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
SCREENSHOT
,
cameraShotKey
:
cameraShotKey
,
};
await
createAssetAbnormalCallback2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_2000
* @tc.name : createAsset_callback_020
* @tc.desc : createAsset with cameraShotKey.length is less than 30 and has no subtype
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_callback_020'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_020'
;
const
displayName
=
testNum
+
'.mp4'
;
const
cameraShotKey
=
'createAsset_callback_020a'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
cameraShotKey
:
cameraShotKey
,
};
await
createAssetAbnormalCallback2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_2100
* @tc.name : createAsset_callback_021
* @tc.desc : createAsset with cameraShotKey.length is less than 30 and subtype is DEFAULT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_callback_021'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_021'
;
const
displayName
=
testNum
+
'.mp4'
;
const
cameraShotKey
=
'createAsset_callback_021a'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
DEFAULT
,
cameraShotKey
:
cameraShotKey
,
};
await
createAssetAbnormalCallback2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_CALLBACK_CREATE_ASSET_2200
* @tc.name : createAsset_callback_022
* @tc.desc : createAsset with cameraShotKey.length is less than 30 and subtype is SCREENSHOT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_callback_022'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_callback_022'
;
const
displayName
=
testNum
+
'.mp4'
;
const
cameraShotKey
=
'createAsset_callback_022a'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
SCREENSHOT
,
cameraShotKey
:
cameraShotKey
,
};
await
createAssetAbnormalCallback2
(
done
,
testNum
,
displayName
,
createOption
);
});
//promise
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_1100
* @tc.name : createAsset_promise_011
* @tc.desc : createAsset
* @tc.desc : createAsset
by displayname
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
...
...
@@ -596,7 +994,7 @@ export default function createAssetTest () {
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_1500
* @tc.name : createAsset_promise_015
* @tc.desc : createAsset
abnormal param
* @tc.desc : createAsset
with displayname is too long
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
...
...
@@ -614,7 +1012,7 @@ export default function createAssetTest () {
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_1600
* @tc.name : createAsset_promise_016
* @tc.desc : createAsset
abnormal param
* @tc.desc : createAsset
displayname is too long with subtype is DEFAULT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
...
...
@@ -631,5 +1029,119 @@ export default function createAssetTest () {
};
await
createAssetAbnormalPromise2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_1700
* @tc.name : createAsset_promise_017
* @tc.desc : createAsset with normal cameraShotKey.length is greater than or equal to 30 and has no subtype
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_017'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_017'
;
const
displayName
=
testNum
+
'.mp4'
;
const
cameraShotKey
=
'createAsset_promise_0170aaaaaa'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
CAMERA_SHOT_KEY
,
cameraShotKey
);
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
cameraShotKey
:
cameraShotKey
,
};
await
createAssetPromise3
(
done
,
testNum
,
displayName
,
createOption
,
fetchOps
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_1800
* @tc.name : createAsset_promise_018
* @tc.desc : createAsset with normal cameraShotKey.length is greater than or equal to 30 and subtype is DEFAULT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_018'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_018'
;
const
displayName
=
testNum
+
'.mp4'
;
const
cameraShotKey
=
'createAsset_promise_0180aaaaaa'
;
const
fetchOps
=
photoFetchOption
(
testNum
,
photoKeys
.
CAMERA_SHOT_KEY
,
cameraShotKey
);
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
DEFAULT
,
cameraShotKey
:
cameraShotKey
,
};
await
createAssetPromise3
(
done
,
testNum
,
displayName
,
createOption
,
fetchOps
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_1900
* @tc.name : createAsset_promise_019
* @tc.desc : createAsset with normal cameraShotKey.length is greater than or equal to 30 and subtype is SCREENSHOT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_019'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_019'
;
const
displayName
=
testNum
+
'.mp4'
;
const
cameraShotKey
=
'createAsset_promise_0190aaaaa'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
SCREENSHOT
,
cameraShotKey
:
cameraShotKey
,
};
await
createAssetAbnormalPromise2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_2000
* @tc.name : createAsset_promise_020
* @tc.desc : createAsset with cameraShotKey.length is less than 30 and subtype is SCREENSHOT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_020'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_020'
;
const
displayName
=
testNum
+
'.mp4'
;
const
cameraShotKey
=
'createAsset_promise_0200a'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
SCREENSHOT
,
cameraShotKey
:
cameraShotKey
,
};
await
createAssetAbnormalPromise2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_2100
* @tc.name : createAsset_promise_021
* @tc.desc : createAsset with cameraShotKey.length is less than 30 and subtype is DEFAULT
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_021'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_021'
;
const
displayName
=
testNum
+
'.mp4'
;
const
cameraShotKey
=
'createAsset_promise_0210a'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
subtype
:
photoAccessHelper
.
PhotoSubtype
.
DEFAULT
,
cameraShotKey
:
cameraShotKey
,
};
await
createAssetAbnormalPromise2
(
done
,
testNum
,
displayName
,
createOption
);
});
/**
* @tc.number : SUB_PHOTOACCESS_HELPER_PROMISE_CREATE_ASSET_2200
* @tc.name : createAsset_promise_022
* @tc.desc : createAsset with cameraShotKey.length is less than 30 and no subtype
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it
(
'createAsset_promise_022'
,
2
,
async
function
(
done
)
{
const
testNum
=
'createAsset_promise_022'
;
const
displayName
=
testNum
+
'.mp4'
;
const
cameraShotKey
=
'createAsset_promise_0220a'
;
const
createOption
:
photoAccessHelper
.
PhotoCreateOptions
=
{
cameraShotKey
:
cameraShotKey
,
};
await
createAssetAbnormalPromise2
(
done
,
testNum
,
displayName
,
createOption
);
});
})
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录