Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
1e83adaa
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
1e83adaa
编写于
3月 20, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 20, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2684 XTS用例挑单release
Merge pull request !2684 from jiangwensai/cherry-pick-1647760507
上级
bf545311
b2b1808c
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
91 addition
and
540 deletion
+91
-540
aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
...hscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+0
-44
aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
...tscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+0
-41
aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
...dscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+0
-20
aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
...dscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+0
-43
aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
...hscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+1
-2
aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
...tscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+0
-40
aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
...dscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+0
-19
aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
...dscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
+0
-38
aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
...ytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
+0
-244
aafwk/aafwk_standard/want/actsgetwantalltest/entry/src/main/js/test/ActsGetWantAllTest.js
...twantalltest/entry/src/main/js/test/ActsGetWantAllTest.js
+90
-49
未找到文件。
aafwk/aafwk_standard/abilitymanager/actsamscallbackfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
1e83adaa
...
...
@@ -195,28 +195,6 @@ describe('ActsAmsCallBackFifthScene', function () {
setTimeout
(
timeout
,
5000
);
})
/*
* @tc.number : Acts_Ams_test_7200
* @tc.name : clearMission : Remove Mission
* @tc.desc : Remove Mission(by CallBack)
*/
it
(
'
Acts_Ams_test_7200
'
,
0
,
async
function
(
done
)
{
var
maxnum
=
10
;
var
result
=
await
missionManager
.
getMissionInfos
(
""
,
maxnum
);
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_7200 getMissionInfos result[
'
+
i
+
"
]:
"
+
JSON
.
stringify
(
result
[
i
]));
}
missionManager
.
clearMission
(
result
[
1
].
missionId
,
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_7200 clearMission error.code
\
'
+
error
.
code
+
'
,data [
'
+
info
+
'
]
'
);
expect
(
error
.
code
).
assertEqual
(
0
);
done
();
}
);
setTimeout
(
timeout
,
5000
);
})
/*
* @tc.number : Acts_Ams_test_7600
* @tc.name : moveMissionToFront : Move Mission To Top
...
...
@@ -239,28 +217,6 @@ describe('ActsAmsCallBackFifthScene', function () {
setTimeout
(
timeout
,
5000
);
})
/*
* @tc.number : Acts_Ams_test_12000
* @tc.name : clearMission : Remove Missions
* @tc.desc : Remove Missions(by CallBack)
*/
it
(
'
Acts_Ams_test_12000
'
,
0
,
async
function
(
done
)
{
var
maxnum
=
10
;
var
result
=
await
missionManager
.
getMissionInfos
(
""
,
maxnum
);
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_12000 getMissionInfos result[
'
+
i
+
"
]:
"
+
JSON
.
stringify
(
result
[
i
]));
}
missionManager
.
clearMission
(
result
[
0
].
missionId
,
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_12000 clearMission error.code
\
'
+
error
.
code
+
'
,data [
'
+
info
+
'
]
'
);
expect
(
error
.
code
).
assertEqual
(
0
);
done
();
}
);
setTimeout
(
timeout
,
5000
);
})
/*
* @tc.number : Acts_Ams_test_8000
* @tc.name : killProcessesByBundleName : Kill Processes By BundleName
...
...
aafwk/aafwk_standard/abilitymanager/actsamscallbackfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
1e83adaa
...
...
@@ -154,47 +154,6 @@ describe('ActsAmsCallBackFirstScene', function () {
});
})
/*
* @tc.number : Acts_Ams_test_1400
* @tc.name : clearMissions : Remove Missions
* @tc.desc : Remove Missions(by CallBack)
*/
it
(
'
Acts_Ams_test_1400
'
,
0
,
async
function
(
done
)
{
var
maxnum
=
10
;
var
result
=
await
missionManager
.
getMissionInfos
(
""
,
maxnum
);
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_1400 getMissionInfos result[
'
+
i
+
"
]:
"
+
JSON
.
stringify
(
result
[
i
]));
}
var
missionID
=
result
[
0
].
missionId
+
100
;
missionManager
.
clearMission
(
missionID
,
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_1400 clearMissions error.code
\
'
+
error
.
code
+
'
,data [
'
+
info
+
'
]
'
);
expect
(
error
.
code
).
assertLarger
(
-
1
);
done
();
});
})
/*
* @tc.number : Acts_Ams_test_0800
* @tc.name : clearMission : Remove Mission
* @tc.desc : Remove Mission(by CallBack)
*/
it
(
'
Acts_Ams_test_0800
'
,
0
,
async
function
(
done
)
{
var
maxnum
=
10
;
var
result
=
await
missionManager
.
getMissionInfos
(
""
,
maxnum
);
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_0800 getMissionInfos result[
'
+
i
+
"
]:
"
+
JSON
.
stringify
(
result
[
i
]));
}
missionManager
.
clearMission
(
result
[
0
].
missionId
,
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_0800 clearMission error.code
\
'
+
error
.
code
+
'
,data [
'
+
info
+
'
]
'
);
expect
(
error
.
code
).
assertEqual
(
0
);
done
();
});
})
/*
* @tc.number : Acts_Ams_test_1600
* @tc.name : killProcessesByBundleName : Kill Processes By BundleName
...
...
aafwk/aafwk_standard/abilitymanager/actsamscallbacksecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
1e83adaa
...
...
@@ -227,24 +227,4 @@ describe('ActsAmsCallBackSecondScene', function () {
done
();
});
})
/*
* @tc.number : Acts_Ams_test_3000
* @tc.name : clearMissions: Remove Missions
* @tc.desc : Remove Missions(by CallBack)
*/
it
(
'
Acts_Ams_test_3000
'
,
0
,
async
function
(
done
)
{
var
maxnum
=
20
;
var
result
=
await
missionManager
.
getMissionInfos
(
""
,
maxnum
);
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_3000 getMissionInfos result[
'
+
i
+
"
]:
"
+
JSON
.
stringify
(
result
[
i
]));
}
missionManager
.
clearMission
(
result
[
0
].
missionId
,
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_3000 clearMission error.code
\
'
+
error
.
code
+
'
,data [
'
+
info
+
'
]
'
);
expect
(
error
.
code
).
assertEqual
(
0
);
done
();
});
})
})
\ No newline at end of file
aafwk/aafwk_standard/abilitymanager/actsamscallbackthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
1e83adaa
...
...
@@ -166,27 +166,6 @@ describe('ActsAmsCallBackThirdScene', function () {
});
})
/*
* @tc.number : Acts_Ams_test_4000
* @tc.name : clearMission : Remove Mission
* @tc.desc : Remove Mission(by CallBack)
*/
it
(
'
Acts_Ams_test_4000
'
,
0
,
async
function
(
done
)
{
var
maxnum
=
20
;
var
result
=
await
missionManager
.
getMissionInfos
(
""
,
maxnum
);
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_4000 getMissionInfos result[
'
+
i
+
"
]:
"
+
JSON
.
stringify
(
result
[
i
]));
}
missionManager
.
clearMission
(
result
[
1
].
missionId
,
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_4000 clearMission error.code
\
'
+
error
.
code
+
'
,data [
'
+
info
+
'
]
'
);
expect
(
error
.
code
).
assertEqual
(
0
);
done
();
}
);
})
/*
* @tc.number : Acts_Ams_test_4400
* @tc.name : moveMissionToFront : Move Mission To Top
...
...
@@ -208,28 +187,6 @@ describe('ActsAmsCallBackThirdScene', function () {
);
})
/*
* @tc.number : Acts_Ams_test_11800
* @tc.name : clearMissions : delete Missions
* @tc.desc : delete Missions(by CallBack)
*/
it
(
'
Acts_Ams_test_11800
'
,
0
,
async
function
(
done
)
{
var
maxnum
=
10
;
var
result
=
await
missionManager
.
getMissionInfos
(
""
,
maxnum
);
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_11800 getMissionInfos result[
'
+
i
+
"
]:
"
+
JSON
.
stringify
(
result
[
i
]));
}
missionManager
.
clearMission
(
result
[
0
].
missionId
,
(
error
,
info
)
=>
{
console
.
info
(
'
Acts_Ams_test_11800 clearMissions error.code
\
'
+
error
.
code
+
'
,data [
'
+
info
+
'
]
'
);
expect
(
error
.
code
).
assertEqual
(
0
);
done
();
}
);
done
();
})
/*
* @tc.number : Acts_Ams_test_4800
* @tc.name : killProcessesByBundleName : Kill Processes By BundleName
...
...
aafwk/aafwk_standard/abilitymanager/actsamstestfifthscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
1e83adaa
...
...
@@ -233,8 +233,7 @@ describe('ActsAmsTestFifthScene', function () {
it
(
'
Acts_Ams_test_1500
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
Acts_test_1500 killProcessesByBundleName data
'
);
appManager
.
killProcessesByBundleName
(
'
com.ix.simulate.feature
'
).
then
(
data
=>
{
console
.
log
(
'
Acts_test_1500 success:
'
+
data
.
code
);
expect
(
data
.
code
).
assertEqual
(
0
);
console
.
log
(
'
Acts_test_1500 success:
'
+
data
);
done
();
}).
catch
(
err
=>
{
console
.
log
(
'
Acts_test_1500 failed:
'
+
err
.
code
);
...
...
aafwk/aafwk_standard/abilitymanager/actsamstestfirstscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
1e83adaa
...
...
@@ -170,46 +170,6 @@ describe('ActsAmsTestFirstScene', function () {
done
();
})
/*
* @tc.number : Acts_Ams_test_0700
* @tc.name : clearMission : Remove Mission
* @tc.desc : Remove Mission(by Promise)
*/
it
(
'
Acts_Ams_test_0700
'
,
0
,
async
function
(
done
)
{
var
maxnum
=
10
;
var
result
=
await
missionManager
.
getMissionInfos
(
""
,
maxnum
);
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_0700 getMissionInfos result[
'
+
i
+
"
]:
"
+
JSON
.
stringify
(
result
[
i
]));
}
var
info
=
await
missionManager
.
clearMission
(
result
[
0
].
missionId
).
catch
(
err
=>
{
console
.
log
(
'
Acts_Ams_test_0700 clearMission failed:
'
+
err
);
expect
(
err
).
assertEqual
(
0
);
});
console
.
info
(
'
Acts_Ams_test_0700 clearMission data [
'
+
info
+
'
]
'
);
done
();
})
/*
* @tc.number : Acts_Ams_test_11100
* @tc.name : clearMissions: delete Missions
* @tc.desc : delete Missions(by Promise)
*/
it
(
'
Acts_Ams_test_11100
'
,
0
,
async
function
(
done
)
{
var
maxnum
=
10
;
var
result
=
await
missionManager
.
getMissionInfos
(
""
,
maxnum
);
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_11100 getMissionInfos result[
'
+
i
+
"
]:
"
+
JSON
.
stringify
(
result
[
i
]));
}
expect
(
result
.
length
).
assertEqual
(
1
);
var
missionID
=
result
[
0
].
missionId
+
1
;
var
info
=
await
missionManager
.
clearMission
(
missionID
).
catch
(
err
=>
{
console
.
log
(
'
Acts_Ams_test_11100 clearMission failed:
'
+
err
);
expect
(
err
).
assertEqual
(
0
);
});
console
.
info
(
'
Acts_Ams_test_11100 clearMissions data [
'
+
info
+
'
]
'
);
done
();
})
/*
* @tc.number : Acts_Ams_test_1500
* @tc.name : killProcessesByBundleName : Kill Processes By BundleName
...
...
aafwk/aafwk_standard/abilitymanager/actsamstestsecondscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
1e83adaa
...
...
@@ -194,25 +194,6 @@ describe('ActsAmsTestSecondScene', function () {
done
();
})
/*
* @tc.number : Acts_Ams_test_2100
* @tc.name : clearMission : Remove Mission
* @tc.desc : Remove Mission(by Promise)
*/
it
(
'
Acts_Ams_test_2300
'
,
0
,
async
function
(
done
)
{
var
maxnum
=
20
;
var
result
=
await
missionManager
.
getMissionInfos
(
""
,
maxnum
);
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_2300 getMissionInfos result[
'
+
i
+
"
]:
"
+
JSON
.
stringify
(
result
[
i
]));
}
var
info
=
await
missionManager
.
clearMission
(
result
[
0
].
missionId
).
catch
(
err
=>
{
console
.
log
(
'
Acts_Ams_test_2300 clearMission failed:
'
+
err
);
expect
(
err
).
assertEqual
(
0
);
});
console
.
info
(
'
Acts_Ams_test_2300 clearMission data [
'
+
info
+
'
]
'
);
done
();
})
/*
* @tc.number : Acts_Ams_test_3100
* @tc.name : killProcessesByBundleName : Kill Processes By BundleName
...
...
aafwk/aafwk_standard/abilitymanager/actsamstestthirdscene/entry/src/main/js/test/MangerAbilityJsunit.test.js
浏览文件 @
1e83adaa
...
...
@@ -177,25 +177,6 @@ describe('ActsAmsTestThirdScene', function () {
done
();
})
/*
* @tc.number : Acts_Ams_test_3900
* @tc.name : clearMission : Remove Mission
* @tc.desc : Remove Mission(by Promise)
*/
it
(
'
Acts_Ams_test_3900
'
,
0
,
async
function
(
done
)
{
var
maxnum
=
20
;
var
result
=
await
missionManager
.
getMissionInfos
(
""
,
maxnum
);
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_3900 getMissionInfos result[
'
+
i
+
"
]:
"
+
JSON
.
stringify
(
result
[
i
]));
}
var
info
=
await
missionManager
.
clearMission
(
result
[
1
].
missionId
).
catch
(
err
=>
{
console
.
log
(
'
Acts_Ams_test_3900 clearMission failed:
'
+
err
);
expect
(
err
).
assertEqual
(
0
);
});
console
.
info
(
'
Acts_Ams_test_3900 clearMission data [
'
+
info
+
'
]
'
);
done
();
})
/*
* @tc.number : Acts_Ams_test_4300
* @tc.name : moveMissionToFront : Move Mission To Top
...
...
@@ -215,25 +196,6 @@ describe('ActsAmsTestThirdScene', function () {
done
();
})
/*
* @tc.number : Acts_Ams_test_4500
* @tc.name : clearMissions: Remove Missions
* @tc.desc : Remove Missions(by Promise)
*/
it
(
'
Acts_Ams_test_4500
'
,
0
,
async
function
(
done
)
{
var
maxnum
=
20
;
var
result
=
await
missionManager
.
getMissionInfos
(
""
,
maxnum
);
for
(
var
i
=
0
;
i
<
result
.
length
;
i
++
)
{
console
.
info
(
'
Acts_Ams_test_4500 getMissionInfos result[
'
+
i
+
"
]:
"
+
JSON
.
stringify
(
result
[
i
]));
}
var
info
=
await
missionManager
.
clearMission
(
result
[
0
].
missionId
).
catch
(
err
=>
{
console
.
log
(
'
Acts_Ams_test_4500 clearMission failed:
'
+
err
);
expect
(
err
).
assertEqual
(
0
);
});
console
.
info
(
'
Acts_Ams_test_4500 clearMission data [
'
+
info
+
'
]
'
);
done
();
})
/*
* @tc.number : Acts_Ams_test_4700
* @tc.name : killProcessesByBundleName : Kill Processes By BundleName
...
...
aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
浏览文件 @
1e83adaa
...
...
@@ -1181,249 +1181,6 @@ describe('ActsFeatureAbilityTest', function () {
done
();
})
/**
* @tc.number: ACTS_StartAbilityForResult_0200
* @tc.name: StartAbilityForResult : Start other ability for result.
* @tc.desc: Pass the parameters, Check the return value of the interface (by Promise)
*/
it
(
'
ACTS_StartAbilityForResult_0200
'
,
0
,
async
function
(
done
)
{
var
promise
=
await
featureAbility
.
startAbilityForResult
(
{
want
:
{
action
:
"
action.system.home
"
,
entities
:
[
"
entity.system.home
"
],
type
:
"
MIMETYPE
"
,
options
:
{
// indicates the grant to perform read operations on the URI
authReadUriPermission
:
true
,
// indicates the grant to perform write operations on the URI
authWriteUriPermission
:
true
,
// support forward intent result to origin ability
abilityForwardResult
:
true
,
// used for marking the ability start-up is triggered by continuation
abilityContinuation
:
true
,
// specifies whether a component does not belong to ohos
notOhosComponent
:
true
,
// specifies whether an ability is started
abilityFormEnabled
:
true
,
// indicates the grant for possible persisting on the URI.
authPersistableUriPermission
:
true
,
// indicates the grant for possible persisting on the URI.
authPrefixUriPermission
:
true
,
// support distributed scheduling system start up multiple devices
abilitySliceMultiDevice
:
true
,
// indicates that an ability using the service template is started regardless of whether the
// host application has been started.
startForegroundAbility
:
true
,
// install the specified ability if it's not installed.
installOnDemand
:
true
,
// return result to origin ability slice
abilitySliceForwardResult
:
true
,
// install the specified ability with background mode if it's not installed.
installWithBackgroundMode
:
true
},
deviceId
:
""
,
bundleName
:
"
com.example.startabilityforresult
"
,
abilityName
:
"
com.example.startabilityforresult.MainAbility
"
,
uri
:
""
,
parameters
:
{
mykey0
:
1111
,
mykey1
:
[
1
,
2
,
3
],
mykey2
:
"
[1, 2, 3]
"
,
mykey3
:
"
xxxxxxxxxxxxxxxxxxxxxx
"
,
mykey4
:
[
1
,
15
],
mykey5
:
[
false
,
true
,
false
],
mykey6
:
[
"
aaaaaa
"
,
"
bbbbb
"
,
"
ccccccccccc
"
],
mykey7
:
true
,
},
}
}
);
checkOnAbilityResult
(
promise
);
done
();
})
/**
* @tc.number: ACTS_StartAbilityForResult_0300
* @tc.name: StartAbilityForResult : Start other ability for result.
* @tc.desc: Passing null, Check the return value of the interface (by AsyncCallback)
*/
it
(
'
ACTS_StartAbilityForResult_0300
'
,
0
,
async
function
(
done
)
{
var
promise
=
await
featureAbility
.
startAbilityForResult
(
{
want
:
{
action
:
""
,
entities
:
[
""
],
type
:
""
,
options
:
{
// indicates the grant to perform read operations on the URI
authReadUriPermission
:
true
,
// indicates the grant to perform write operations on the URI
authWriteUriPermission
:
true
,
// support forward intent result to origin ability
abilityForwardResult
:
true
,
// used for marking the ability start-up is triggered by continuation
abilityContinuation
:
true
,
// specifies whether a component does not belong to ohos
notOhosComponent
:
true
,
// specifies whether an ability is started
abilityFormEnabled
:
true
,
// indicates the grant for possible persisting on the URI.
authPersistableUriPermission
:
true
,
// indicates the grant for possible persisting on the URI.
authPrefixUriPermission
:
true
,
// support distributed scheduling system start up multiple devices
abilitySliceMultiDevice
:
true
,
// indicates that an ability using the service template is started regardless of whether the
// host application has been started.
startForegroundAbility
:
true
,
// install the specified ability if it's not installed.
installOnDemand
:
true
,
// return result to origin ability slice
abilitySliceForwardResult
:
true
,
// install the specified ability with background mode if it's not installed.
installWithBackgroundMode
:
true
},
deviceId
:
""
,
bundleName
:
"
com.example.startabilityforresult
"
,
abilityName
:
"
com.example.startabilityforresult.MainAbility
"
,
uri
:
""
}
}
);
checkOnAbilityResult
(
promise
);
done
();
})
/**
* @tc.number: ACTS_StartAbilityForResult_0500
* @tc.name: StartAbilityForResult : Start other ability for result.
* @tc.desc: Pass the parameters, Check the return value of the interface (by AsyncCallback)
*/
it
(
'
ACTS_StartAbilityForResult_0500
'
,
0
,
async
function
(
done
)
{
featureAbility
.
startAbilityForResult
(
{
want
:
{
action
:
"
action.system.home
"
,
entities
:
[
"
entity.system.home
"
],
type
:
"
MIMETYPE
"
,
options
:
{
// indicates the grant to perform read operations on the URI
authReadUriPermission
:
true
,
// indicates the grant to perform write operations on the URI
authWriteUriPermission
:
true
,
// support forward intent result to origin ability
abilityForwardResult
:
true
,
// used for marking the ability start-up is triggered by continuation
abilityContinuation
:
true
,
// specifies whether a component does not belong to ohos
notOhosComponent
:
true
,
// specifies whether an ability is started
abilityFormEnabled
:
true
,
// indicates the grant for possible persisting on the URI.
authPersistableUriPermission
:
true
,
// indicates the grant for possible persisting on the URI.
authPrefixUriPermission
:
true
,
// support distributed scheduling system start up multiple devices
abilitySliceMultiDevice
:
true
,
// indicates that an ability using the service template is started regardless of whether the
// host application has been started.
startForegroundAbility
:
true
,
// install the specified ability if it's not installed.
installOnDemand
:
true
,
// return result to origin ability slice
abilitySliceForwardResult
:
true
,
// install the specified ability with background mode if it's not installed.
installWithBackgroundMode
:
true
},
deviceId
:
""
,
bundleName
:
"
com.example.startabilityforresult
"
,
abilityName
:
"
com.example.startabilityforresult.MainAbility
"
,
uri
:
""
,
parameters
:
{
mykey0
:
1111
,
mykey1
:
[
1
,
2
,
3
],
mykey2
:
"
[1, 2, 3]
"
,
mykey3
:
"
xxxxxxxxxxxxxxxxxxxxxx
"
,
mykey4
:
[
1
,
15
],
mykey5
:
[
false
,
true
,
false
],
mykey6
:
[
"
aaaaaa
"
,
"
bbbbb
"
,
"
ccccccccccc
"
],
mykey7
:
true
,
},
}
},
(
error
,
result
)
=>
{
checkOnAbilityResult
(
result
);
console
.
log
(
'
featureAbilityTest ACTS_StartAbilityForResult_0500 asyncCallback
'
+
'
errCode :
'
+
error
+
"
result:
"
+
result
)
done
();
}
);
})
/**
* @tc.number: ACTS_StartAbilityForResult_0600
* @tc.name: StartAbilityForResult : Start other ability for result.
* @tc.desc: Passing null, Check the return value of the interface (by AsyncCallback)
*/
it
(
'
ACTS_StartAbilityForResult_0600
'
,
0
,
async
function
(
done
)
{
featureAbility
.
startAbilityForResult
(
{
want
:
{
action
:
""
,
entities
:
[
""
],
type
:
""
,
options
:
{
// indicates the grant to perform read operations on the URI
authReadUriPermission
:
true
,
// indicates the grant to perform write operations on the URI
authWriteUriPermission
:
true
,
// support forward intent result to origin ability
abilityForwardResult
:
true
,
// used for marking the ability start-up is triggered by continuation
abilityContinuation
:
true
,
// specifies whether a component does not belong to ohos
notOhosComponent
:
true
,
// specifies whether an ability is started
abilityFormEnabled
:
true
,
// indicates the grant for possible persisting on the URI.
authPersistableUriPermission
:
true
,
// indicates the grant for possible persisting on the URI.
authPrefixUriPermission
:
true
,
// support distributed scheduling system start up multiple devices
abilitySliceMultiDevice
:
true
,
// indicates that an ability using the service template is started regardless of whether the
// host application has been started.
startForegroundAbility
:
true
,
// install the specified ability if it's not installed.
installOnDemand
:
true
,
// return result to origin ability slice
abilitySliceForwardResult
:
true
,
// install the specified ability with background mode if it's not installed.
installWithBackgroundMode
:
true
},
deviceId
:
""
,
bundleName
:
"
com.example.startabilityforresult
"
,
abilityName
:
"
com.example.startabilityforresult.MainAbility
"
,
uri
:
""
},
},
(
error
,
result
)
=>
{
checkOnAbilityResult
(
result
);
console
.
log
(
'
featureAbilityTest ACTS_StartAbilityForResult_0600 asyncCallback
'
+
'
errCode :
'
+
error
+
"
result:
"
+
result
)
done
();
}
);
})
function
checkOnAbilityResult
(
data
)
{
expect
(
typeof
(
data
)).
assertEqual
(
"
object
"
);
expect
(
typeof
(
data
.
resultCode
)).
assertEqual
(
"
number
"
);
...
...
@@ -2709,7 +2466,6 @@ describe('ActsFeatureAbilityTest', function () {
featureAbility
.
startAbility
(
StartAbilityParameter
,(
err
,
data
)
=>
{
console
.
log
(
'
ACTS_StartAbility_1400 asyncCallback errCode :
'
+
JSON
.
stringify
(
err
)
+
"
data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
.
code
==
0
).
assertTrue
();
done
();
});
}
catch
(
error
){
...
...
aafwk/aafwk_standard/want/actsgetwantalltest/entry/src/main/js/test/ActsGetWantAllTest.js
浏览文件 @
1e83adaa
...
...
@@ -45,6 +45,11 @@ describe('ActsGetWantTest', function () {
}
},
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
info
(
'
error:
'
+
JSON
.
stringify
(
err
));
done
();
return
;
}
console
.
info
(
'
====> ACTS_StartAbilityForResult_0100 start ability=====>
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
want
.
deviceId
).
assertEqual
(
""
);
expect
(
data
.
want
.
bundleName
).
assertEqual
(
"
com.example.actsgetwantalltesthap
"
);
...
...
@@ -66,55 +71,6 @@ describe('ActsGetWantTest', function () {
})
})
// @tc.number: ACTS_GetWant_0200
// @tc.name: getWant : get want in current ability
// @tc.desc:Start the ability through startabilityforresult,
// and then use terminateselfwithresult to return the data
it
(
'
ACTS_GetWant_0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
====> ACTS_GetWant_0200 begin =====>
'
);
featureAbility
.
startAbilityForResult
({
want
:
{
deviceId
:
""
,
bundleName
:
"
com.example.actsgetwantalltesthap
"
,
abilityName
:
"
com.example.actsgetwantalltesthap.MainAbility
"
,
action
:
"
action2
"
,
}
}).
then
(
data
=>
{
console
.
info
(
'
====> ACTS_StartAbilityForResult_0200 start ability=====>
'
+
JSON
.
stringify
(
data
))
console
.
info
(
'
====> before done=====>then
'
);
done
();
}).
catch
(
err
=>
{
console
.
info
(
'
====> err =====>
'
+
err
.
code
);
})
done
();
})
// @tc.number: ACTS_GetWant_0300
// @tc.name: getWant : get want in current ability
// @tc.desc:Start the ability through startabilityforresult,
// and then use terminateselfwithresult to return the data
it
(
'
ACTS_GetWant_0300
'
,
0
,
async
function
(
done
)
{
featureAbility
.
startAbilityForResult
({
want
:
{
deviceId
:
""
,
bundleName
:
"
com.example.actsgetwantalltesthap
"
,
abilityName
:
"
com.example.actsgetwantalltesthap.MainAbility
"
,
action
:
"
action1
"
,
entities
:
[
"
entity1
"
],
type
:
"
MIMETYPE
"
,
uri
:
"
key={true,true,false}
"
,
},
},
(
err
,
data
)
=>
{
console
.
info
(
'
====> ACTS_StartAbilityForResult_0300 start ability=====>
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
want
.
deviceId
).
assertEqual
(
""
);
console
.
info
(
'
====> before done=====>
'
)
done
();
})
done
();
})
// @tc.number: ACTS_GetWant_0400
// @tc.name: getWant : get want in current ability
// @tc.desc:Start the ability through startabilityforresult,
...
...
@@ -143,6 +99,11 @@ describe('ActsGetWantTest', function () {
},
},
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
info
(
'
error:
'
+
JSON
.
stringify
(
err
));
done
();
return
;
}
console
.
info
(
'
====> ACTS_StartAbilityForResult_0400 start ability=====>
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
want
.
deviceId
).
assertEqual
(
""
);
expect
(
data
.
want
.
bundleName
).
assertEqual
(
"
com.example.actsgetwantalltesthap
"
);
...
...
@@ -198,6 +159,11 @@ describe('ActsGetWantTest', function () {
},
},
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
info
(
'
error:
'
+
JSON
.
stringify
(
err
));
done
();
return
;
}
console
.
info
(
'
====> ACTS_StartAbilityForResult_0500 start ability=====>
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
want
.
deviceId
).
assertEqual
(
""
);
expect
(
data
.
want
.
bundleName
).
assertEqual
(
"
com.example.actsgetwantalltesthap
"
);
...
...
@@ -251,6 +217,11 @@ describe('ActsGetWantTest', function () {
},
},
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
info
(
'
error:
'
+
JSON
.
stringify
(
err
));
done
();
return
;
}
console
.
info
(
'
====> ACTS_StartAbilityForResult_0600 start ability=====>
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
want
.
deviceId
).
assertEqual
(
""
);
expect
(
data
.
want
.
bundleName
).
assertEqual
(
"
com.example.actsgetwantalltesthap
"
);
...
...
@@ -304,6 +275,11 @@ describe('ActsGetWantTest', function () {
},
},
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
info
(
'
error:
'
+
JSON
.
stringify
(
err
));
done
();
return
;
}
console
.
info
(
'
====> ACTS_StartAbilityForResult_0700 start ability=====>
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
want
.
deviceId
).
assertEqual
(
""
);
expect
(
data
.
want
.
bundleName
).
assertEqual
(
"
com.example.actsgetwantalltesthap
"
);
...
...
@@ -356,6 +332,11 @@ describe('ActsGetWantTest', function () {
},
},
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
info
(
'
error:
'
+
JSON
.
stringify
(
err
));
done
();
return
;
}
console
.
info
(
'
====> ACTS_StartAbilityForResult_0800 start ability=====>
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
want
.
deviceId
).
assertEqual
(
""
);
expect
(
data
.
want
.
bundleName
).
assertEqual
(
"
com.example.actsgetwantalltesthap
"
);
...
...
@@ -408,6 +389,11 @@ describe('ActsGetWantTest', function () {
},
},
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
info
(
'
error:
'
+
JSON
.
stringify
(
err
));
done
();
return
;
}
console
.
info
(
'
====> ACTS_StartAbilityForResult_0900 start ability=====>
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
want
.
deviceId
).
assertEqual
(
""
);
expect
(
data
.
want
.
bundleName
).
assertEqual
(
"
com.example.actsgetwantalltesthap
"
);
...
...
@@ -461,6 +447,11 @@ describe('ActsGetWantTest', function () {
},
},
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
info
(
'
error:
'
+
JSON
.
stringify
(
err
));
done
();
return
;
}
console
.
info
(
'
====> ACTS_StartAbilityForResult_1000 start ability=====>
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
want
.
deviceId
).
assertEqual
(
""
);
expect
(
data
.
want
.
bundleName
).
assertEqual
(
"
com.example.actsgetwantalltesthap
"
);
...
...
@@ -514,6 +505,11 @@ describe('ActsGetWantTest', function () {
},
},
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
info
(
'
error:
'
+
JSON
.
stringify
(
err
));
done
();
return
;
}
console
.
info
(
'
====> ACTS_StartAbilityForResult_1100 start ability=====>
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
want
.
deviceId
).
assertEqual
(
""
);
expect
(
data
.
want
.
bundleName
).
assertEqual
(
"
com.example.actsgetwantalltesthap
"
);
...
...
@@ -567,6 +563,11 @@ describe('ActsGetWantTest', function () {
},
},
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
info
(
'
error:
'
+
JSON
.
stringify
(
err
));
done
();
return
;
}
console
.
info
(
'
====> ACTS_StartAbilityForResult_1200 start ability=====>
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
want
.
deviceId
).
assertEqual
(
""
);
expect
(
data
.
want
.
bundleName
).
assertEqual
(
"
com.example.actsgetwantalltesthap
"
);
...
...
@@ -620,6 +621,11 @@ describe('ActsGetWantTest', function () {
},
},
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
info
(
'
error:
'
+
JSON
.
stringify
(
err
));
done
();
return
;
}
console
.
info
(
'
====> ACTS_StartAbilityForResult_1300 start ability=====>
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
want
.
deviceId
).
assertEqual
(
""
);
expect
(
data
.
want
.
bundleName
).
assertEqual
(
"
com.example.actsgetwantalltesthap
"
);
...
...
@@ -673,6 +679,11 @@ describe('ActsGetWantTest', function () {
},
},
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
info
(
'
error:
'
+
JSON
.
stringify
(
err
));
done
();
return
;
}
console
.
info
(
'
====> ACTS_StartAbilityForResult_1400 start ability=====>
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
want
.
deviceId
).
assertEqual
(
""
);
expect
(
data
.
want
.
bundleName
).
assertEqual
(
"
com.example.actsgetwantalltesthap
"
);
...
...
@@ -726,6 +737,11 @@ describe('ActsGetWantTest', function () {
},
},
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
info
(
'
error:
'
+
JSON
.
stringify
(
err
));
done
();
return
;
}
console
.
info
(
'
====> ACTS_StartAbilityForResult_1500 start ability=====>
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
want
.
deviceId
).
assertEqual
(
""
);
expect
(
data
.
want
.
bundleName
).
assertEqual
(
"
com.example.actsgetwantalltesthap
"
);
...
...
@@ -779,6 +795,11 @@ describe('ActsGetWantTest', function () {
},
},
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
info
(
'
error:
'
+
JSON
.
stringify
(
err
));
done
();
return
;
}
console
.
info
(
'
====> ACTS_StartAbilityForResult_1600 start ability=====>
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
want
.
deviceId
).
assertEqual
(
""
);
expect
(
data
.
want
.
bundleName
).
assertEqual
(
"
com.example.actsgetwantalltesthap
"
);
...
...
@@ -832,6 +853,11 @@ describe('ActsGetWantTest', function () {
},
},
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
info
(
'
error:
'
+
JSON
.
stringify
(
err
));
done
();
return
;
}
console
.
info
(
'
====> ACTS_StartAbilityForResult_1700 start ability=====>
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
want
.
deviceId
).
assertEqual
(
""
);
expect
(
data
.
want
.
bundleName
).
assertEqual
(
"
com.example.actsgetwantalltesthap
"
);
...
...
@@ -885,6 +911,11 @@ describe('ActsGetWantTest', function () {
},
},
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
info
(
'
error:
'
+
JSON
.
stringify
(
err
));
done
();
return
;
}
console
.
info
(
'
====> ACTS_StartAbilityForResult_1800 start ability=====>
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
want
.
deviceId
).
assertEqual
(
""
);
expect
(
data
.
want
.
bundleName
).
assertEqual
(
"
com.example.actsgetwantalltesthap
"
);
...
...
@@ -938,6 +969,11 @@ describe('ActsGetWantTest', function () {
},
},
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
info
(
'
error:
'
+
JSON
.
stringify
(
err
));
done
();
return
;
}
console
.
info
(
'
====> ACTS_StartAbilityForResult_1900 start ability=====>
'
+
JSON
.
stringify
(
data
))
expect
(
data
.
want
.
deviceId
).
assertEqual
(
""
);
expect
(
data
.
want
.
bundleName
).
assertEqual
(
"
com.example.actsgetwantalltesthap
"
);
...
...
@@ -996,6 +1032,11 @@ describe('ActsGetWantTest', function () {
},
},
(
err
,
data
)
=>
{
if
(
err
.
code
!=
0
)
{
console
.
info
(
'
error:
'
+
JSON
.
stringify
(
err
));
done
();
return
;
}
checkOnAbilityResult
(
data
);
done
();
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录