Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
b4a4b27f
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看板
未验证
提交
b4a4b27f
编写于
11月 22, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 22, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6622 xts用例名称修改
Merge pull request !6622 from chengxingzhen/master
上级
44e50725
935f0adf
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
25 addition
and
81 deletion
+25
-81
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/VerificationTest.ets
...coverhaptest/entry/src/main/ets/test/VerificationTest.ets
+0
-56
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
...ytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
+25
-25
未找到文件。
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/VerificationTest.ets
浏览文件 @
b4a4b27f
...
...
@@ -311,62 +311,6 @@ export default function verificationTest(){
done();
})
/*
* @tc.number SUB_AA_OpenHarmony_IsTerminating_0100
* @tc.name Verification ability destroy status query.
* @tc.desc Function test
* @tc.level 3
*/
it('SUB_AA_OpenHarmony_IsTerminating_0100', 0, async function(done) {
TAG = 'SUB_AA_OpenHarmony_IsTerminating_0100 ==>';
try {
let status1 = undefined
let status2 = undefined
let subscriber = null
let subscribeInfo = {
events: ["Stage_MainAbility5_onCreate", "Stage_MainAbility5_onDestroy"]
}
function SubscribeInfoCallback(err, data) {
console.info(TAG + "===SubscribeInfoCallback===" + JSON.stringify(data))
if (data.event == "Stage_MainAbility5_onCreate") {
status1 = data.parameters.isTerminating
}
if (data.event == "Stage_MainAbility5_onDestroy") {
status2 = data.parameters.isTerminating
expect(status1).assertFalse();
expect(status2).assertTrue();
commonEvent.unsubscribe(subscriber, UnSubscribeInfoCallback)
}
}
function UnSubscribeInfoCallback(err, data) {
console.info(TAG + "===UnSubscribeInfoCallback===")
done()
}
commonEvent.createSubscriber(subscribeInfo, (err, data) => {
console.info(TAG + "===CreateSubscriberCallback===")
subscriber = data
commonEvent.subscribe(subscriber, SubscribeInfoCallback)
})
let wantNum = {
bundleName: 'ohos.acts.aafwk.test.stagesupplement',
abilityName: 'MainAbility5'
}
globalThis.abilityContext.startAbility(wantNum).then((data) => {
console.info(TAG + "startAbility data = " + JSON.stringify(data));
}).catch((err) => {
console.info(TAG + "startAbility err = " + JSON.stringify(err));
expect().assertFail();
done();
});
} catch (err) {
console.info(TAG + "catch err = " + JSON.stringify(err));
expect().assertFail();
done();
}
})
/*
* @tc.number SUB_AA_OpenHarmony_StartAbilityLife_0100
* @tc.name Ability startup and termination will not trigger the migration lifecycle.
...
...
ability/ability_runtime/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
浏览文件 @
b4a4b27f
...
...
@@ -25,19 +25,19 @@ let subscriberInfoActsStartAbility0100 = {
events
:
[
"
ACTS_StartAbility_0100_CommonEvent
"
],
};
let
subscriberInfoActsStartAbility0200
=
{
events
:
[
"
ACTS_StartAbility_020
0
_CommonEvent
"
],
events
:
[
"
ACTS_StartAbility_020
1
_CommonEvent
"
],
};
let
subscriberInfoActsStartAbility0300
=
{
events
:
[
"
ACTS_StartAbility_030
0
_CommonEvent
"
],
events
:
[
"
ACTS_StartAbility_030
1
_CommonEvent
"
],
};
let
subscriberInfoActsStartAbility0400
=
{
events
:
[
"
ACTS_StartAbility_040
0
_CommonEvent
"
],
events
:
[
"
ACTS_StartAbility_040
1
_CommonEvent
"
],
};
let
subscriberInfoActsStartAbility0500
=
{
events
:
[
"
ACTS_StartAbility_050
0
_CommonEvent
"
],
events
:
[
"
ACTS_StartAbility_050
1
_CommonEvent
"
],
};
let
subscriberInfoActsStartAbility0600
=
{
events
:
[
"
ACTS_StartAbility_060
0
_CommonEvent
"
],
events
:
[
"
ACTS_StartAbility_060
1
_CommonEvent
"
],
};
let
subscriberInfoStartAbilityTen
=
{
events
:
[
"
ACTS_StartAbility_1000_CommonEvent
"
],
...
...
@@ -375,18 +375,18 @@ describe('ActsFeatureAbilityTest', function () {
})
/**
* @tc.number: ACTS_StartAbility_020
0
* @tc.number: ACTS_StartAbility_020
1
* @tc.name: StartAbility : A Page or Service ability uses this method to start a specific ability.
* @tc.desc: Pass the parameters, Check the return value of the interface (by Promise)
*/
it
(
'
ACTS_StartAbility_020
0
'
,
0
,
async
function
(
done
)
{
it
(
'
ACTS_StartAbility_020
1
'
,
0
,
async
function
(
done
)
{
let
Subscriber
;
let
id
;
function
SubscribeCallBack
(
err
,
data
)
{
clearTimeout
(
id
);
expect
(
promise
).
assertEqual
(
0
);
expect
(
data
.
event
).
assertEqual
(
"
ACTS_StartAbility_020
0
_CommonEvent
"
);
expect
(
data
.
event
).
assertEqual
(
"
ACTS_StartAbility_020
1
_CommonEvent
"
);
console
.
debug
(
"
====>Subscribe CallBack data:====>
"
+
JSON
.
stringify
(
data
));
commonEvent
.
unsubscribe
(
Subscriber
,
UnSubscribeCallback
)
}
...
...
@@ -404,7 +404,7 @@ describe('ActsFeatureAbilityTest', function () {
function
timeout
()
{
expect
().
assertFail
();
console
.
debug
(
'
ACTS_StartAbility_020
0
=====timeout======
'
);
console
.
debug
(
'
ACTS_StartAbility_020
1
=====timeout======
'
);
commonEvent
.
unsubscribe
(
Subscriber
,
UnSubscribeCallback
)
done
();
}
...
...
@@ -468,17 +468,17 @@ describe('ActsFeatureAbilityTest', function () {
})
/**
* @tc.number: ACTS_StartAbility_030
0
* @tc.number: ACTS_StartAbility_030
1
* @tc.name: StartAbility : A Page or Service ability uses this method to start a specific ability.
* @tc.desc: Passing null, Check the return value of the interface (by Promise)
*/
it
(
'
ACTS_StartAbility_030
0
'
,
0
,
async
function
(
done
)
{
it
(
'
ACTS_StartAbility_030
1
'
,
0
,
async
function
(
done
)
{
let
Subscriber
;
let
id
;
function
SubscribeCallBack
(
err
,
data
)
{
clearTimeout
(
id
);
expect
(
data
.
event
).
assertEqual
(
"
ACTS_StartAbility_030
0
_CommonEvent
"
);
expect
(
data
.
event
).
assertEqual
(
"
ACTS_StartAbility_030
1
_CommonEvent
"
);
console
.
debug
(
"
====>Subscribe CallBack data:====>
"
+
JSON
.
stringify
(
data
));
commonEvent
.
unsubscribe
(
Subscriber
,
UnSubscribeCallback
)
done
();
...
...
@@ -497,7 +497,7 @@ describe('ActsFeatureAbilityTest', function () {
function
timeout
()
{
expect
().
assertFail
();
console
.
debug
(
'
ACTS_StartAbility_030
0
=====timeout======
'
);
console
.
debug
(
'
ACTS_StartAbility_030
1
=====timeout======
'
);
commonEvent
.
unsubscribe
(
Subscriber
,
UnSubscribeCallback
)
done
();
}
...
...
@@ -550,17 +550,17 @@ describe('ActsFeatureAbilityTest', function () {
})
/**
* @tc.number: ACTS_StartAbility_040
0
* @tc.number: ACTS_StartAbility_040
1
* @tc.name: StartAbility : A Page or Service ability uses this method to start a specific ability.
* @tc.desc: Check the return value of the interface (by AsyncCallback)
*/
it
(
'
ACTS_StartAbility_040
0
'
,
0
,
async
function
(
done
)
{
it
(
'
ACTS_StartAbility_040
1
'
,
0
,
async
function
(
done
)
{
let
Subscriber
;
let
id
;
function
SubscribeCallBack
(
err
,
data
)
{
clearTimeout
(
id
);
expect
(
data
.
event
).
assertEqual
(
"
ACTS_StartAbility_040
0
_CommonEvent
"
);
expect
(
data
.
event
).
assertEqual
(
"
ACTS_StartAbility_040
1
_CommonEvent
"
);
console
.
debug
(
"
====>Subscribe CallBack data:====>
"
+
JSON
.
stringify
(
data
));
commonEvent
.
unsubscribe
(
Subscriber
,
UnSubscribeCallback
)
done
();
...
...
@@ -579,7 +579,7 @@ describe('ActsFeatureAbilityTest', function () {
function
timeout
()
{
expect
().
assertFail
();
console
.
debug
(
'
ACTS_StartAbility_040
0
=====timeout======
'
);
console
.
debug
(
'
ACTS_StartAbility_040
1
=====timeout======
'
);
commonEvent
.
unsubscribe
(
Subscriber
,
UnSubscribeCallback
)
done
();
}
...
...
@@ -635,17 +635,17 @@ describe('ActsFeatureAbilityTest', function () {
})
/**
* @tc.number: ACTS_StartAbility_050
0
* @tc.number: ACTS_StartAbility_050
1
* @tc.name: StartAbility : A Page or Service ability uses this method to start a specific ability.
* @tc.desc: Pass the parameters, Check the return value of the interface (by AsyncCallback)
*/
it
(
'
ACTS_StartAbility_050
0
'
,
0
,
async
function
(
done
)
{
it
(
'
ACTS_StartAbility_050
1
'
,
0
,
async
function
(
done
)
{
let
Subscriber
;
let
id
;
function
SubscribeCallBack
(
err
,
data
)
{
clearTimeout
(
id
);
expect
(
data
.
event
).
assertEqual
(
"
ACTS_StartAbility_050
0
_CommonEvent
"
);
expect
(
data
.
event
).
assertEqual
(
"
ACTS_StartAbility_050
1
_CommonEvent
"
);
console
.
debug
(
"
====>Subscribe CallBack data:====>
"
+
JSON
.
stringify
(
data
));
commonEvent
.
unsubscribe
(
Subscriber
,
UnSubscribeCallback
)
done
();
...
...
@@ -664,7 +664,7 @@ describe('ActsFeatureAbilityTest', function () {
function
timeout
()
{
expect
().
assertFail
();
console
.
debug
(
'
ACTS_StartAbility_050
0
=====timeout======
'
);
console
.
debug
(
'
ACTS_StartAbility_050
1
=====timeout======
'
);
commonEvent
.
unsubscribe
(
Subscriber
,
UnSubscribeCallback
)
done
();
}
...
...
@@ -731,17 +731,17 @@ describe('ActsFeatureAbilityTest', function () {
})
/**
* @tc.number: ACTS_StartAbility_060
0
* @tc.number: ACTS_StartAbility_060
1
* @tc.name: StartAbility : A Page or Service ability uses this method to start a specific ability.
* @tc.desc: Passing null, Check the return value of the interface (by AsyncCallback)
*/
it
(
'
ACTS_StartAbility_060
0
'
,
0
,
async
function
(
done
)
{
it
(
'
ACTS_StartAbility_060
1
'
,
0
,
async
function
(
done
)
{
let
Subscriber
;
let
id
;
function
SubscribeCallBack
(
err
,
data
)
{
clearTimeout
(
id
);
expect
(
data
.
event
).
assertEqual
(
"
ACTS_StartAbility_060
0
_CommonEvent
"
);
expect
(
data
.
event
).
assertEqual
(
"
ACTS_StartAbility_060
1
_CommonEvent
"
);
console
.
debug
(
"
====>Subscribe CallBack data:====>
"
+
JSON
.
stringify
(
data
));
commonEvent
.
unsubscribe
(
Subscriber
,
UnSubscribeCallback
)
}
...
...
@@ -759,7 +759,7 @@ describe('ActsFeatureAbilityTest', function () {
function
timeout
()
{
expect
().
assertFail
();
console
.
debug
(
'
ACTS_StartAbility_060
0
=====timeout======
'
);
console
.
debug
(
'
ACTS_StartAbility_060
1
=====timeout======
'
);
commonEvent
.
unsubscribe
(
Subscriber
,
UnSubscribeCallback
)
done
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录