Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
f3879e7f
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看板
提交
f3879e7f
编写于
1月 29, 2023
作者:
C
chengxingzhen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xts-删除onShow,相关用例适配
Signed-off-by:
N
chengxingzhen
<
chengxingzhen@huawei.com
>
上级
ff8a0cc4
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
11 addition
and
112 deletion
+11
-112
ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappe/src/main/js/default/pages/index/index.js
...ultiinstanceappe/src/main/js/default/pages/index/index.js
+0
-4
ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstancetest/entry/src/main/ets/test/Ability.test.ets
...ultiinstancetest/entry/src/main/ets/test/Ability.test.ets
+2
-4
ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityclienttest/src/main/js/MainAbility/app.js
...tsserviceabilityclienttest/src/main/js/MainAbility/app.js
+9
-0
ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityclienttest/src/main/js/MainAbility/pages/index/index.js
...tyclienttest/src/main/js/MainAbility/pages/index/index.js
+0
-12
ability/ability_runtime/actssupportfunction/actsonandoffscreentest/entry/src/main/ets/test/OnAndOffScreenTest.test.ets
...ntest/entry/src/main/ets/test/OnAndOffScreenTest.test.ets
+0
-78
ability/ability_runtime/actssupportfunction/faonandoffscreen/entry/src/main/ets/MainAbility/app.ets
...n/faonandoffscreen/entry/src/main/ets/MainAbility/app.ets
+0
-14
未找到文件。
ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstanceappe/src/main/js/default/pages/index/index.js
浏览文件 @
f3879e7f
...
...
@@ -105,10 +105,6 @@ export default {
onInit
()
{
this
.
title
=
"
AbilityMultiInstanceAppE
"
;
callBackSeq
+=
"
onInit
"
;
},
onShow
()
{
console
.
log
(
'
AbilityMultiInstanceAppE onShow start
'
);
callBackSeq
+=
"
onShow
"
;
onShowProcess
();
},
onStart
()
{
...
...
ability/ability_runtime/abilitymultiinstance/amsabilitymultiinstancetest/entry/src/main/ets/test/Ability.test.ets
浏览文件 @
f3879e7f
...
...
@@ -775,7 +775,6 @@ export default function abilityTest(abilityContext) {
console
.
log
(
'ACTS_AbilityMultiInstance_Single_1300====<begin'
);
let
subscriber
;
let
id
;
let
result
;
let
checkEventResults
=
[
"AppB:onCreateonForeground"
,
"AppB:onCreateonForeground"
];
let
checkIndex
=
0
;
...
...
@@ -834,8 +833,7 @@ export default function abilityTest(abilityContext) {
console
.
log
(
'ACTS_AbilityMultiInstance_Single_1400====<begin'
);
let
subscriber
;
let
id
;
let
result
;
let
checkEventResults
=
[
"AppE:onInitonShow"
,
"AppA:onForegroundonAcceptWantCalledId1"
];
let
checkEventResults
=
[
"AppE:onInit"
,
"AppA:onForegroundonAcceptWantCalledId1"
];
let
checkIndex
=
0
;
function
subscribeCallBack
(
err
,
data
)
{
...
...
@@ -894,7 +892,7 @@ export default function abilityTest(abilityContext) {
let
subscriber
;
let
id
;
let
result
;
let
checkEventResults
=
[
"AppA:onForegroundonAcceptWantCalledId2"
,
"AppE:onInit
onShow
"
];
let
checkEventResults
=
[
"AppA:onForegroundonAcceptWantCalledId2"
,
"AppE:onInit"
];
let
checkIndex
=
0
;
function
subscribeCallBack
(
err
,
data
)
{
...
...
ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityclienttest/src/main/js/MainAbility/app.js
浏览文件 @
f3879e7f
...
...
@@ -12,9 +12,18 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
AbilityDelegatorRegistry
from
'
@ohos.application.abilityDelegatorRegistry
'
import
{
Hypium
}
from
'
@ohos/hypium
'
import
testsuite
from
'
../test/List.test
'
export
default
{
onCreate
()
{
console
.
info
(
'
AceApplication onCreate
'
);
let
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
()
let
abilityDelegatorArguments
=
AbilityDelegatorRegistry
.
getArguments
()
console
.
info
(
'
start run testcase!!!
'
)
Hypium
.
hypiumTest
(
abilityDelegator
,
abilityDelegatorArguments
,
testsuite
)
},
onDestroy
()
{
console
.
info
(
'
AceApplication onDestroy
'
);
...
...
ability/ability_runtime/actsserviceabilityclienttest/actsserviceabilityclienttest/src/main/js/MainAbility/pages/index/index.js
浏览文件 @
f3879e7f
...
...
@@ -12,11 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
file
from
'
@system.file
'
import
app
from
'
@system.app
'
import
AbilityDelegatorRegistry
from
'
@ohos.application.abilityDelegatorRegistry
'
import
{
Hypium
}
from
'
@ohos/hypium
'
import
testsuite
from
'
../../../test/List.test
'
export
default
{
data
:
{
...
...
@@ -25,13 +20,6 @@ export default {
onInit
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
},
onShow
()
{
console
.
info
(
'
====onShow finish====<
'
)
var
abilityDelegator
=
AbilityDelegatorRegistry
.
getAbilityDelegator
()
var
abilityDelegatorArguments
=
AbilityDelegatorRegistry
.
getArguments
()
console
.
info
(
'
start run testcase!!!
'
)
Hypium
.
hypiumTest
(
abilityDelegator
,
abilityDelegatorArguments
,
testsuite
)
},
onReady
()
{
},
}
\ No newline at end of file
ability/ability_runtime/actssupportfunction/actsonandoffscreentest/entry/src/main/ets/test/OnAndOffScreenTest.test.ets
浏览文件 @
f3879e7f
...
...
@@ -180,84 +180,6 @@ export default function OnAndOffScreenTest() {
})
})
/*
* @tc.number : SUB_AA_OpenHarmony_OnAndOffScreen_0200
* @tc.name : Verify the life cycle of on / off screen ability
* @tc.desc : FA model is applied in the foreground, the device locks the screen, and then unlocks.
*/
it
(
'SUB_AA_OpenHarmony_OnAndOffScreen_0200'
,
0
,
async
function
(
done
)
{
TAG
=
'SUB_AA_OpenHarmony_OnAndOffScreen_0200 == '
;
console
.
log
(
TAG
+
"begin"
);
let
status1
=
undefined
;
let
lifeList
=
[];
let
listCheck
=
[
"onCreate"
,
"onActive"
,
"onInactive"
,
"onHide"
,
"onShow"
];
let
onActive
=
"FaOnAndOffScreen_MainAbility_onActive"
;
let
onHide
=
"FaOnAndOffScreen_MainAbility_onHide"
;
let
onShow
=
"FaOnAndOffScreen_MainAbility_onShow"
;
var
subscriber
;
var
subscribeInfo
=
{
events
:
[
onActive
,
onHide
,
onShow
]
}
await
commonEvent
.
createSubscriber
(
subscribeInfo
)
.
then
(
async
(
data
)
=>
{
console
.
log
(
TAG
+
"createSubscriber data : "
+
JSON
.
stringify
(
data
));
subscriber
=
data
;
commonEvent
.
subscribe
(
subscriber
,
async
(
err
,
data
)
=>
{
console
.
log
(
TAG
+
"SubscribeInfoCallback : "
+
JSON
.
stringify
(
data
));
if
(
data
.
event
==
onActive
)
{
let
cmd
=
"uinput -K -d 18 -u 18"
;
await
executeShellCommand
(
cmd
,
TAG
);
}
if
(
data
.
event
==
onHide
)
{
let
cmd
=
"uinput -K -d 18 -u 18"
;
await
executeShellCommand
(
cmd
,
TAG
);
await
slideScreen
(
TAG
);
}
if
(
data
.
event
==
onShow
)
{
lifeList
=
data
.
parameters
.
lifeList
;
setTimeout
(
async
()
=>
{
commonEvent
.
unsubscribe
(
subscriber
,
async
(
err
,
data
)
=>
{
console
.
log
(
TAG
+
"UnSubscribeInfoCallback : "
+
JSON
.
stringify
(
data
));
expect
(
JSON
.
stringify
(
lifeList
))
.
assertEqual
(
JSON
.
stringify
(
listCheck
));
expect
(
status1
)
.
assertTrue
();
done
();
});
},
sleepTimeOne
);
}
});
})
.
catch
((
error
)
=>
{
console
.
log
(
TAG
+
"createSubscriber data : "
+
JSON
.
stringify
(
error
));
expect
()
.
assertFail
();
done
();
})
await
power
.
isScreenOn
()
.
then
((
data
)
=>
{
console
.
log
(
TAG
+
"isScreenOn status1 data = "
+
JSON
.
stringify
(
data
));
status1
=
data
;
})
.
catch
((
error
)
=>
{
console
.
log
(
TAG
+
"isScreenOn status1 error = "
+
JSON
.
stringify
(
error
));
expect
()
.
assertFail
();
done
();
})
let
wantNum
=
{
bundleName
:
"ohos.acts.aafwk.test.faonandoffscreen"
,
abilityName
:
"ohos.acts.aafwk.test.faonandoffscreen.MainAbility"
}
await
globalThis
.
abilityTestContext
.
startAbility
(
wantNum
)
.
then
((
data
)
=>
{
console
.
log
(
TAG
+
"startAbility data = "
+
JSON
.
stringify
(
data
));
})
.
catch
((
error
)
=>
{
console
.
log
(
TAG
+
"startAbility error = "
+
JSON
.
stringify
(
error
));
expect
()
.
assertFail
();
done
();
})
})
/*
* @tc.number : SUB_AA_OpenHarmony_OnAndOffScreen_0300
* @tc.name : Verify the life cycle of on / off screen ability
...
...
ability/ability_runtime/actssupportfunction/faonandoffscreen/entry/src/main/ets/MainAbility/app.ets
浏览文件 @
f3879e7f
...
...
@@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import ability_featureAbility from '@ohos.ability.featureAbility';
import commonEvent from '@ohos.commonEvent';
var TAG1 = "Fa:FaOnAndOffScreen:MainAbility:";
...
...
@@ -38,19 +37,6 @@ export default {
console.log(TAG1 + 'onInactive');
lifeList.push('onInactive');
},
onShow() {
console.log(TAG1 + 'onShow');
lifeList.push('onShow');
let options = {
parameters: {
lifeList: lifeList
}
}
commonEvent.publish(listPush1 + "onShow", options, (err) => {
console.log(TAG1 + listPush1 + "onShow");
});
},
onHide() {
console.log(TAG1 + 'onHide');
lifeList.push('onHide');
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录