Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
971cb18e
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看板
未验证
提交
971cb18e
编写于
3月 12, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 12, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2276 删除多余注释和添加abilityType属性的测试用例代码
Merge pull request !2276 from yichengzhao/master
上级
0821cd33
e5ff2937
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
402 addition
and
54 deletion
+402
-54
barrierfree/accessibleabilitylist/entry/src/main/js/test/AccessibleAbilityList.test.js
...list/entry/src/main/js/test/AccessibleAbilityList.test.js
+402
-52
barrierfree/accessiblecaptionconfiguration/entry/src/main/js/test/AccessibleCaptionConfiguration.test.js
...y/src/main/js/test/AccessibleCaptionConfiguration.test.js
+0
-2
未找到文件。
barrierfree/accessibleabilitylist/entry/src/main/js/test/AccessibleAbilityList.test.js
浏览文件 @
971cb18e
...
...
@@ -35,13 +35,13 @@ describe('AccessibleAbilityList', function () {
})
/******************************************************************************** */
/* Cases AbilityList_0210-0
30
0 are for accessibility.getAbilityLists() API test */
/* Cases AbilityList_0210-0
46
0 are for accessibility.getAbilityLists() API test */
/******************************************************************************** */
/*
* @tc.number AbilityList_0210
* @tc.name AbilityList_0210
* @tc.desc The parameters input are 'audible' and '
enable
', test the getAbilityLists() function,
* @tc.desc The parameters input are 'audible' and '
install
', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
...
...
@@ -49,7 +49,6 @@ describe('AccessibleAbilityList', function () {
it
(
'
AbilityList_0210
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0210
'
);
let
abilityType
=
'
audible
'
;
let
abilityState
=
'
enable
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0210 has error:
${
err
.
code
}
`
);
...
...
@@ -65,15 +64,14 @@ describe('AccessibleAbilityList', function () {
/*
* @tc.number AbilityList_0220
* @tc.name AbilityList_0220
* @tc.desc The parameters input are '
audible' and '
', test the getAbilityLists() function,
* @tc.desc The parameters input are '
generic' and 'install
', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0220
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0220
'
);
let
abilityType
=
'
audible
'
;
let
abilityState
=
''
;
let
abilityType
=
'
generic
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0220 has error:
${
err
.
code
}
`
);
...
...
@@ -89,15 +87,14 @@ describe('AccessibleAbilityList', function () {
/*
* @tc.number AbilityList_0230
* @tc.name AbilityList_0230
* @tc.desc The parameters input are '
audible' and null
, test the getAbilityLists() function,
* @tc.desc The parameters input are '
haptic' and 'install'
, test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0230
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0230
'
);
let
abilityType
=
'
audible
'
;
let
abilityState
=
null
;
let
abilityType
=
'
haptic
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0230 has error:
${
err
.
code
}
`
);
...
...
@@ -113,15 +110,14 @@ describe('AccessibleAbilityList', function () {
/*
* @tc.number AbilityList_0240
* @tc.name AbilityList_0240
* @tc.desc The parameters input are '
' and 'enable
', test the getAbilityLists() function,
* @tc.desc The parameters input are '
spoken' and 'install
', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0240
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0240
'
);
let
abilityType
=
''
;
let
abilityState
=
'
enable
'
;
let
abilityType
=
'
spoken
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0240 has error:
${
err
.
code
}
`
);
...
...
@@ -137,15 +133,14 @@ describe('AccessibleAbilityList', function () {
/*
* @tc.number AbilityList_0250
* @tc.name AbilityList_0250
* @tc.desc The parameters input are
null and 'enable
', test the getAbilityLists() function,
* @tc.desc The parameters input are
'visual' and 'install
', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0250
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0250
'
);
let
abilityType
=
null
;
let
abilityState
=
'
enable
'
;
let
abilityType
=
'
visual
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0250 has error:
${
err
.
code
}
`
);
...
...
@@ -161,113 +156,468 @@ describe('AccessibleAbilityList', function () {
/*
* @tc.number AbilityList_0260
* @tc.name AbilityList_0260
* @tc.desc The parameters input are 'a
udible' and 'enable
', test the getAbilityLists() function,
* @tc.desc The parameters input are 'a
ll' and 'install
', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0260
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0260
'
);
let
abilityType
=
'
audible
'
;
let
abilityType
=
'
all
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0260 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
}
console
.
info
(
`AccessibleAbilityList: AbilityList_0260 result
${
data
.
length
}
`
);
expect
(
Array
.
isArray
(
data
)).
assertEqual
(
true
);
done
();
});
})
/*
* @tc.number AbilityList_0270
* @tc.name AbilityList_0270
* @tc.desc The parameters input are '' and 'install', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0270
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0270
'
);
let
abilityType
=
''
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0270 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
}
console
.
info
(
`AccessibleAbilityList: AbilityList_0270 result
${
data
.
length
}
`
);
expect
(
Array
.
isArray
(
data
)).
assertEqual
(
true
);
done
();
});
})
/*
* @tc.number AbilityList_0280
* @tc.name AbilityList_0280
* @tc.desc The parameters input are null and 'install', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0280
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0280
'
);
let
abilityType
=
null
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0280 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
}
console
.
info
(
`AccessibleAbilityList: AbilityList_0280 result
${
data
.
length
}
`
);
expect
(
Array
.
isArray
(
data
)).
assertEqual
(
true
);
done
();
});
})
/*
* @tc.number AbilityList_0290
* @tc.name AbilityList_0290
* @tc.desc The parameters input are 'all' and 'enable', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0290
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0290
'
);
let
abilityState
=
'
enable
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0290 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
}
console
.
info
(
`AccessibleAbilityList: AbilityList_0290 result
${
data
.
length
}
`
);
expect
(
Array
.
isArray
(
data
)).
assertEqual
(
true
);
done
();
});
})
/*
* @tc.number AbilityList_0300
* @tc.name AbilityList_0300
* @tc.desc The parameters input are 'all' and 'disable', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0300
'
);
let
abilityState
=
'
disable
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0300 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
}
console
.
info
(
`AccessibleAbilityList: AbilityList_0300 result
${
data
.
length
}
`
);
expect
(
Array
.
isArray
(
data
)).
assertEqual
(
true
);
done
();
});
})
/*
* @tc.number AbilityList_0310
* @tc.name AbilityList_0310
* @tc.desc The parameters input are 'all' and 'install', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0310
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0310
'
);
let
abilityState
=
'
install
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0310 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
}
console
.
info
(
`AccessibleAbilityList: AbilityList_0310 result
${
data
.
length
}
`
);
expect
(
Array
.
isArray
(
data
)).
assertEqual
(
true
);
done
();
});
})
/*
* @tc.number AbilityList_0320
* @tc.name AbilityList_0320
* @tc.desc The parameters input are 'all' and '', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0320
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0320
'
);
let
abilityState
=
''
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0320 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
}
console
.
info
(
`AccessibleAbilityList: AbilityList_0320 result
${
data
.
length
}
`
);
expect
(
Array
.
isArray
(
data
)).
assertEqual
(
true
);
done
();
});
})
/*
* @tc.number AbilityList_0330
* @tc.name AbilityList_0330
* @tc.desc The parameters input are 'all' and null, test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0330
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0330
'
);
let
abilityState
=
null
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0330 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
}
console
.
info
(
`AccessibleAbilityList: AbilityList_0330 result
${
data
.
length
}
`
);
expect
(
Array
.
isArray
(
data
)).
assertEqual
(
true
);
done
();
});
})
/*
* @tc.number AbilityList_0340
* @tc.name AbilityList_0340
* @tc.desc The parameters input are 'audible' and 'install', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0340
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0340
'
);
let
abilityType
=
'
audible
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
).
then
((
result
)
=>
{
console
.
info
(
`AccessibleAbilityList: AbilityList_0
26
0 result
${
result
.
length
}
`
);
console
.
info
(
`AccessibleAbilityList: AbilityList_0
34
0 result
${
result
.
length
}
`
);
expect
(
Array
.
isArray
(
result
)).
assertEqual
(
true
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0260 has error:
${
err
}
`
);
console
.
error
(
`AccessibleAbilityList: AbilityList_0340 has error:
${
err
}
`
);
expect
(
null
).
assertFail
();
done
();
});
})
/*
* @tc.number AbilityList_0350
* @tc.name AbilityList_0350
* @tc.desc The parameters input are 'generic' and 'install', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0350
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0350
'
);
let
abilityType
=
'
generic
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
).
then
((
result
)
=>
{
console
.
info
(
`AccessibleAbilityList: AbilityList_0350 result
${
result
.
length
}
`
);
expect
(
Array
.
isArray
(
result
)).
assertEqual
(
true
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0350 has error:
${
err
}
`
);
expect
(
null
).
assertFail
();
done
();
});
})
/*
* @tc.number AbilityList_0
27
0
* @tc.name AbilityList_0
27
0
* @tc.desc The parameters input are '
audible' and '
', test the getAbilityLists() function,
* @tc.number AbilityList_0
36
0
* @tc.name AbilityList_0
36
0
* @tc.desc The parameters input are '
haptic' and 'install
', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0270
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0270
'
);
let
abilityType
=
'
audible
'
;
let
abilityState
=
''
;
it
(
'
AbilityList_0360
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0360
'
);
let
abilityType
=
'
haptic
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
).
then
((
result
)
=>
{
console
.
info
(
`AccessibleAbilityList: AbilityList_0360 result
${
result
.
length
}
`
);
expect
(
Array
.
isArray
(
result
)).
assertEqual
(
true
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0360 has error:
${
err
}
`
);
expect
(
null
).
assertFail
();
done
();
});
})
/*
* @tc.number AbilityList_0370
* @tc.name AbilityList_0370
* @tc.desc The parameters input are 'spoken' and 'install', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0370
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0370
'
);
let
abilityType
=
'
spoken
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
).
then
((
result
)
=>
{
console
.
info
(
`AccessibleAbilityList: AbilityList_0
2
70 result
${
result
.
length
}
`
);
console
.
info
(
`AccessibleAbilityList: AbilityList_0
3
70 result
${
result
.
length
}
`
);
expect
(
Array
.
isArray
(
result
)).
assertEqual
(
true
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0
2
70 has error:
${
err
}
`
);
console
.
error
(
`AccessibleAbilityList: AbilityList_0
3
70 has error:
${
err
}
`
);
expect
(
null
).
assertFail
();
done
();
});
})
/*
* @tc.number AbilityList_0
2
80
* @tc.name AbilityList_0
2
80
* @tc.desc The parameters input are '
audible' and null
, test the getAbilityLists() function,
* @tc.number AbilityList_0
3
80
* @tc.name AbilityList_0
3
80
* @tc.desc The parameters input are '
visual' and 'install'
, test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0280
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0280
'
);
let
abilityType
=
'
audible
'
;
let
abilityState
=
null
;
it
(
'
AbilityList_0380
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0380
'
);
let
abilityType
=
'
visual
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
).
then
((
result
)
=>
{
console
.
info
(
`AccessibleAbilityList: AbilityList_0
2
80 result
${
result
.
length
}
`
);
console
.
info
(
`AccessibleAbilityList: AbilityList_0
3
80 result
${
result
.
length
}
`
);
expect
(
Array
.
isArray
(
result
)).
assertEqual
(
true
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0280 has error:
${
err
}
`
);
console
.
error
(
`AccessibleAbilityList: AbilityList_0380 has error:
${
err
}
`
);
expect
(
null
).
assertFail
();
done
();
});
})
/*
* @tc.number AbilityList_0390
* @tc.name AbilityList_0390
* @tc.desc The parameters input are 'all' and 'install', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0390
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0390
'
);
let
abilityType
=
'
all
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
).
then
((
result
)
=>
{
console
.
info
(
`AccessibleAbilityList: AbilityList_0390 result
${
result
.
length
}
`
);
expect
(
Array
.
isArray
(
result
)).
assertEqual
(
true
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0390 has error:
${
err
}
`
);
expect
(
null
).
assertFail
();
done
();
});
})
/*
* @tc.number AbilityList_0
29
0
* @tc.name AbilityList_0
29
0
* @tc.desc The parameters input are '' and '
enable
', test the getAbilityLists() function,
* @tc.number AbilityList_0
40
0
* @tc.name AbilityList_0
40
0
* @tc.desc The parameters input are '' and '
install
', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0
29
0
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0
29
0
'
);
it
(
'
AbilityList_0
40
0
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0
40
0
'
);
let
abilityType
=
''
;
let
abilityState
=
'
enable
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
).
then
((
result
)
=>
{
console
.
info
(
`AccessibleAbilityList: AbilityList_0
29
0 result
${
result
.
length
}
`
);
console
.
info
(
`AccessibleAbilityList: AbilityList_0
40
0 result
${
result
.
length
}
`
);
expect
(
Array
.
isArray
(
result
)).
assertEqual
(
true
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0
29
0 has error:
${
err
}
`
);
console
.
error
(
`AccessibleAbilityList: AbilityList_0
40
0 has error:
${
err
}
`
);
expect
(
null
).
assertFail
();
done
();
});
})
/*
* @tc.number AbilityList_0
30
0
* @tc.name AbilityList_0
30
0
* @tc.desc The parameters input are null and '
enable
', test the getAbilityLists() function,
* @tc.number AbilityList_0
41
0
* @tc.name AbilityList_0
41
0
* @tc.desc The parameters input are null and '
install
', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_030
0
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0
30
0
'
);
it
(
'
AbilityList_041
0
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0
41
0
'
);
let
abilityType
=
null
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
).
then
((
result
)
=>
{
console
.
info
(
`AccessibleAbilityList: AbilityList_0410 result
${
result
.
length
}
`
);
expect
(
Array
.
isArray
(
result
)).
assertEqual
(
true
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0410 has error:
${
err
}
`
);
expect
(
null
).
assertFail
();
done
();
});
})
/*
* @tc.number AbilityList_0420
* @tc.name AbilityList_0420
* @tc.desc The parameters input are 'all' and 'enable', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0420
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0420
'
);
let
abilityState
=
'
enable
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
).
then
((
result
)
=>
{
console
.
info
(
`AccessibleAbilityList: AbilityList_0300 result
${
result
.
length
}
`
);
console
.
info
(
`AccessibleAbilityList: AbilityList_0420 result
${
result
.
length
}
`
);
expect
(
Array
.
isArray
(
result
)).
assertEqual
(
true
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0420 has error:
${
err
}
`
);
expect
(
null
).
assertFail
();
done
();
});
})
/*
* @tc.number AbilityList_0430
* @tc.name AbilityList_0430
* @tc.desc The parameters input are 'all' and 'disable', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0430
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0430
'
);
let
abilityState
=
'
disable
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
).
then
((
result
)
=>
{
console
.
info
(
`AccessibleAbilityList: AbilityList_0430 result
${
result
.
length
}
`
);
expect
(
Array
.
isArray
(
result
)).
assertEqual
(
true
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0430 has error:
${
err
}
`
);
expect
(
null
).
assertFail
();
done
();
});
})
/*
* @tc.number AbilityList_0440
* @tc.name AbilityList_0440
* @tc.desc The parameters input are 'all' and 'install', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0440
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0440
'
);
let
abilityState
=
'
install
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
).
then
((
result
)
=>
{
console
.
info
(
`AccessibleAbilityList: AbilityList_0440 result
${
result
.
length
}
`
);
expect
(
Array
.
isArray
(
result
)).
assertEqual
(
true
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0440 has error:
${
err
}
`
);
expect
(
null
).
assertFail
();
done
();
});
})
/*
* @tc.number AbilityList_0450
* @tc.name AbilityList_0450
* @tc.desc The parameters input are 'all' and '', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0450
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0450
'
);
let
abilityState
=
''
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
).
then
((
result
)
=>
{
console
.
info
(
`AccessibleAbilityList: AbilityList_0450 result
${
result
.
length
}
`
);
expect
(
Array
.
isArray
(
result
)).
assertEqual
(
true
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0450 has error:
${
err
}
`
);
expect
(
null
).
assertFail
();
done
();
});
})
/*
* @tc.number AbilityList_0460
* @tc.name AbilityList_0460
* @tc.desc The parameters input are 'all' and null, test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
AbilityList_0460
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0460
'
);
let
abilityState
=
null
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
).
then
((
result
)
=>
{
console
.
info
(
`AccessibleAbilityList: AbilityList_0460 result
${
result
.
length
}
`
);
expect
(
Array
.
isArray
(
result
)).
assertEqual
(
true
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0
30
0 has error:
${
err
}
`
);
console
.
error
(
`AccessibleAbilityList: AbilityList_0
46
0 has error:
${
err
}
`
);
expect
(
null
).
assertFail
();
done
();
});
...
...
barrierfree/accessiblecaptionconfiguration/entry/src/main/js/test/AccessibleCaptionConfiguration.test.js
浏览文件 @
971cb18e
...
...
@@ -14,8 +14,6 @@
*/
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
accessibility
from
'
@ohos.accessibility
'
//import accessibility from '@ohos.application.AccessibilityExtension'
describe
(
'
AccessibleCaptionConfiguration
'
,
function
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录