Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
b963a58e
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看板
未验证
提交
b963a58e
编写于
8月 07, 2023
作者:
O
openharmony_ci
提交者:
Gitee
8月 07, 2023
浏览文件
操作
浏览文件
下载
差异文件
!9674 修改部分error code导致的xts用例fail问题
Merge pull request !9674 from zvanxu/master
上级
501222b9
08009150
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
22 addition
and
64 deletion
+22
-64
multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/GetSystemVolumeInDb.test.ets
...gerEnhance/src/main/ets/test/GetSystemVolumeInDb.test.ets
+7
-7
multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/IsVolumeUnadjustable.test.ets
...erEnhance/src/main/ets/test/IsVolumeUnadjustable.test.ets
+15
-57
未找到文件。
multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/GetSystemVolumeInDb.test.ets
浏览文件 @
b963a58e
...
...
@@ -189,7 +189,7 @@ export default function audioManagerTest() {
console
.
info
(
`${index} getSystemVolumeInDb :SUCCESS ${data}`
);
})
.
catch
((
error
)
=>
{
if
(
index
==
'DEFAULT'
||
index
==
'MAX'
||
index
==
'INVALID'
||
index
==
'NONE'
)
{
if
(
index
==
'DEFAULT'
||
index
==
'MAX'
||
index
==
'INVALID'
||
index
==
'NONE'
||
index
==
'WAKEUP'
)
{
console
.
log
(
`${index} getSystemVolumeInDb :${error.code} ${error.message}`
);
}
else
{
console
.
log
(
`${TagFrmwk}:${index} getSystemVolumeInDb : error ${error.message} ${error.code}`
);
...
...
@@ -223,7 +223,7 @@ export default function audioManagerTest() {
})
.
catch
((
error
)
=>
{
if
(
error
)
{
console
.
log
(
`${TagFrmwk}:getSystemVolumeInDb error ${error.message} ${error.code}`
);
expect
(
Number
(
error
.
code
))
.
assertEqual
(
env
.
UNSUPORTED_OPTION_6800104
);
expect
(
Number
(
error
.
code
))
.
assertEqual
(
env
.
INVALID_INPUT_PARAMETER_6800101
);
done
();
}
else
{
expect
(
false
)
.
assertTrue
();
...
...
@@ -256,7 +256,7 @@ export default function audioManagerTest() {
.
catch
((
error
)
=>
{
if
(
error
)
{
console
.
log
(
`${TagFrmwk}: getSystemVolumeInDb : error ${error.message} ${error.code}`
);
expect
(
Number
(
error
.
code
))
.
assertEqual
(
env
.
UNSUPORTED_OPTION_6800104
);
expect
(
Number
(
error
.
code
))
.
assertEqual
(
env
.
INVALID_INPUT_PARAMETER_6800101
);
done
();
}
else
{
expect
(
false
)
.
assertTrue
();
...
...
@@ -315,12 +315,12 @@ export default function audioManagerTest() {
it
(
'SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_GETSYSTEMVOLUMEINDB_PROMISE_0800'
,
0
,
async
function
(
done
)
{
try
{
await
audioVolumeGroupManager
.
getSystemVolumeInDb
(
audio
.
AudioVolumeType
.
MEDIA
,
3
,
-
1
)
.
then
((
data
)
=>
{
console
.
info
(
`getSystemVolumeInDb :SUCCESS ${data}`
);
expect
(
data
)
.
assertEqual
(
env
.
DEAFULT_MEDIA_DB
);
console
.
info
(
`getSystemVolumeInDb :SUCCESS ${data}
, test fail!
`
);
expect
(
false
)
.
assertTrue
(
);
done
();
})
.
catch
((
error
)
=>
{
console
.
log
(
`
${TagFrmwk}:getSystemVolumeInDb : error ${error.message} ${error.code}
`
);
expect
(
false
)
.
assertTrue
(
);
console
.
log
(
`
getSystemVolumeInDb : error ${error.code}, check the error code
`
);
expect
(
Number
(
error
.
code
))
.
assertEqual
(
env
.
INVALID_INPUT_PARAMETER_6800101
);
done
();
});
}
catch
(
error
)
{
...
...
multimedia/audio/audio_js_standard/AudioManagerEnhance/src/main/ets/test/IsVolumeUnadjustable.test.ets
浏览文件 @
b963a58e
...
...
@@ -85,14 +85,9 @@ export default function audioManagerTest() {
it
(
'SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_ISVOLUMEUNADJUSTABLE_0100'
,
0
,
async
function
(
done
)
{
try
{
let
bol
=
await
audioVolumeGroupManager
.
isVolumeUnadjustable
();
if
(
bol
==
false
||
bol
==
true
)
{
console
.
info
(
`isVolumeUnadjustable SUCCESS, is ${bol}`
);
expect
(
true
)
.
assertTrue
();
done
();
}
else
{
expect
(
false
)
.
assertTrue
();
done
();
}
console
.
info
(
`isVolumeUnadjustable SUCCESS, is ${bol}`
);
expect
(
bol
)
.
assertEqual
(
false
);
done
();
}
catch
(
error
)
{
console
.
log
(
`isVolumeUnadjustable error: ${error.code}, message ${error.message}`
);
expect
(
false
)
.
assertTrue
();
...
...
@@ -111,31 +106,12 @@ export default function audioManagerTest() {
it
(
'SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_ISVOLUMEUNADJUSTABLE_0200'
,
0
,
async
function
(
done
)
{
try
{
let
bol
=
await
audioVolumeGroupManager
.
isVolumeUnadjustable
();
if
(
bol
==
false
)
{
let
vol
=
await
audioVolumeGroupManager
.
getVolume
(
audio
.
AudioVolumeType
.
MEDIA
);
await
audioVolumeGroupManager
.
setVolume
(
audio
.
AudioVolumeType
.
MEDIA
,
vol
+
1
);
let
vol1
=
await
audioVolumeGroupManager
.
getVolume
(
audio
.
AudioVolumeType
.
MEDIA
);
expect
(
bol
)
.
assertEqual
(
false
);
expect
(
vol1
)
.
assertEqual
(
vol
+
1
);
done
();
}
else
{
let
vol2
=
await
audioVolumeGroupManager
.
getVolume
(
audio
.
AudioVolumeType
.
MEDIA
);
await
audioVolumeGroupManager
.
setVolume
(
audio
.
AudioVolumeType
.
MEDIA
,
vol2
+
1
)
.
then
(()
=>
{
console
.
info
(
`setVolume SUCCESS !, testcase fail !`
);
})
.
catch
((
error
)
=>
{
if
(
error
.
code
==
6800301
)
{
console
.
log
(
`${TagFrmwk}: setVolume error:${error.code}, system volume cannot be changed !`
);
let
vol3
=
audioVolumeGroupManager
.
getVolume
(
audio
.
AudioVolumeType
.
MEDIA
);
expect
(
bol
)
.
assertEqual
(
true
);
expect
(
vol3
)
.
assertEqual
(
vol2
);
done
();
}
else
{
console
.
log
(
`${TagFrmwk}: setVolume error, unkown error: ${error.message} ${error.code}`
);
expect
(
false
)
.
assertTrue
();
done
();
}
});
}
let
vol
=
await
audioVolumeGroupManager
.
getVolume
(
audio
.
AudioVolumeType
.
MEDIA
);
await
audioVolumeGroupManager
.
setVolume
(
audio
.
AudioVolumeType
.
MEDIA
,
vol
+
1
);
let
vol1
=
await
audioVolumeGroupManager
.
getVolume
(
audio
.
AudioVolumeType
.
MEDIA
);
expect
(
bol
)
.
assertEqual
(
false
);
expect
(
vol1
)
.
assertEqual
(
vol
+
1
);
done
();
}
catch
(
error
)
{
console
.
log
(
`isVolumeUnadjustable error ${error.message} ${error.code}, testcase FAIL !`
);
expect
(
false
)
.
assertTrue
();
...
...
@@ -154,30 +130,12 @@ export default function audioManagerTest() {
it
(
'SUB_MULTIMEDIA_AUDIO_VOLUME_GROUP_MANAGER_ISVOLUMEUNADJUSTABLE_0300'
,
0
,
async
function
(
done
)
{
try
{
let
bol
=
await
audioVolumeGroupManager
.
isVolumeUnadjustable
();
if
(
bol
==
false
)
{
let
Vol
=
await
audioVolumeGroupManager
.
getVolume
(
audio
.
AudioVolumeType
.
MEDIA
);
await
audioVolumeGroupManager
.
setVolume
(
audio
.
AudioVolumeType
.
MEDIA
,
Vol
-
1
);
let
Vol1
=
await
audioVolumeGroupManager
.
getVolume
(
audio
.
AudioVolumeType
.
MEDIA
);
expect
(
bol
)
.
assertEqual
(
false
);
expect
(
Vol1
)
.
assertEqual
(
Vol
-
1
);
done
();
}
else
{
let
Vol2
=
await
audioVolumeGroupManager
.
getVolume
(
audio
.
AudioVolumeType
.
MEDIA
);
await
audioVolumeGroupManager
.
setVolume
(
audio
.
AudioVolumeType
.
MEDIA
,
Vol2
-
1
)
.
then
(()
=>
{
})
.
catch
((
error
)
=>
{
if
(
error
.
code
==
6800301
)
{
console
.
log
(
`${TagFrmwk} setVolume error: ${error.code}, system volume cannot be changed!`
);
let
Vol3
=
audioVolumeGroupManager
.
getVolume
(
audio
.
AudioVolumeType
.
MEDIA
);
expect
(
bol
)
.
assertEqual
(
true
);
expect
(
Vol3
)
.
assertEqual
(
Vol2
);
done
();
}
else
{
console
.
log
(
`${TagFrmwk}: setVolume : error ${error.code}, unknown error! `
);
expect
(
false
)
.
assertTrue
();
done
();
}
});
}
let
Vol
=
await
audioVolumeGroupManager
.
getVolume
(
audio
.
AudioVolumeType
.
MEDIA
);
await
audioVolumeGroupManager
.
setVolume
(
audio
.
AudioVolumeType
.
MEDIA
,
Vol
-
1
);
let
Vol1
=
await
audioVolumeGroupManager
.
getVolume
(
audio
.
AudioVolumeType
.
MEDIA
);
expect
(
bol
)
.
assertEqual
(
false
);
expect
(
Vol1
)
.
assertEqual
(
Vol
-
1
);
done
();
}
catch
(
error
)
{
console
.
log
(
`isVolumeUnadjustable unknown error: error ${error.message} ${error.code}`
);
expect
(
false
)
.
assertTrue
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录