Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
08f6bc21
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看板
未验证
提交
08f6bc21
编写于
2月 22, 2022
作者:
O
openharmony_ci
提交者:
Gitee
2月 22, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2003 fix XTS featureability run failed.
Merge pull request !2003 from zhongjianfei/zz0221
上级
ee9149d0
bef4d607
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
45 addition
and
47 deletion
+45
-47
aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/config.json
...ability/actsfeatureabilitytest/entry/src/main/config.json
+1
-1
aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/default/pages/index/index.js
...bilitytest/entry/src/main/js/default/pages/index/index.js
+6
-1
aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
...ytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
+30
-42
aafwk/aafwk_standard/featureability/sceneproject/startability/src/main/config.json
...ureability/sceneproject/startability/src/main/config.json
+1
-1
aafwk/aafwk_standard/featureability/sceneproject/startability/src/main/js/default/pages/index/index.js
...ect/startability/src/main/js/default/pages/index/index.js
+6
-1
aafwk/aafwk_standard/featureability/sceneproject/terminateabilitytest/src/main/config.json
...ty/sceneproject/terminateabilitytest/src/main/config.json
+1
-1
未找到文件。
aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/config.json
浏览文件 @
08f6bc21
...
...
@@ -46,7 +46,7 @@
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"page"
,
"launchType"
:
"s
tandard
"
,
"launchType"
:
"s
ingleton
"
,
"process"
:
"processTestAbility"
,
"permissions"
:
[
"ohos.permission.ACCELEROMETER"
,
"ohos.permission.ANSWER_CALL"
],
"deviceCapability"
:
[
"screen_support"
,
"audio_support"
],
...
...
aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/default/pages/index/index.js
浏览文件 @
08f6bc21
...
...
@@ -18,6 +18,7 @@ import {Core, ExpectExtend} from 'deccjsunit/index'
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
var
once
=
true
export
default
{
data
:
{
...
...
@@ -27,7 +28,11 @@ export default {
this
.
title
=
this
.
$t
(
'
strings.world
'
);
},
onShow
()
{
console
.
info
(
'
onShow finish
'
)
if
(
!
once
)
{
return
;
}
once
=
false
;
console
.
info
(
'
onShow finish
'
);
const
core
=
Core
.
getInstance
()
const
expectExtend
=
new
ExpectExtend
({
'
id
'
:
'
extend
'
...
...
aafwk/aafwk_standard/featureability/actsfeatureabilitytest/entry/src/main/js/test/FeatureAbilityJsunit.test.js
浏览文件 @
08f6bc21
...
...
@@ -1099,7 +1099,7 @@ describe('ActsFeatureAbilityTest', function () {
(
error
,
data
)
=>
{
console
.
log
(
"
ACTS_HasWindowFocus_0400 asyncCallback code:
"
+
error
.
code
+
"
data:
"
+
data
)
expect
(
error
.
code
).
assertEqual
(
0
);
expect
(
data
).
assertEqual
(
fals
e
);
expect
(
data
).
assertEqual
(
tru
e
);
done
();
}
);
...
...
@@ -1228,7 +1228,7 @@ describe('ActsFeatureAbilityTest', function () {
}
}
commonEvent
.
createSubscriber
(
subscriberInfo
_ACTS_TerminateAbility_0200
).
then
(
async
(
data
)
=>
{
commonEvent
.
createSubscriber
(
subscriberInfo
TerminateAbilityTwo
).
then
(
async
(
data
)
=>
{
console
.
debug
(
"
====>Create Subscriber====>
"
);
Subscriber
=
data
;
await
commonEvent
.
subscribe
(
Subscriber
,
SubscribeCallBack
);
...
...
@@ -1525,13 +1525,13 @@ describe('ActsFeatureAbilityTest', function () {
// expect(info.iconId).assertEqual(0); //create by DevEco when building HAP.
expect
(
info
.
process
).
assertEqual
(
"
processTest
"
);
expect
(
info
.
supportedModes
).
assertEqual
(
0
);
expect
(
info
.
moduleSourceDirs
[
0
]).
assertEqual
(
"
/data/a
ccounts/account_0/applications
/
"
+
expect
(
info
.
moduleSourceDirs
[
0
]).
assertEqual
(
"
/data/a
pp/el1/bundle/public
/
"
+
"
com.example.actsfeatureabilitytest/com.example.actsfeatureabilitytest
"
);
expect
(
info
.
permissions
[
0
]).
assertEqual
(
"
ohos.permission.CAMERA
"
);
expect
(
info
.
moduleInfos
[
0
].
moduleName
).
assertEqual
(
"
entry
"
);
expect
(
info
.
moduleInfos
[
0
].
moduleSourceDir
).
assertEqual
(
"
/data/a
ccounts/account_0/applications
/
"
+
expect
(
info
.
moduleInfos
[
0
].
moduleSourceDir
).
assertEqual
(
"
/data/a
pp/el1/bundle/public
/
"
+
"
com.example.actsfeatureabilitytest/com.example.actsfeatureabilitytest
"
);
expect
(
info
.
entryDir
).
assertEqual
(
"
/data/a
ccounts/account_0/applications
/
"
+
expect
(
info
.
entryDir
).
assertEqual
(
"
/data/a
pp/el1/bundle/public
/
"
+
"
com.example.actsfeatureabilitytest/com.example.actsfeatureabilitytest
"
);
}
...
...
@@ -1806,17 +1806,14 @@ describe('ActsFeatureAbilityTest', function () {
expect
(
data
.
type
).
assertEqual
(
1
);
expect
(
data
.
subType
).
assertEqual
(
0
);
expect
(
data
.
orientation
).
assertEqual
(
0
);
expect
(
data
.
launchMode
).
assertEqual
(
1
);
expect
(
data
.
launchMode
).
assertEqual
(
0
);
expect
(
data
.
permissions
[
0
]).
assertEqual
(
"
ohos.permission.ACCELEROMETER
"
);
expect
(
data
.
permissions
[
1
]).
assertEqual
(
"
ohos.permission.ANSWER_CALL
"
);
expect
(
data
.
deviceTypes
[
0
]).
assertEqual
(
"
phone
"
);
expect
(
data
.
deviceCapabilities
[
0
]).
assertEqual
(
"
screen_support
"
);
expect
(
data
.
deviceCapabilities
[
1
]).
assertEqual
(
"
audio_support
"
);
expect
(
data
.
readPermission
).
assertEqual
(
""
);
expect
(
data
.
writePermission
).
assertEqual
(
""
);
checkApplicationInfo
(
data
.
applicationInfo
);
expect
(
data
.
formEntity
).
assertEqual
(
0
);
expect
(
data
.
minFormHeight
).
assertEqual
(
0
);
expect
(
data
.
defaultFormHeight
).
assertEqual
(
0
);
...
...
@@ -2145,7 +2142,7 @@ describe('ActsFeatureAbilityTest', function () {
featureAbility
.
startAbility
(
StartAbilityParameter
,(
err
,
data
)
=>
{
console
.
log
(
'
ACTS_StartAbility_0800 asyncCallback errCode :
'
+
JSON
.
stringify
(
err
)
+
"
data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
.
code
==
209715
2
).
assertTrue
();
expect
(
err
.
code
==
209715
5
).
assertTrue
();
done
();
});
}
catch
(
error
){
...
...
@@ -2174,7 +2171,7 @@ describe('ActsFeatureAbilityTest', function () {
featureAbility
.
startAbility
(
StartAbilityParameter
,(
err
,
data
)
=>
{
console
.
log
(
'
ACTS_StartAbility_0900 asyncCallback errCode :
'
+
JSON
.
stringify
(
err
)
+
"
data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
.
code
==
2
097152
).
assertTrue
();
expect
(
err
.
code
==
2
9360128
).
assertTrue
();
done
();
});
}
catch
(
error
){
...
...
@@ -2196,7 +2193,7 @@ describe('ActsFeatureAbilityTest', function () {
function
SubscribeCallBack
(
err
,
data
)
{
clearTimeout
(
id
);
expect
(
data
.
event
).
assertEqual
(
"
ACTS_StartAbility_1000
"
);
expect
(
data
.
event
).
assertEqual
(
"
ACTS_StartAbility_1000
_CommonEvent
"
);
console
.
debug
(
"
====>Subscribe CallBack data:====>
"
+
JSON
.
stringify
(
data
));
commonEvent
.
unsubscribe
(
Subscriber
,
UnSubscribeCallback
);
done
();
...
...
@@ -2260,7 +2257,7 @@ describe('ActsFeatureAbilityTest', function () {
featureAbility
.
startAbility
(
StartAbilityParameter
,(
err
,
data
)
=>
{
console
.
log
(
'
ACTS_StartAbility_1100 asyncCallback errCode :
'
+
JSON
.
stringify
(
err
)
+
"
data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
.
code
==
2097152
).
assertTrue
();
expect
(
err
.
code
!=
0
).
assertTrue
();
done
();
});
}
catch
(
error
){
...
...
@@ -2288,7 +2285,7 @@ describe('ActsFeatureAbilityTest', function () {
featureAbility
.
startAbility
(
StartAbilityParameter
,(
err
,
data
)
=>
{
console
.
log
(
'
ACTS_StartAbility_1200 asyncCallback errCode :
'
+
JSON
.
stringify
(
err
)
+
"
data:
"
+
JSON
.
stringify
(
data
));
expect
(
err
.
code
==
2097152
).
assertTrue
();
expect
(
err
.
code
!=
0
).
assertTrue
();
done
();
});
}
catch
(
error
){
...
...
@@ -2374,7 +2371,7 @@ 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
==
2097152
).
assertTrue
();
expect
(
err
.
code
==
0
).
assertTrue
();
done
();
});
}
catch
(
error
){
...
...
@@ -2390,21 +2387,17 @@ describe('ActsFeatureAbilityTest', function () {
*/
it
(
"
ACTS_StartAbility_1600
"
,
0
,
async
function
(
done
){
console
.
info
(
"
------------------logMessage ACTS_StartAbility_1600-------------------
"
);
try
{
let
Want
=
{}
var
StartAbilityParameter
=
{
want
:
Want
}
featureAbility
.
startAbility
(
StartAbilityParameter
).
then
((
err
,
data
)
=>
{
console
.
log
(
'
ACTS_StartAbility_1600 asyncCallback errCode :
'
+
JSON
.
stringify
(
err
)
+
"
data:
"
+
JSON
.
stringify
(
data
));
expect
(
data
==
undefined
).
assertTrue
(
);
featureAbility
.
startAbility
(
StartAbilityParameter
).
then
((
data
)
=>
{
console
.
log
(
"
ACTS_StartAbility_1600 asyncCallbackdata:
"
+
JSON
.
stringify
(
data
));
}).
catch
((
error
)
=>
{
console
.
log
(
"
ACTS_StartAbility_1600 : error =
"
+
JSON
.
stringify
(
error
)
);
done
();
});
}
catch
(
error
){
console
.
log
(
"
ACTS_StartAbility_1600 : error =
"
+
error
);
}
});
/*
...
...
@@ -2419,8 +2412,9 @@ describe('ActsFeatureAbilityTest', function () {
var
StartAbilityParameter
=
{}
var
promise
=
await
featureAbility
.
startAbility
(
StartAbilityParameter
);
console
.
log
(
'
ACTS_StartAbility_1700 promise is :
'
+
JSON
.
stringify
(
promise
));
done
();
}
catch
(
error
){
console
.
log
(
"
ACTS_StartAbility_1700 : error =
"
+
error
);
console
.
log
(
"
ACTS_StartAbility_1700 : error =
"
+
JSON
.
stringify
(
error
)
);
}
});
...
...
@@ -2432,17 +2426,11 @@ describe('ActsFeatureAbilityTest', function () {
*/
it
(
"
ACTS_StartAbility_1800
"
,
0
,
async
function
(
done
){
console
.
info
(
"
------------------logMessage ACTS_StartAbility_1800-------------------
"
);
try
{
featureAbility
.
startAbility
(
undefined
).
then
((
err
,
data
)
=>
{
console
.
log
(
'
ACTS_StartAbility_1800 asyncCallback errCode :
'
+
JSON
.
stringify
(
err
)
+
"
data:
"
+
JSON
.
stringify
(
data
));
expect
(
data
==
undefined
).
assertTrue
();
featureAbility
.
startAbility
(
undefined
).
then
((
data
)
=>
{
console
.
log
(
"
ACTS_StartAbility_1800 asyncCallbackdata:
"
+
JSON
.
stringify
(
data
));;
}).
catch
((
error
)
=>
{
console
.
log
(
"
ACTS_StartAbility_1800 : error =
"
+
JSON
.
stringify
(
error
));
done
();
});
}
catch
(
error
){
console
.
log
(
"
ACTS_StartAbility_1800 : error =
"
+
error
);
}
});
})
aafwk/aafwk_standard/featureability/sceneproject/startability/src/main/config.json
浏览文件 @
08f6bc21
...
...
@@ -42,7 +42,7 @@
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"page"
,
"launchType"
:
"s
tandard
"
"launchType"
:
"s
ingleton
"
}
],
"reqPermissions"
:
[
...
...
aafwk/aafwk_standard/featureability/sceneproject/startability/src/main/js/default/pages/index/index.js
浏览文件 @
08f6bc21
...
...
@@ -13,6 +13,7 @@
* limitations under the License.
*/
import
commonEvent
from
'
@ohos.commonevent
'
import
featureAbility
from
'
@ohos.ability.featureAbility
'
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
...
...
@@ -50,6 +51,7 @@ export default {
this
.
title
=
"
StartAbility
"
;
},
onShow
()
{
console
.
debug
(
'
==========onShow Called==========
'
)
commonEvent
.
publish
(
"
ACTS_StartAbility_0100_CommonEvent
"
,
PublishCallBackOne
);
commonEvent
.
publish
(
"
ACTS_StartAbility_0200_CommonEvent
"
,
PublishCallBackTwo
);
commonEvent
.
publish
(
"
ACTS_StartAbility_0300_CommonEvent
"
,
PublishCallBackThree
);
...
...
@@ -58,6 +60,9 @@ export default {
commonEvent
.
publish
(
"
ACTS_StartAbility_0600_CommonEvent
"
,
PublishCallBackSix
);
commonEvent
.
publish
(
"
ACTS_StartAbility_1000_CommonEvent
"
,
PublishCallBackTen
);
commonEvent
.
publish
(
"
ACTS_StartAbility_1300_CommonEvent
"
,
PublishCallBackThirteen
);
featureAbility
.
terminateSelf
((
err
,
data
)
=>
{
console
.
debug
(
'
==========Terminate Ability Success==========
'
)
});
},
onReady
()
{
},
...
...
aafwk/aafwk_standard/featureability/sceneproject/terminateabilitytest/src/main/config.json
浏览文件 @
08f6bc21
...
...
@@ -41,7 +41,7 @@
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"page"
,
"launchType"
:
"s
tandard
"
,
"launchType"
:
"s
ingleton
"
,
"visible"
:
true
}
],
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录