Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
8ce0042e
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看板
提交
8ce0042e
编写于
6月 02, 2022
作者:
C
chengxingzhen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Modify codex
Signed-off-by:
N
chengxingzhen
<
chengxingzhen@huawei.com
>
上级
448892dc
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
57 addition
and
11 deletion
+57
-11
aafwk/aafwk_standard/formmanager/fa/formsystemtest_ets/formstatetest_disable/entry/src/main/ets/MainAbility/test/FmsFormStateDisable.test.ets
...rc/main/ets/MainAbility/test/FmsFormStateDisable.test.ets
+19
-8
aafwk/aafwk_standard/formmanager/fa/formsystemtest_ets/formstatetest_enable/entry/src/main/ets/MainAbility/test/FmsFormStateEnable.test.ets
...src/main/ets/MainAbility/test/FmsFormStateEnable.test.ets
+9
-0
aafwk/aafwk_standard/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible/entry/src/main/ets/MainAbility/test/FmsFormStateNotifyInvisible.test.ets
...ets/MainAbility/test/FmsFormStateNotifyInvisible.test.ets
+9
-0
aafwk/aafwk_standard/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible2/entry/src/main/ets/MainAbility/test/FmsFormStateNotifyInvisible2.test.ets
...ts/MainAbility/test/FmsFormStateNotifyInvisible2.test.ets
+10
-1
aafwk/aafwk_standard/formmanager/fa/formsystemtest_ets/formstatetest_notifyvisible/entry/src/main/ets/MainAbility/test/FmsFormStateNotifyVisible.test.ets
...n/ets/MainAbility/test/FmsFormStateNotifyVisible.test.ets
+10
-2
未找到文件。
aafwk/aafwk_standard/formmanager/fa/formsystemtest_ets/formstatetest_disable/entry/src/main/ets/MainAbility/test/FmsFormStateDisable.test.ets
浏览文件 @
8ce0042e
...
...
@@ -52,6 +52,7 @@ export default function test() {
subscriberDel
=
await
commonEvent
.
createSubscriber
(
onDeletedFormEvent
);
subscriberOnState
=
await
commonEvent
.
createSubscriber
(
onStateFormEvent
);
subscriberSupply
=
await
commonEvent
.
createSubscriber
(
onSupplyEvent
);
await
sleep
(
1000
);
})
/**
...
...
@@ -570,17 +571,18 @@ export default function test() {
},
10000
);
}
function
onAcquiredCallBack
(
_
,
data
)
{
async
function
onAcquiredCallBack
(
_
,
data
)
{
expect
(
data
.
event
)
.
assertEqual
(
"FMS_FormOnState_commonEvent"
);
commonEvent
.
unsubscribe
(
subscriberOn
Acquired
,
()
=>
unsubscribeSupplyCallback
(
"FMS_disableFormsUpdate_1000"
));
commonEvent
.
unsubscribe
(
subscriberOn
State
,
()
=>
unsubscribeSupplyCallback
(
"FMS_disableFormsUpdate_1000"
));
console
.
debug
(
"====>FMS_disableFormsUpdate_1000 onAcquiredCallBack====>"
+
JSON
.
stringify
(
data
));
expect
(
data
.
parameters
.
kind
)
.
assertEqual
(
"visible"
);
expect
(
data
.
data
)
.
assertEqual
(
"0"
);
formId
=
data
.
parameters
.
formId
;
subscriberOnState
=
await
commonEvent
.
createSubscriber
(
onStateFormEvent
);
commonEvent
.
subscribe
(
subscriberOnState
,
onFormDisableCallBack
);
console
.
log
(
`FMS_disableFormsUpdate_1000 featureAbility.startAbility notify disable start`
);
featureAbility
.
startAbility
({
await
featureAbility
.
startAbility
({
want
:
{
bundleName
:
"com.ohos.st.formsystemhostg"
,
abilityName
:
"com.ohos.st.formsystemhostg.MainAbility"
,
...
...
@@ -604,7 +606,7 @@ export default function test() {
console
.
log
(
`FMS_disableFormsUpdate_1000 featureAbility.startAbility notify disable end`
);
}
commonEvent
.
subscribe
(
subscriberOn
Acquired
,
onAcquiredCallBack
);
commonEvent
.
subscribe
(
subscriberOn
State
,
onAcquiredCallBack
);
console
.
log
(
`FMS_disableFormsUpdate_1000 featureAbility.startAbility servicea start`
);
await
featureAbility
.
startAbility
({
want
:
{
...
...
@@ -681,17 +683,18 @@ export default function test() {
},
10000
);
}
function
onAcquiredCallBack
(
_
,
data
)
{
async
function
onAcquiredCallBack
(
_
,
data
)
{
expect
(
data
.
event
)
.
assertEqual
(
"FMS_FormOnState_commonEvent"
);
commonEvent
.
unsubscribe
(
subscriberOn
Acquired
,
()
=>
unsubscribeSupplyCallback
(
"FMS_disableFormsUpdate_1100"
));
commonEvent
.
unsubscribe
(
subscriberOn
State
,
()
=>
unsubscribeSupplyCallback
(
"FMS_disableFormsUpdate_1100"
));
console
.
debug
(
"====>FMS_disableFormsUpdate_1100 onAcquiredCallBack====>"
+
JSON
.
stringify
(
data
));
expect
(
data
.
parameters
.
kind
)
.
assertEqual
(
"visible"
);
expect
(
data
.
data
)
.
assertEqual
(
"0"
);
formId
=
data
.
parameters
.
formId
;
subscriberOnState
=
await
commonEvent
.
createSubscriber
(
onStateFormEvent
);
commonEvent
.
subscribe
(
subscriberOnState
,
onFormDisableCallBack
);
console
.
log
(
`FMS_disableFormsUpdate_1100 featureAbility.startAbility notify disable start`
);
featureAbility
.
startAbility
({
await
featureAbility
.
startAbility
({
want
:
{
bundleName
:
"com.ohos.st.formsystemhostg"
,
abilityName
:
"com.ohos.st.formsystemhostg.MainAbility"
,
...
...
@@ -715,7 +718,7 @@ export default function test() {
console
.
log
(
`FMS_disableFormsUpdate_1100 featureAbility.startAbility notify disable end`
);
}
commonEvent
.
subscribe
(
subscriberOn
Acquired
,
onAcquiredCallBack
);
commonEvent
.
subscribe
(
subscriberOn
State
,
onAcquiredCallBack
);
console
.
log
(
`FMS_disableFormsUpdate_1100 featureAbility.startAbility servicea start`
);
await
featureAbility
.
startAbility
({
want
:
{
...
...
@@ -743,6 +746,14 @@ export default function test() {
});
}
const
sleep
=
async
delay
=>
{
return
new
Promise
((
resolve
,
_
)
=>
{
setTimeout
(
async
()
=>
{
resolve
(
0
);
},
delay
);
});
};
const
delPublishCallback
=
async
(
tcNumber
,
done
)
=>
{
console
.
info
(
`${tcNumber} delPublishCallBack start`
);
setTimeout
(
function
()
{
...
...
aafwk/aafwk_standard/formmanager/fa/formsystemtest_ets/formstatetest_enable/entry/src/main/ets/MainAbility/test/FmsFormStateEnable.test.ets
浏览文件 @
8ce0042e
...
...
@@ -52,6 +52,7 @@ export default function test() {
subscriberDel
=
await
commonEvent
.
createSubscriber
(
onDeletedFormEvent
);
subscriberOnState
=
await
commonEvent
.
createSubscriber
(
onStateFormEvent
);
subscriberSupply
=
await
commonEvent
.
createSubscriber
(
onSupplyEvent
);
await
sleep
(
1000
);
})
/**
...
...
@@ -868,6 +869,14 @@ export default function test() {
});
}
const
sleep
=
async
delay
=>
{
return
new
Promise
((
resolve
,
_
)
=>
{
setTimeout
(
async
()
=>
{
resolve
(
0
);
},
delay
);
});
};
const
delPublishCallback
=
async
(
tcNumber
,
done
)
=>
{
console
.
info
(
`${tcNumber} delPublishCallBack start`
);
setTimeout
(
function
()
{
...
...
aafwk/aafwk_standard/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible/entry/src/main/ets/MainAbility/test/FmsFormStateNotifyInvisible.test.ets
浏览文件 @
8ce0042e
...
...
@@ -48,6 +48,7 @@ export default function test() {
subscriberDel
=
await
commonEvent
.
createSubscriber
(
onDeletedFormEvent
);
subscriberOnState
=
await
commonEvent
.
createSubscriber
(
onStateFormEvent
);
subscriberSupply
=
await
commonEvent
.
createSubscriber
(
onSupplyEvent
);
await
sleep
(
1000
);
})
/**
...
...
@@ -508,6 +509,14 @@ export default function test() {
});
}
const
sleep
=
async
delay
=>
{
return
new
Promise
((
resolve
,
_
)
=>
{
setTimeout
(
async
()
=>
{
resolve
(
0
);
},
delay
);
});
};
const
delPublishCallback
=
async
(
tcNumber
,
done
)
=>
{
console
.
info
(
`${tcNumber} delPublishCallBack start`
);
setTimeout
(
function
()
{
...
...
aafwk/aafwk_standard/formmanager/fa/formsystemtest_ets/formstatetest_notifyinvisible2/entry/src/main/ets/MainAbility/test/FmsFormStateNotifyInvisible2.test.ets
浏览文件 @
8ce0042e
...
...
@@ -43,6 +43,7 @@ export default function test() {
subscriberOnAcquired
=
await
commonEvent
.
createSubscriber
(
onAcquiredForm_Event
);
subscriberOnState
=
await
commonEvent
.
createSubscriber
(
onStateFormEvent
);
subscriberSupply
=
await
commonEvent
.
createSubscriber
(
onSupplyEvent
);
await
sleep
(
1000
);
})
/**
...
...
@@ -750,7 +751,7 @@ export default function test() {
function
onStateCallBack
(
_
,
data
)
{
console
.
info
(
"!!!====>FMS_notifyInvisibleForms_1500 onStateCallBack data:====>"
+
JSON
.
stringify
(
data
));
expect
(
data
.
event
)
.
assertEqual
(
"FMS_FormOnState_commonEvent"
);
expect
(
data
.
data
!=
"0"
)
.
assertEqual
(
true
);
expect
(
data
.
data
)
.
assertEqual
(
"7"
);
commonEvent
.
unsubscribe
(
subscriberOnState
,
()
=>
unsubscribeOnStateCallback
(
"FMS_notifyInvisibleForms_1500"
))
setTimeout
(
function
()
{
...
...
@@ -791,6 +792,14 @@ export default function test() {
});
}
const
sleep
=
async
delay
=>
{
return
new
Promise
((
resolve
,
_
)
=>
{
setTimeout
(
async
()
=>
{
resolve
(
0
);
},
delay
);
});
};
const
delPublishCallback
=
async
(
tcNumber
,
done
)
=>
{
console
.
info
(
`${tcNumber} delPublishCallBack start`
);
setTimeout
(
function
()
{
...
...
aafwk/aafwk_standard/formmanager/fa/formsystemtest_ets/formstatetest_notifyvisible/entry/src/main/ets/MainAbility/test/FmsFormStateNotifyVisible.test.ets
浏览文件 @
8ce0042e
...
...
@@ -46,6 +46,7 @@ export default function test() {
subscriberOnAcquired
=
await
commonEvent
.
createSubscriber
(
onAcquiredForm_Event
);
subscriberOnState
=
await
commonEvent
.
createSubscriber
(
onStateFormEvent
);
subscriberSupply
=
await
commonEvent
.
createSubscriber
(
onSupplyEvent
);
await
sleep
(
1000
);
})
...
...
@@ -495,7 +496,7 @@ export default function test() {
expect
(
data
.
data
)
.
assertEqual
(
"0"
);
assertFormId
=
data
.
parameters
.
formId
;
commonEvent
.
unsubscribe
(
subscriber
Supply
,
()
=>
unsubscribeOnStateCallback
(
"FMS_notifyVisibleForms_1100"
));
commonEvent
.
unsubscribe
(
subscriber
OnState
,
()
=>
unsubscribeOnStateCallback
(
"FMS_notifyVisibleForms_1100"
));
}
commonEvent
.
subscribe
(
subscriberOnState
,
onVisibleCallBack
);
...
...
@@ -924,7 +925,6 @@ export default function test() {
formIds
.
push
(
data
.
data
);
console
.
debug
(
"====>FMS_notifyVisibleForms_1500 formIds====>"
+
formIds
);
subscriberOnAcquired
=
await
commonEvent
.
createSubscriber
(
onAcquiredForm_Event
);
commonEvent
.
subscribe
(
subscriberSupply
,
onVisibleSupplyCallBack
);
console
.
log
(
`FMS_notifyVisibleForms_1500 featureAbility.startAbility notifyVisible start`
);
for
(
var
i
=
0
;
i
<
3
;
i
++
)
{
...
...
@@ -1347,6 +1347,14 @@ export default function test() {
});
}
const
sleep
=
async
delay
=>
{
return
new
Promise
((
resolve
,
_
)
=>
{
setTimeout
(
async
()
=>
{
resolve
(
0
);
},
delay
);
});
};
const
delPublishCallback
=
async
(
tcNumber
,
done
)
=>
{
console
.
info
(
`${tcNumber} delPublishCallBack start`
);
setTimeout
(
function
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录