Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
2f5117f5
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看板
提交
2f5117f5
编写于
8月 18, 2022
作者:
M
mali
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Modify case name 3
Signed-off-by:
N
mali
<
mali81@huawei.com
>
上级
e7ebde48
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
235 addition
and
0 deletion
+235
-0
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitPhotoAsync.test.ets
...main/ets/MainAbility/test/CameraJSUnitPhotoAsync.test.ets
+235
-0
未找到文件。
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraJSUnitPhotoAsync.test.ets
浏览文件 @
2f5117f5
...
...
@@ -686,6 +686,38 @@ export default function cameraJSUnitPhotoAsync(surfaceId: any) {
}
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_ADD_OUTPUT_PREVIEW_SUCCESS_0200
* @tc.name : Add output with camera0Input api
* @tc.desc : Add output with camera0Input api
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_MULTIMEDIA_CAMERA_ADD_OUTPUT_PREVIEW_SUCCESS_0200'
,
0
,
async
function
(
done
)
{
if
(
captureSession
==
null
||
captureSession
==
undefined
)
{
console
.
info
(
TAG
+
"Entering AddOutput_Preview captureSession == null || undefined"
);
}
else
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_ADD_OUTPUT_PREVIEW_SUCCESS_0200 to operate"
);
captureSession
.
addOutput
(
previewOutputAsync
,
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
console
.
info
(
TAG
+
"Entering AddOutput_Preview : Success"
);
if
(
data
!=
null
||
data
!=
undefined
)
{
console
.
info
(
TAG
+
"Entering AddOutput_Preview data is not null || undefined"
);
expect
(
true
)
.
assertTrue
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_ADD_OUTPUT_PREVIEW_SUCCESS_0200 PASSED"
);
}
}
else
{
expect
()
.
assertFail
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_ADD_OUTPUT_PREVIEW_SUCCESS_0200 FAILED : "
+
err
.
message
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_ADD_OUTPUT_PREVIEW_SUCCESS_0200 ends here"
);
}
await
sleep
(
1000
);
done
();
})
}
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_COMMIT_CONFIG_SUCCESS_0100
* @tc.name : commit config api
...
...
@@ -974,6 +1006,74 @@ export default function cameraJSUnitPhotoAsync(surfaceId: any) {
done
();
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_ADD_OUTPUT_PHOTO_SUCCESS_0200
* @tc.name : Add output with photo output api
* @tc.desc : Add output with photo output api
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_MULTIMEDIA_CAMERA_ADD_OUTPUT_PHOTO_SUCCESS_0200'
,
0
,
async
function
(
done
)
{
if
(
captureSession
==
null
||
captureSession
==
undefined
)
{
console
.
info
(
TAG
+
"Entering AddOutput_Photo captureSession == null || undefined"
);
}
else
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_ADD_OUTPUT_PHOTO_SUCCESS_0200 to operate"
);
captureSession
.
addOutput
(
photoOutputAsync
,
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
console
.
info
(
TAG
+
"Entering AddOutput_Photo success"
);
if
(
data
!=
null
||
data
!=
undefined
)
{
console
.
info
(
TAG
+
"Entering AddOutput_Photo data is not null || undefined"
);
expect
(
true
)
.
assertTrue
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_ADD_OUTPUT_PHOTO_SUCCESS_0200 PASSED"
);
}
}
else
{
expect
()
.
assertFail
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_ADD_OUTPUT_PHOTO_SUCCESS_0200 FAILED: "
+
err
.
message
);
}
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_ADD_OUTPUT_PHOTO_SUCCESS_0200 ends here"
);
await
sleep
(
1000
);
done
();
})
await
sleep
(
1000
);
done
();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_COMMIT_CONFIG_SUCCESS_0200
* @tc.name : commit config api
* @tc.desc : commit config api
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_MULTIMEDIA_CAMERA_COMMIT_CONFIG_SUCCESS_0200'
,
0
,
async
function
(
done
)
{
if
(
captureSession
==
null
||
captureSession
==
undefined
)
{
console
.
info
(
TAG
+
"Entering CommitConfig captureSession == null || undefined"
);
}
else
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_COMMIT_CONFIG_SUCCESS_0200 to operate"
);
captureSession
.
commitConfig
(
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
console
.
info
(
TAG
+
"Entering commitConfig success"
);
if
(
data
!=
null
||
data
!=
undefined
)
{
console
.
info
(
TAG
+
"Entering CommitConfig data is not null || undefined"
);
expect
(
true
)
.
assertTrue
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_COMMIT_CONFIG_SUCCESS_0200 PASSED"
);
}
}
else
{
expect
()
.
assertFail
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_COMMIT_CONFIG_SUCCESS_0200 FAILED : "
+
err
.
message
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_COMMIT_CONFIG_SUCCESS_0200 ends here"
);
}
await
sleep
(
1000
);
done
();
})
await
sleep
(
1000
);
done
();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_FOCUSSTATECHANGE_CALLBACK_ON_CAMERAINPUT_0100
* @tc.name : FocusStateChange callback api
...
...
@@ -2314,6 +2414,40 @@ export default function cameraJSUnitPhotoAsync(surfaceId: any) {
}
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_0200
* @tc.name : Photo output capture without photosettings api
* @tc.desc : Photo output capture without photosettings api
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_0200'
,
0
,
async
function
(
done
)
{
if
(
photoOutputAsync
==
null
||
photoOutputAsync
==
undefined
)
{
console
.
info
(
TAG
+
"Entering PhotoOutputCapture photoOutput == null || undefined"
);
}
else
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_0200 to operate"
);
photoOutputAsync
.
capture
(
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
console
.
info
(
TAG
+
"Entering photoOutput capture without photosettings success"
);
if
(
data
!=
null
||
data
!=
undefined
)
{
console
.
info
(
TAG
+
"Entering photoOutput capture without photosettings data is not null || undefined"
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_0200 PASSED"
);
expect
(
true
)
.
assertTrue
();
}
}
else
{
expect
()
.
assertFail
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_0200 FAILED : "
+
err
.
message
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_0200 ends here"
);
}
await
sleep
(
1000
);
done
();
})
await
sleep
(
1000
);
done
();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SET_FOCUS_POINT_0200
* @tc.name : set focus Point locked camera0 api
...
...
@@ -2605,6 +2739,40 @@ export default function cameraJSUnitPhotoAsync(surfaceId: any) {
done
();
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_0300
* @tc.name : Photo output capture without photosettings api
* @tc.desc : Photo output capture without photosettings api
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_0300'
,
0
,
async
function
(
done
)
{
if
(
photoOutputAsync
==
null
||
photoOutputAsync
==
undefined
)
{
console
.
info
(
TAG
+
"Entering PhotoOutputCapture photoOutput == null || undefined"
);
}
else
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_0300 to operate"
);
photoOutputAsync
.
capture
(
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
console
.
info
(
TAG
+
"Entering photoOutput capture without photosettings success"
);
if
(
data
!=
null
||
data
!=
undefined
)
{
console
.
info
(
TAG
+
"Entering photoOutput capture without photosettings data is not null || undefined"
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_0300 PASSED"
);
expect
(
true
)
.
assertTrue
();
}
}
else
{
expect
()
.
assertFail
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_0300 FAILED : "
+
err
.
message
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_0300 ends here"
);
}
await
sleep
(
1000
);
done
();
})
await
sleep
(
1000
);
done
();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_GET_EXPOSURE_MODE_LOCKED_0100
* @tc.name : get exposure mode locked camera0 api
...
...
@@ -2832,6 +3000,40 @@ export default function cameraJSUnitPhotoAsync(surfaceId: any) {
done
();
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_0400
* @tc.name : Photo output capture without photosettings api
* @tc.desc : Photo output capture without photosettings api
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_0400'
,
0
,
async
function
(
done
)
{
if
(
photoOutputAsync
==
null
||
photoOutputAsync
==
undefined
)
{
console
.
info
(
TAG
+
"Entering PhotoOutputCapture photoOutput == null || undefined"
);
}
else
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_0400 to operate"
);
photoOutputAsync
.
capture
(
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
console
.
info
(
TAG
+
"Entering photoOutput capture without photosettings success"
);
if
(
data
!=
null
||
data
!=
undefined
)
{
console
.
info
(
TAG
+
"Entering photoOutput capture without photosettings data is not null || undefined"
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_0400 PASSED"
);
expect
(
true
)
.
assertTrue
();
}
}
else
{
expect
()
.
assertFail
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_0400 FAILED : "
+
err
.
message
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_0400 ends here"
);
}
await
sleep
(
1000
);
done
();
})
await
sleep
(
1000
);
done
();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SET_EXPOSURE_BIAS_0200 mode auto
* @tc.name : set exposure bias camera0 api
...
...
@@ -2944,6 +3146,39 @@ export default function cameraJSUnitPhotoAsync(surfaceId: any) {
done
();
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_WITH_PHOTOSETTINGS1_0200
* @tc.name : Photo output capture with photosettings api
* @tc.desc : Photo output capture with photosettings api
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_WITH_PHOTOSETTINGS1_0200'
,
0
,
async
function
(
done
)
{
if
(
photoOutputAsync
==
null
||
photoOutputAsync
==
undefined
)
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_WITH_PHOTOSETTINGS1_0200 photoOutput == null || undefined"
);
}
else
{
console
.
info
(
TAG
+
"Entering PHOTOOUTPUT_CAPTURE_WITH_PHOTOSETTINGS to operate"
);
photoOutputAsync
.
capture
(
photosettings1
,
async
(
err
,
data
)
=>
{
if
(
!
err
)
{
console
.
info
(
TAG
+
"Entering photoOutput capture with photosettings1"
);
if
(
data
!=
null
||
data
!=
undefined
)
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_WITH_PHOTOSETTINGS1_0200 PASSED"
);
expect
(
true
)
.
assertTrue
();
}
}
else
{
expect
()
.
assertFail
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_WITH_PHOTOSETTINGS1_0200 FAILED : "
+
err
.
message
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_PHOTOOUTPUT_CAPTURE_WITH_PHOTOSETTINGS1_0200 ends here"
);
}
await
sleep
(
1000
);
done
();
})
await
sleep
(
1000
);
done
();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SET_EXPOSURE_BIAS_0300 mode auto
* @tc.name : set exposure bias camera0 api
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录