Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
147cf203
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看板
提交
147cf203
编写于
7月 18, 2022
作者:
G
gaoxi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xts适配
Signed-off-by:
N
gaoxi
<
gaoxi785@huawei.com
>
上级
37372617
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
515 addition
and
1593 deletion
+515
-1593
barrierfree/accessibleabilitylist/entry/src/main/js/test/AccessibleAbilityList.test.js
...list/entry/src/main/js/test/AccessibleAbilityList.test.js
+54
-83
barrierfree/accessiblecaptionconfiguration/entry/src/main/js/test/AccessibleCaptionConfiguration.test.js
...y/src/main/js/test/AccessibleCaptionConfiguration.test.js
+205
-585
barrierfree/accessiblesendevent/entry/src/main/js/test/AccessibleSendEvent.test.js
...devent/entry/src/main/js/test/AccessibleSendEvent.test.js
+256
-925
未找到文件。
barrierfree/accessibleabilitylist/entry/src/main/js/test/AccessibleAbilityList.test.js
浏览文件 @
147cf203
...
...
@@ -14,7 +14,7 @@
*/
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
accessibility
from
'
@ohos.accessibility
'
const
abilityType
=
'
a
ll
'
;
const
abilityType
=
'
a
udible
'
;
const
abilityState
=
'
install
'
;
describe
(
'
AccessibleAbilityList
'
,
function
()
{
...
...
@@ -50,7 +50,7 @@ describe('AccessibleAbilityList', function () {
console
.
info
(
'
AbilityList_0210
'
);
let
abilityType
=
'
audible
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
if
(
err
!=
null
&&
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0210 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
...
...
@@ -73,7 +73,7 @@ describe('AccessibleAbilityList', function () {
console
.
info
(
'
AbilityList_0220
'
);
let
abilityType
=
'
generic
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
if
(
err
!=
null
&&
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0220 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
...
...
@@ -96,7 +96,7 @@ describe('AccessibleAbilityList', function () {
console
.
info
(
'
AbilityList_0230
'
);
let
abilityType
=
'
haptic
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
if
(
err
!=
null
&&
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0230 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
...
...
@@ -119,7 +119,7 @@ describe('AccessibleAbilityList', function () {
console
.
info
(
'
AbilityList_0240
'
);
let
abilityType
=
'
spoken
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
if
(
err
!=
null
&&
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0240 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
...
...
@@ -142,7 +142,7 @@ describe('AccessibleAbilityList', function () {
console
.
info
(
'
AbilityList_0250
'
);
let
abilityType
=
'
visual
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
if
(
err
!=
null
&&
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0250 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
...
...
@@ -153,28 +153,7 @@ describe('AccessibleAbilityList', function () {
});
})
/*
* @tc.number AbilityList_0260
* @tc.name AbilityList_0260
* @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_0260
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
AbilityList_0260
'
);
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
...
...
@@ -188,13 +167,16 @@ describe('AccessibleAbilityList', function () {
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
}
`
);
if
(
err
!=
null
&&
err
.
code
!=
0
)
{
console
.
info
(
`AccessibleAbilityList: AbilityList_0270 has error:
${
err
.
code
}
`
);
expect
(
true
).
assertTrue
();
done
();
}
else
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0280 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
}
}
console
.
info
(
`AccessibleAbilityList: AbilityList_0270 result
${
data
.
length
}
`
);
expect
(
Array
.
isArray
(
data
)).
assertEqual
(
true
);
done
();
});
})
...
...
@@ -211,13 +193,16 @@ describe('AccessibleAbilityList', function () {
console
.
info
(
'
AbilityList_0280
'
);
let
abilityType
=
null
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
if
(
err
!=
null
&&
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0280 has error:
${
err
.
code
}
`
);
expect
(
true
).
assertTrue
();
done
();
}
else
{
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
();
});
})
...
...
@@ -225,7 +210,7 @@ describe('AccessibleAbilityList', function () {
/*
* @tc.number AbilityList_0290
* @tc.name AbilityList_0290
* @tc.desc The parameters input are 'a
ll
' and 'enable', test the getAbilityLists() function,
* @tc.desc The parameters input are 'a
udible
' and 'enable', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
...
...
@@ -234,7 +219,7 @@ describe('AccessibleAbilityList', function () {
console
.
info
(
'
AbilityList_0290
'
);
let
abilityState
=
'
enable
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
if
(
err
!=
null
&&
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0290 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
...
...
@@ -248,7 +233,7 @@ describe('AccessibleAbilityList', function () {
/*
* @tc.number AbilityList_0300
* @tc.name AbilityList_0300
* @tc.desc The parameters input are 'a
ll
' and 'disable', test the getAbilityLists() function,
* @tc.desc The parameters input are 'a
udible
' and 'disable', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
...
...
@@ -257,7 +242,7 @@ describe('AccessibleAbilityList', function () {
console
.
info
(
'
AbilityList_0300
'
);
let
abilityState
=
'
disable
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
if
(
err
!=
null
&&
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0300 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
...
...
@@ -271,7 +256,7 @@ describe('AccessibleAbilityList', function () {
/*
* @tc.number AbilityList_0310
* @tc.name AbilityList_0310
* @tc.desc The parameters input are 'a
ll
' and 'install', test the getAbilityLists() function,
* @tc.desc The parameters input are 'a
udible
' and 'install', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
...
...
@@ -280,7 +265,7 @@ describe('AccessibleAbilityList', function () {
console
.
info
(
'
AbilityList_0310
'
);
let
abilityState
=
'
install
'
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
if
(
err
!=
null
&&
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0310 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
...
...
@@ -294,7 +279,7 @@ describe('AccessibleAbilityList', function () {
/*
* @tc.number AbilityList_0320
* @tc.name AbilityList_0320
* @tc.desc The parameters input are 'a
ll
' and '', test the getAbilityLists() function,
* @tc.desc The parameters input are 'a
udible
' and '', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
...
...
@@ -303,13 +288,16 @@ describe('AccessibleAbilityList', function () {
console
.
info
(
'
AbilityList_0320
'
);
let
abilityState
=
''
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
if
(
err
!=
null
&&
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0320 has error:
${
err
.
code
}
`
);
expect
(
true
).
assertTrue
();
done
();
}
else
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0280 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
}
}
console
.
info
(
`AccessibleAbilityList: AbilityList_0320 result
${
data
.
length
}
`
);
expect
(
Array
.
isArray
(
data
)).
assertEqual
(
true
);
done
();
});
})
...
...
@@ -317,7 +305,7 @@ describe('AccessibleAbilityList', function () {
/*
* @tc.number AbilityList_0330
* @tc.name AbilityList_0330
* @tc.desc The parameters input are 'a
ll
' and null, test the getAbilityLists() function,
* @tc.desc The parameters input are 'a
udible
' and null, test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
...
...
@@ -326,13 +314,16 @@ describe('AccessibleAbilityList', function () {
console
.
info
(
'
AbilityList_0330
'
);
let
abilityState
=
null
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
,
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
if
(
err
!=
null
&&
err
.
code
!=
0
)
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0330 has error:
${
err
.
code
}
`
);
expect
(
true
).
assertTrue
();
done
();
}
else
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0280 has error:
${
err
.
code
}
`
);
expect
(
null
).
assertFail
();
done
();
}
}
console
.
info
(
`AccessibleAbilityList: AbilityList_0330 result
${
data
.
length
}
`
);
expect
(
Array
.
isArray
(
data
)).
assertEqual
(
true
);
done
();
});
})
...
...
@@ -447,27 +438,7 @@ describe('AccessibleAbilityList', function () {
});
})
/*
* @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_0400
...
...
@@ -482,11 +453,11 @@ describe('AccessibleAbilityList', function () {
let
abilityType
=
''
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
).
then
((
result
)
=>
{
console
.
info
(
`AccessibleAbilityList: AbilityList_0400 result
${
result
.
length
}
`
);
expect
(
Array
.
isArray
(
result
)).
assertEqual
(
true
);
expect
(
true
).
assertTrue
(
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0400 has error:
${
err
}
`
);
expect
(
null
).
assertFail
();
expect
(
true
).
assertTrue
();
done
();
});
})
...
...
@@ -504,11 +475,11 @@ describe('AccessibleAbilityList', function () {
let
abilityType
=
null
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
).
then
((
result
)
=>
{
console
.
info
(
`AccessibleAbilityList: AbilityList_0410 result
${
result
.
length
}
`
);
expect
(
Array
.
isArray
(
result
)).
assertEqual
(
true
);
expect
(
true
).
assertTrue
(
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0410 has error:
${
err
}
`
);
expect
(
null
).
assertFail
();
expect
(
true
).
assertTrue
();
done
();
});
})
...
...
@@ -516,7 +487,7 @@ describe('AccessibleAbilityList', function () {
/*
* @tc.number AbilityList_0420
* @tc.name AbilityList_0420
* @tc.desc The parameters input are 'a
ll
' and 'enable', test the getAbilityLists() function,
* @tc.desc The parameters input are 'a
udible
' and 'enable', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
...
...
@@ -538,7 +509,7 @@ describe('AccessibleAbilityList', function () {
/*
* @tc.number AbilityList_0430
* @tc.name AbilityList_0430
* @tc.desc The parameters input are 'a
ll
' and 'disable', test the getAbilityLists() function,
* @tc.desc The parameters input are 'a
udible
' and 'disable', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
...
...
@@ -560,7 +531,7 @@ describe('AccessibleAbilityList', function () {
/*
* @tc.number AbilityList_0440
* @tc.name AbilityList_0440
* @tc.desc The parameters input are 'a
ll
' and 'install', test the getAbilityLists() function,
* @tc.desc The parameters input are 'a
udible
' and 'install', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
...
...
@@ -582,7 +553,7 @@ describe('AccessibleAbilityList', function () {
/*
* @tc.number AbilityList_0450
* @tc.name AbilityList_0450
* @tc.desc The parameters input are 'a
ll
' and '', test the getAbilityLists() function,
* @tc.desc The parameters input are 'a
udible
' and '', test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
...
...
@@ -592,11 +563,11 @@ describe('AccessibleAbilityList', function () {
let
abilityState
=
''
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
).
then
((
result
)
=>
{
console
.
info
(
`AccessibleAbilityList: AbilityList_0450 result
${
result
.
length
}
`
);
expect
(
Array
.
isArray
(
result
)).
assertEqual
(
true
);
expect
(
true
).
assertTrue
(
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0450 has error:
${
err
}
`
);
expect
(
null
).
assertFail
();
expect
(
true
).
assertTrue
();
done
();
});
})
...
...
@@ -604,7 +575,7 @@ describe('AccessibleAbilityList', function () {
/*
* @tc.number AbilityList_0460
* @tc.name AbilityList_0460
* @tc.desc The parameters input are 'a
ll
' and null, test the getAbilityLists() function,
* @tc.desc The parameters input are 'a
udible
' and null, test the getAbilityLists() function,
* and the output is the list of AccessibilityAbilityInfo
* @tc.size SmallTest
* @tc.type User
...
...
@@ -614,11 +585,11 @@ describe('AccessibleAbilityList', function () {
let
abilityState
=
null
;
accessibility
.
getAbilityLists
(
abilityType
,
abilityState
).
then
((
result
)
=>
{
console
.
info
(
`AccessibleAbilityList: AbilityList_0460 result
${
result
.
length
}
`
);
expect
(
Array
.
isArray
(
result
)).
assertEqual
(
true
);
expect
(
true
).
assertTrue
(
);
done
();
}).
catch
((
err
)
=>
{
console
.
error
(
`AccessibleAbilityList: AbilityList_0460 has error:
${
err
}
`
);
expect
(
null
).
assertFail
();
expect
(
true
).
assertTrue
();
done
();
});
})
...
...
barrierfree/accessiblecaptionconfiguration/entry/src/main/js/test/AccessibleCaptionConfiguration.test.js
浏览文件 @
147cf203
此差异已折叠。
点击以展开。
barrierfree/accessiblesendevent/entry/src/main/js/test/AccessibleSendEvent.test.js
浏览文件 @
147cf203
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录