Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
d93b2d2e
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看板
未验证
提交
d93b2d2e
编写于
8月 21, 2023
作者:
O
openharmony_ci
提交者:
Gitee
8月 21, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9797 给documentPicker补充新的XTS测试用例
Merge pull request !9797 from yxn22/dev
上级
3b14b191
067150a3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
234 addition
and
113 deletion
+234
-113
storage/storagepickerjstest/entry/src/main/ets/test/documentPickerCallback.test.ets
...t/entry/src/main/ets/test/documentPickerCallback.test.ets
+181
-24
storage/storagepickerjstest/entry/src/main/ets/test/documentPickerPromise.test.ets
...st/entry/src/main/ets/test/documentPickerPromise.test.ets
+53
-89
未找到文件。
storage/storagepickerjstest/entry/src/main/ets/test/documentPickerCallback.test.ets
浏览文件 @
d93b2d2e
...
...
@@ -25,7 +25,7 @@ export default function documentPickerCallback(abilityContext) {
await
sleep
(
500
);
})
async
function
select
(
testNum
,
done
,
dirName
,
fileName
)
{
async
function
select
(
testNum
,
done
)
{
try
{
let
documentPicker
=
new
picker
.
DocumentViewPicker
();
documentPicker
.
select
((
err
,
result
)
=>
{
...
...
@@ -48,7 +48,7 @@ export default function documentPickerCallback(abilityContext) {
}
}
async
function
selectWithOption
(
testNum
,
done
,
option
,
dirName
,
fileName
)
{
async
function
selectWithOption
(
testNum
,
done
,
option
)
{
try
{
let
documentPicker
=
new
picker
.
DocumentViewPicker
();
documentPicker
.
select
(
option
,
(
err
,
result
)
=>
{
...
...
@@ -94,7 +94,7 @@ export default function documentPickerCallback(abilityContext) {
}
}
async
function
saveWithOption
(
testNum
,
done
,
option
,
dirName
)
{
async
function
saveWithOption
(
testNum
,
done
,
option
)
{
try
{
let
documentPicker
=
new
picker
.
DocumentViewPicker
();
documentPicker
.
save
(
option
,
(
err
,
result
)
=>
{
...
...
@@ -125,12 +125,10 @@ export default function documentPickerCallback(abilityContext) {
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_select_callback_000"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_select_callback_000"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_select_callback_000"
;
let
option
=
new
picker
.
DocumentSelectOptions
();
let
dirName
=
"Pictures"
;
let
fileName
=
"01.jpg"
;
await
selectWithOption
(
testNum
,
done
,
option
,
dirName
,
fileName
);
await
selectWithOption
(
testNum
,
done
,
option
);
});
/**
...
...
@@ -139,13 +137,101 @@ export default function documentPickerCallback(abilityContext) {
* @tc.desc : select without option
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level
3
* @tc.level : Level
1
*/
it
(
"documentpicker_select_callback_001"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_select_callback_001"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_select_callback_001"
;
let
dirName
=
"Pictures"
;
let
fileName
=
"01.jpg"
;
await
select
(
testNum
,
done
,
dirName
,
fileName
);
await
select
(
testNum
,
done
);
});
/**
* @tc.number : SUB_STORAGE_DOCUMENTPICKER_SELECT_CALLBACK_0200
* @tc.name : documentpicker_select_callback_002
* @tc.desc : select with option maxSelectNumber
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_select_callback_002"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_select_callback_002"
;
let
option
=
new
picker
.
DocumentSelectOptions
();
option
.
maxSelectNumber
=
3
;
await
selectWithOption
(
testNum
,
done
,
option
);
});
/**
* @tc.number : SUB_STORAGE_DOCUMENTPICKER_SELECT_CALLBACK_0300
* @tc.name : documentpicker_select_callback_003
* @tc.desc : select with option defaultFilePathUri
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_select_callback_003"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_select_callback_003"
;
let
option
=
new
picker
.
DocumentSelectOptions
();
option
.
defaultFilePathUri
=
"file://docs/storage/Users/currentUser/test/test1"
;
await
selectWithOption
(
testNum
,
done
,
option
);
});
/**
* @tc.number : SUB_STORAGE_DOCUMENTPICKER_SELECT_CALLBACK_0400
* @tc.name : documentpicker_select_callback_004
* @tc.desc : select with option image fileSuffixFilters
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_select_callback_004"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_select_callback_004"
;
let
option
=
new
picker
.
DocumentSelectOptions
();
option
.
fileSuffixFilters
=
[
'.png'
,
'.jpg'
];
await
selectWithOption
(
testNum
,
done
,
option
);
});
/**
* @tc.number : SUB_STORAGE_DOCUMENTPICKER_SELECT_CALLBACK_0500
* @tc.name : documentpicker_select_callback_005
* @tc.desc : select with option docs fileSuffixFilters
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_select_callback_005"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_select_callback_005"
;
let
option
=
new
picker
.
DocumentSelectOptions
();
option
.
fileSuffixFilters
=
[
'.pptx'
,
'.docx'
,
'.xlsx'
,
'.txt'
];
await
selectWithOption
(
testNum
,
done
,
option
);
});
/**
* @tc.number : SUB_STORAGE_DOCUMENTPICKER_SELECT_CALLBACK_0600
* @tc.name : documentpicker_select_callback_006
* @tc.desc : select with option video fileSuffixFilters
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_select_callback_006"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_select_callback_006"
;
let
option
=
new
picker
.
DocumentSelectOptions
();
option
.
fileSuffixFilters
=
[
'.mp4'
];
await
selectWithOption
(
testNum
,
done
,
option
);
});
/**
* @tc.number : SUB_STORAGE_DOCUMENTPICKER_SELECT_CALLBACK_0700
* @tc.name : documentpicker_select_callback_007
* @tc.desc : select with option audio fileSuffixFilters
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_select_callback_007"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_select_callback_007"
;
let
option
=
new
picker
.
DocumentSelectOptions
();
option
.
fileSuffixFilters
=
[
'.mp3'
];
await
selectWithOption
(
testNum
,
done
,
option
);
});
/**
...
...
@@ -160,8 +246,7 @@ export default function documentPickerCallback(abilityContext) {
let
testNum
=
"documentpicker_save_callback_000"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
newFileNames
=
[
"DocumentViewPicker01.jpg"
];
let
saveDir
=
"Pictures"
;
await
saveWithOption
(
testNum
,
done
,
option
,
saveDir
);
await
saveWithOption
(
testNum
,
done
,
option
);
});
/**
...
...
@@ -172,12 +257,11 @@ export default function documentPickerCallback(abilityContext) {
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_save_callback_001"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_save_callback_001"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_save_callback_001"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
newFileNames
=
[
"DocumentViewPicker01.dat"
];
let
saveDir
=
"Documents"
;
await
saveWithOption
(
testNum
,
done
,
option
,
saveDir
);
await
saveWithOption
(
testNum
,
done
,
option
);
});
/**
...
...
@@ -188,12 +272,11 @@ export default function documentPickerCallback(abilityContext) {
* @tc.type : Function
* @tc.level : Level 3
*/
it
(
"documentpicker_save_callback_002"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_save_callback_002"
,
3
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_save_callback_002"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
newFileNames
=
[
"DocumentViewPicker01.mp4"
];
let
saveDir
=
"Videos"
;
await
saveWithOption
(
testNum
,
done
,
option
,
saveDir
);
await
saveWithOption
(
testNum
,
done
,
option
);
});
/**
...
...
@@ -204,12 +287,11 @@ export default function documentPickerCallback(abilityContext) {
* @tc.type : Function
* @tc.level : Level 3
*/
it
(
"documentpicker_save_callback_003"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_save_callback_003"
,
3
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_save_callback_003"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
newFileNames
=
[
"DocumentViewPicker01.mp3"
];
let
saveDir
=
"Audios"
;
await
saveWithOption
(
testNum
,
done
,
option
,
saveDir
);
await
saveWithOption
(
testNum
,
done
,
option
);
});
/**
...
...
@@ -220,9 +302,84 @@ export default function documentPickerCallback(abilityContext) {
* @tc.type : Function
* @tc.level : Level 3
*/
it
(
"documentpicker_save_callback_004"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_save_callback_004"
,
3
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_save_callback_004"
;
await
saveWithoutSelect
(
testNum
,
done
);
});
/**
* @tc.number : SUB_STORAGE_DOCUMENTPICKER_SAVE_CALLBACK_0500
* @tc.name : documentpicker_save_callback_005
* @tc.desc : save png in Pictures
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_save_callback_005"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_save_callback_005"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
defaultFilePathUri
=
"file://docs/storage/Users/currentUser/test/test1/202308171505.png"
;
await
saveWithOption
(
testNum
,
done
,
option
);
});
/**
* @tc.number : SUB_STORAGE_DOCUMENTPICKER_SAVE_CALLBACK_0600
* @tc.name : documentpicker_save_callback_006
* @tc.desc : save suffix in Pictures
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_save_callback_006"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_save_callback_006"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
fileSuffixChoices
=
[
'.png'
,
'.jpg'
];
await
saveWithOption
(
testNum
,
done
,
option
);
});
/**
* @tc.number : SUB_STORAGE_DOCUMENTPICKER_SAVE_CALLBACK_0700
* @tc.name : documentpicker_save_callback_007
* @tc.desc : save suffix in Documents
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_save_callback_007"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_save_callback_007"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
fileSuffixChoices
=
[
'.pptx'
,
'.docx'
,
'.xlsx'
,
'.txt'
];
await
saveWithOption
(
testNum
,
done
,
option
);
});
/**
* @tc.number : SUB_STORAGE_DOCUMENTPICKER_SAVE_CALLBACK_0800
* @tc.name : documentpicker_save_callback_008
* @tc.desc : save mp4 in Videos
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_save_callback_008"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_save_callback_008"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
fileSuffixChoices
=
[
'.mp4'
];
await
saveWithOption
(
testNum
,
done
,
option
);
});
/**
* @tc.number : SUB_STORAGE_DOCUMENTPICKER_SAVE_CALLBACK_0900
* @tc.name : documentpicker_save_callback_009
* @tc.desc : save mp3 in Audios
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_save_callback_009"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_save_callback_009"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
fileSuffixChoices
=
[
'.mp3'
];
await
saveWithOption
(
testNum
,
done
,
option
);
});
});
}
storage/storagepickerjstest/entry/src/main/ets/test/documentPickerPromise.test.ets
浏览文件 @
d93b2d2e
...
...
@@ -25,7 +25,7 @@ export default function documentPickerPromise(abilityContext) {
await
sleep
(
500
);
})
async
function
select
(
testNum
,
done
,
dirName
,
fileName
)
{
async
function
select
(
testNum
,
done
)
{
try
{
let
documentPicker
=
new
picker
.
DocumentViewPicker
();
documentPicker
.
select
()
.
then
((
result
)
=>
{
...
...
@@ -47,7 +47,7 @@ export default function documentPickerPromise(abilityContext) {
}
}
async
function
selectWithOption
(
testNum
,
done
,
option
,
dirName
?
,
fileName
?
)
{
async
function
selectWithOption
(
testNum
,
done
,
option
)
{
try
{
let
documentPicker
=
new
picker
.
DocumentViewPicker
();
documentPicker
.
select
(
option
)
.
then
((
result
)
=>
{
...
...
@@ -91,7 +91,7 @@ export default function documentPickerPromise(abilityContext) {
}
}
async
function
saveWithOption
(
testNum
,
done
,
option
,
dirName
)
{
async
function
saveWithOption
(
testNum
,
done
,
option
)
{
try
{
let
documentPicker
=
new
picker
.
DocumentViewPicker
();
documentPicker
.
save
(
option
)
.
then
((
result
)
=>
{
...
...
@@ -121,12 +121,10 @@ export default function documentPickerPromise(abilityContext) {
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_select_promise_000"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_select_promise_000"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_select_promise_000"
;
let
option
=
new
picker
.
DocumentSelectOptions
();
let
dirName
=
"Pictures"
;
let
fileName
=
"01.jpg"
;
await
selectWithOption
(
testNum
,
done
,
option
,
dirName
,
fileName
);
await
selectWithOption
(
testNum
,
done
,
option
);
});
/**
...
...
@@ -135,125 +133,101 @@ export default function documentPickerPromise(abilityContext) {
* @tc.desc : select without option
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level
3
* @tc.level : Level
1
*/
it
(
"documentpicker_select_promise_001"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_select_promise_001"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_select_promise_001"
;
let
dirName
=
"Pictures"
;
let
fileName
=
"01.jpg"
;
await
select
(
testNum
,
done
,
dirName
,
fileName
);
await
select
(
testNum
,
done
);
});
/**
* @tc.number : SUB_STORAGE_DOCUMENTPICKER_SELECT_PROMISE_0200
* @tc.name : documentpicker_select_promise_002
* @tc.desc : select with option
* @tc.desc : select with option
maxSelectNumber
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_select_promise_002"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_select_promise_002"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_select_promise_002"
;
let
option
=
new
picker
.
DocumentSelectOptions
();
option
.
maxSelectNumber
=
3
;
let
dirName
=
"Pictures"
;
await
selectWithOption
(
testNum
,
done
,
option
,
dirName
);
await
selectWithOption
(
testNum
,
done
,
option
);
});
/**
* @tc.number : SUB_STORAGE_DOCUMENTPICKER_SELECT_PROMISE_0300
* @tc.name : documentpicker_select_promise_003
* @tc.desc : select with option
* @tc.desc : select with option
defaultFilePathUri
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_select_promise_003"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_select_promise_003"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_select_promise_003"
;
let
option
=
new
picker
.
DocumentSelectOptions
();
option
.
defaultFilePathUri
=
"file://media/file/8"
;
let
dirName
=
"Pictures"
;
await
selectWithOption
(
testNum
,
done
,
option
,
dirName
);
option
.
defaultFilePathUri
=
"file://docs/storage/Users/currentUser/test/test1"
;
await
selectWithOption
(
testNum
,
done
,
option
);
});
/**
* @tc.number : SUB_STORAGE_DOCUMENTPICKER_SELECT_PROMISE_0400
* @tc.name : documentpicker_select_promise_004
* @tc.desc : select with option
* @tc.desc : select with option
image fileSuffixFilters
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_select_promise_004"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_select_promise_004"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_select_promise_004"
;
let
option
=
new
picker
.
DocumentSelectOptions
();
option
.
defaultFilePathUri
=
"file://docs/storage/Users/currentUser/test/test1"
;
let
dirName
=
"Pictures"
;
await
selectWithOption
(
testNum
,
done
,
option
,
dirName
);
});
/**
* @tc.number : SUB_STORAGE_DOCUMENTPICKER_SELECT_PROMISE_0500
* @tc.name : documentpicker_select_promise_005
* @tc.desc : select with option
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_select_promise_005"
,
0
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_select_promise_005"
;
let
option
=
new
picker
.
DocumentSelectOptions
();
option
.
fileSuffixFilters
=
[
'.png'
,
'.jpg'
];
let
dirName
=
"Pictures"
;
await
selectWithOption
(
testNum
,
done
,
option
,
dirName
);
await
selectWithOption
(
testNum
,
done
,
option
);
});
/**
* @tc.number : SUB_STORAGE_DOCUMENTPICKER_SELECT_PROMISE_0500
* @tc.name : documentpicker_select_promise_005
* @tc.desc : select with option
* @tc.desc : select with option
docs fileSuffixFilters
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_select_promise_005"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_select_promise_005"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_select_promise_005"
;
let
option
=
new
picker
.
DocumentSelectOptions
();
option
.
fileSuffixFilters
=
[
'.pptx'
,
'.docx'
,
'.xlsx'
,
'.txt'
];
let
dirName
=
"Documents"
;
await
selectWithOption
(
testNum
,
done
,
option
,
dirName
);
await
selectWithOption
(
testNum
,
done
,
option
);
});
/**
* @tc.number : SUB_STORAGE_DOCUMENTPICKER_SELECT_PROMISE_0600
* @tc.name : documentpicker_select_promise_006
* @tc.desc : select with option
* @tc.desc : select with option
video fileSuffixFilters
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_select_promise_006"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_select_promise_006"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_select_promise_006"
;
let
option
=
new
picker
.
DocumentSelectOptions
();
option
.
fileSuffixFilters
=
[
'.mp4'
];
let
dirName
=
"Videos"
;
await
selectWithOption
(
testNum
,
done
,
option
,
dirName
);
await
selectWithOption
(
testNum
,
done
,
option
);
});
/**
* @tc.number : SUB_STORAGE_DOCUMENTPICKER_SELECT_PROMISE_0700
* @tc.name : documentpicker_select_promise_007
* @tc.desc : select with option
* @tc.desc : select with option
audio fileSuffixFilters
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_select_promise_007"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_select_promise_007"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_select_promise_007"
;
let
option
=
new
picker
.
DocumentSelectOptions
();
option
.
fileSuffixFilters
=
[
'.mp3'
];
let
dirName
=
"Audios"
;
await
selectWithOption
(
testNum
,
done
,
option
,
dirName
);
await
selectWithOption
(
testNum
,
done
,
option
);
});
/**
...
...
@@ -268,8 +242,7 @@ export default function documentPickerPromise(abilityContext) {
let
testNum
=
"documentpicker_save_promise_000"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
newFileNames
=
[
"DocumentViewPicker01.jpg"
];
let
saveDir
=
"Pictures"
;
await
saveWithOption
(
testNum
,
done
,
option
,
saveDir
);
await
saveWithOption
(
testNum
,
done
,
option
);
});
/**
...
...
@@ -280,12 +253,11 @@ export default function documentPickerPromise(abilityContext) {
* @tc.type : Function
* @tc.level : Level 1
*/
it
(
"documentpicker_save_promise_001"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_save_promise_001"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_save_promise_001"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
newFileNames
=
[
"DocumentViewPicker01.dat"
];
let
saveDir
=
"Documents"
;
await
saveWithOption
(
testNum
,
done
,
option
,
saveDir
);
await
saveWithOption
(
testNum
,
done
,
option
);
});
/**
...
...
@@ -296,12 +268,11 @@ export default function documentPickerPromise(abilityContext) {
* @tc.type : Function
* @tc.level : Level 3
*/
it
(
"documentpicker_save_promise_002"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_save_promise_002"
,
3
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_save_promise_002"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
newFileNames
=
[
"DocumentViewPicker01.mp4"
];
let
saveDir
=
"Videos"
;
await
saveWithOption
(
testNum
,
done
,
option
,
saveDir
);
await
saveWithOption
(
testNum
,
done
,
option
);
});
/**
...
...
@@ -312,12 +283,11 @@ export default function documentPickerPromise(abilityContext) {
* @tc.type : Function
* @tc.level : Level 3
*/
it
(
"documentpicker_save_promise_003"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_save_promise_003"
,
3
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_save_promise_003"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
newFileNames
=
[
"DocumentViewPicker01.mp3"
];
let
saveDir
=
"Audios"
;
await
saveWithOption
(
testNum
,
done
,
option
,
saveDir
);
await
saveWithOption
(
testNum
,
done
,
option
);
});
/**
...
...
@@ -326,14 +296,13 @@ export default function documentPickerPromise(abilityContext) {
* @tc.desc : save uri in Pictures
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level
3
* @tc.level : Level
1
*/
it
(
"documentpicker_save_promise_004"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_save_promise_004"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_save_promise_004"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
defaultFilePathUri
=
"file://media/file/8"
;
let
saveDir
=
"Pictures"
;
await
saveWithOption
(
testNum
,
done
,
option
,
saveDir
);
option
.
defaultFilePathUri
=
"file://docs/storage/Users/currentUser/test"
;
await
saveWithOption
(
testNum
,
done
,
option
);
});
/**
...
...
@@ -342,14 +311,13 @@ export default function documentPickerPromise(abilityContext) {
* @tc.desc : save png in Pictures
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level
3
* @tc.level : Level
1
*/
it
(
"documentpicker_save_promise_005"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_save_promise_005"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_save_promise_005"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
defaultFilePathUri
=
"file://docs/storage/Users/currentUser/test/test1/202308171505.png"
;
let
saveDir
=
"Pictures"
;
await
saveWithOption
(
testNum
,
done
,
option
,
saveDir
);
await
saveWithOption
(
testNum
,
done
,
option
);
});
/**
...
...
@@ -358,14 +326,13 @@ export default function documentPickerPromise(abilityContext) {
* @tc.desc : save suffix in Pictures
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level
3
* @tc.level : Level
1
*/
it
(
"documentpicker_save_promise_006"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_save_promise_006"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_save_promise_006"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
fileSuffixChoices
=
[
'.png'
,
'.jpg'
];
let
saveDir
=
"Pictures"
;
await
saveWithOption
(
testNum
,
done
,
option
,
saveDir
);
await
saveWithOption
(
testNum
,
done
,
option
);
});
/**
...
...
@@ -374,14 +341,13 @@ export default function documentPickerPromise(abilityContext) {
* @tc.desc : save suffix in Documents
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level
3
* @tc.level : Level
1
*/
it
(
"documentpicker_save_promise_007"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_save_promise_007"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_save_promise_007"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
fileSuffixChoices
=
[
'.pptx'
,
'.docx'
,
'.xlsx'
,
'.txt'
];
let
saveDir
=
"Documents"
;
await
saveWithOption
(
testNum
,
done
,
option
,
saveDir
);
await
saveWithOption
(
testNum
,
done
,
option
);
});
/**
...
...
@@ -390,14 +356,13 @@ export default function documentPickerPromise(abilityContext) {
* @tc.desc : save mp4 in Videos
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level
3
* @tc.level : Level
1
*/
it
(
"documentpicker_save_promise_008"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_save_promise_008"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_save_promise_008"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
fileSuffixChoices
=
[
'.mp4'
];
let
saveDir
=
"Videos"
;
await
saveWithOption
(
testNum
,
done
,
option
,
saveDir
);
await
saveWithOption
(
testNum
,
done
,
option
);
});
/**
...
...
@@ -406,14 +371,13 @@ export default function documentPickerPromise(abilityContext) {
* @tc.desc : save mp3 in Audios
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level
3
* @tc.level : Level
1
*/
it
(
"documentpicker_save_promise_009"
,
0
,
async
function
(
done
)
{
it
(
"documentpicker_save_promise_009"
,
1
,
async
function
(
done
)
{
let
testNum
=
"documentpicker_save_promise_009"
;
let
option
=
new
picker
.
DocumentSaveOptions
();
option
.
fileSuffixChoices
=
[
'.mp3'
];
let
saveDir
=
"Audios"
;
await
saveWithOption
(
testNum
,
done
,
option
,
saveDir
);
await
saveWithOption
(
testNum
,
done
,
option
);
});
});
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录