Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
2ff715d0
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看板
提交
2ff715d0
编写于
10月 21, 2021
作者:
O
openharmony_ci
提交者:
Gitee
10月 21, 2021
浏览文件
操作
浏览文件
下载
差异文件
!911 fms xts
Merge pull request !911 from blackleon/master_fms_1018
上级
4477f50d
5be25e2d
变更
28
隐藏空白更改
内联
并排
Showing
28 changed file
with
1391 addition
and
0 deletion
+1391
-0
aafwk/aafwk_standard/BUILD.gn
aafwk/aafwk_standard/BUILD.gn
+1
-0
aafwk/aafwk_standard/formmanager/BUILD.gn
aafwk/aafwk_standard/formmanager/BUILD.gn
+25
-0
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/BUILD.gn
...d/formmanager/formsystemtesthost/getallformsinfo/BUILD.gn
+31
-0
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/Test.json
.../formmanager/formsystemtesthost/getallformsinfo/Test.json
+38
-0
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/config.json
...systemtesthost/getallformsinfo/entry/src/main/config.json
+90
-0
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/app.js
...testhost/getallformsinfo/entry/src/main/js/default/app.js
+23
-0
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/i18n/en-US.json
...getallformsinfo/entry/src/main/js/default/i18n/en-US.json
+6
-0
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/i18n/zh-CN.json
...getallformsinfo/entry/src/main/js/default/i18n/zh-CN.json
+6
-0
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/pages/index/index.css
...formsinfo/entry/src/main/js/default/pages/index/index.css
+44
-0
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/pages/index/index.hml
...formsinfo/entry/src/main/js/default/pages/index/index.hml
+5
-0
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/pages/index/index.js
...lformsinfo/entry/src/main/js/default/pages/index/index.js
+51
-0
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/test/GetAllFormsInfoJsunit.test.js
...info/entry/src/main/js/test/GetAllFormsInfoJsunit.test.js
+615
-0
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/test/List.test.js
...thost/getallformsinfo/entry/src/main/js/test/List.test.js
+16
-0
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/resources/base/element/string.json
...rmsinfo/entry/src/main/resources/base/element/string.json
+12
-0
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/resources/base/media/icon.png
...allformsinfo/entry/src/main/resources/base/media/icon.png
+0
-0
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/signature/openharmony_sx.p7b
...stemtesthost/getallformsinfo/signature/openharmony_sx.p7b
+0
-0
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/BUILD.gn
...ger/formsystemtestservice/formsystemtestservicea/BUILD.gn
+31
-0
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/Test.json
...er/formsystemtestservice/formsystemtestservicea/Test.json
+25
-0
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/config.json
...formsystemtestservicea/formmodule001/src/main/config.json
+107
-0
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/app.js
...stemtestservicea/formmodule001/src/main/js/default/app.js
+169
-0
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/i18n/en-US.json
...ervicea/formmodule001/src/main/js/default/i18n/en-US.json
+6
-0
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/i18n/zh-CN.json
...ervicea/formmodule001/src/main/js/default/i18n/zh-CN.json
+6
-0
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/pages/index/index.css
...a/formmodule001/src/main/js/default/pages/index/index.css
+44
-0
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/pages/index/index.hml
...a/formmodule001/src/main/js/default/pages/index/index.hml
+5
-0
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/pages/index/index.js
...ea/formmodule001/src/main/js/default/pages/index/index.js
+23
-0
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/resources/base/element/string.json
...formmodule001/src/main/resources/base/element/string.json
+12
-0
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/resources/base/media/icon.png
...icea/formmodule001/src/main/resources/base/media/icon.png
+0
-0
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/signature/openharmony_sx.p7b
...rvice/formsystemtestservicea/signature/openharmony_sx.p7b
+0
-0
未找到文件。
aafwk/aafwk_standard/BUILD.gn
浏览文件 @
2ff715d0
...
...
@@ -20,6 +20,7 @@ group("aafwk_standard") {
#"abilitymanager:actsabilitymanagertest",
"context:context",
"featureability:featureability",
"formmanager:formmanager",
"want:want",
]
}
...
...
aafwk/aafwk_standard/formmanager/BUILD.gn
0 → 100644
浏览文件 @
2ff715d0
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
group("formmanager") {
testonly = true
if (is_standard_system) {
deps = [
"formsystemtesthost/getallformsinfo:GetAllFormsInfo",
"formsystemtestservice/formsystemtestservicea:ActsFormSystemTestServiceA",
"formsystemtestservice/formsystemtestserviceb:ActsFormSystemTestServiceB",
]
}
}
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/BUILD.gn
0 → 100644
浏览文件 @
2ff715d0
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("GetAllFormsInfo") {
hap_profile = "./entry/src/main/config.json"
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "GetAllFormsInfo"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/js/default"
}
ohos_resources("hjs_demo_resources") {
sources = [ "./entry/src/main/resources" ]
hap_profile = "./entry/src/main/config.json"
}
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/Test.json
0 → 100644
浏览文件 @
2ff715d0
{
"description"
:
"Configuration for hjunit demo Tests"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"240000"
,
"package"
:
"com.example.getallformsinfo"
,
"shell-timeout"
:
"60000"
},
"kits"
:
[
{
"test-file-name"
:
[
"GetAllFormsInfo.hap"
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"remount"
,
"mkdir /system/vendor"
]
},
{
"type"
:
"PushKit"
,
"push"
:
[
"GetAllFormsInfo.hap->/data/GetAllFormsInfo.hap"
]
},
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"chmod 644 /system/vendor/*.hap"
]
}
]
}
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/config.json
0 → 100644
浏览文件 @
2ff715d0
{
"app"
:
{
"bundleName"
:
"com.example.getallformsinfo"
,
"vendor"
:
"example"
,
"version"
:
{
"code"
:
1
,
"name"
:
"1.0"
},
"apiVersion"
:
{
"compatible"
:
5
,
"target"
:
5
,
"releaseType"
:
"Beta1"
}
},
"deviceConfig"
:
{},
"module"
:
{
"package"
:
"com.example.getallformsinfo"
,
"name"
:
".MyApplication"
,
"mainAbility"
:
"com.example.getallformsinfo.MainAbility"
,
"deviceType"
:
[
"phone"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"entry"
,
"moduleType"
:
"entry"
,
"installationFree"
:
false
},
"abilities"
:
[
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"visible"
:
true
,
"name"
:
"com.example.getallformsinfo.MainAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:entry_MainAbility"
,
"type"
:
"page"
,
"launchType"
:
"standard"
}
],
"defPermissions"
:
[
{
"name"
:
"com.permission.CAMERA"
,
"grantMode"
:
"system_grant"
,
"availableScope"
:
[
"signature"
],
"label"
:
"$string:testFormA"
,
"description"
:
"CAMERA permission in detail"
},
{
"name"
:
"ohos.permission.REQUIRE_FORM"
,
"grantMode"
:
"system_grant"
,
"label"
:
"$string:testForm"
,
"description"
:
"REQUIRE_FORM permission in detail"
}
],
"reqPermissions"
:
[
{
"name"
:
"ohos.permission.REQUIRE_FORM"
,
"reason"
:
"require form"
,
"usedScene"
:
{
"ability"
:
[
".MainAbility"
],
"when"
:
"always"
}
}
],
"js"
:
[
{
"pages"
:
[
"pages/index/index"
],
"name"
:
"default"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
true
}
}
]
}
}
\ No newline at end of file
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/app.js
0 → 100644
浏览文件 @
2ff715d0
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export
default
{
onCreate
()
{
console
.
info
(
'
AceApplication onCreate
'
);
},
onDestroy
()
{
console
.
info
(
'
AceApplication onDestroy
'
);
}
};
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/i18n/en-US.json
0 → 100644
浏览文件 @
2ff715d0
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
}
}
\ No newline at end of file
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/i18n/zh-CN.json
0 → 100644
浏览文件 @
2ff715d0
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
}
}
\ No newline at end of file
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/pages/index/index.css
0 → 100644
浏览文件 @
2ff715d0
.container
{
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.title
{
font-size
:
40px
;
color
:
#000000
;
opacity
:
0.9
;
}
@media
screen
and
(
device-type
:
tablet
)
and
(
orientation
:
landscape
)
{
.title
{
font-size
:
100px
;
}
}
@media
screen
and
(
device-type
:
wearable
)
{
.title
{
font-size
:
28px
;
color
:
#FFFFFF
;
}
}
@media
screen
and
(
device-type
:
tv
)
{
.container
{
background-image
:
url("/common/images/Wallpaper.png")
;
background-size
:
cover
;
background-repeat
:
no-repeat
;
background-position
:
center
;
}
.title
{
font-size
:
100px
;
color
:
#FFFFFF
;
}
}
@media
screen
and
(
device-type
:
phone
)
and
(
orientation
:
landscape
)
{
.title
{
font-size
:
60px
;
}
}
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/pages/index/index.hml
0 → 100644
浏览文件 @
2ff715d0
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/default/pages/index/index.js
0 → 100644
浏览文件 @
2ff715d0
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
app
from
'
@system.app
'
import
file
from
'
@system.file
'
import
router
from
'
@system.router
'
import
device
from
'
@system.device
'
import
{
Core
,
ExpectExtend
,
ReportExtend
}
from
'
deccjsunit/index
'
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
export
default
{
data
:
{
title
:
""
},
onInit
()
{
this
.
title
=
"
卡片配置信息查询
\n
有权限、是系统应用
"
;
},
onShow
()
{
console
.
info
(
'
onShow finish
'
)
const
core
=
Core
.
getInstance
()
const
expectExtend
=
new
ExpectExtend
({
'
id
'
:
'
extend
'
})
const
reportExtend
=
new
ReportExtend
(
file
)
core
.
addService
(
'
expect
'
,
expectExtend
)
core
.
addService
(
'
report
'
,
reportExtend
)
core
.
init
()
const
configService
=
core
.
getDefaultService
(
'
config
'
)
configService
.
setConfig
(
this
)
require
(
'
../../../test/List.test
'
)
core
.
execute
()
console
.
info
(
'
onShow end
'
)
},
onReady
()
{
},
}
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/test/GetAllFormsInfoJsunit.test.js
0 → 100644
浏览文件 @
2ff715d0
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
formManager
from
'
@ohos.ability.formManager
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
const
TIMEOUT
=
1000
;
describe
(
'
getAllFormsInfoTest
'
,
function
()
{
console
.
log
(
"
system application and has permissions Test
"
);
/**
* @tc.name getAllFormsInfo test
* @tc.number FMS_getFormsInfo_0300
* @tc.desc All form configuration information is queried successfully (by AsyncCallback)
*/
it
(
'
FMS_getFormsInfo_0300_callback
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
FMS_getFormsInfo_0300_callback begin
"
);
var
ret
=
formManager
.
getAllFormsInfo
(
(
result
,
data
)
=>
{
console
.
log
(
"
FMS_getFormsInfo_0300_callback async::sucess, data json:
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
FMS_getFormsInfo_0300_callback async::result, result:
"
+
result
);
expect
(
result
).
assertEqual
(
1
);
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
expect
(
typeof
(
data
[
i
].
description
)).
assertEqual
(
"
string
"
);
expect
(
data
[
i
].
description
).
assertEqual
(
"
form_description
"
);
expect
(
data
[
i
].
type
).
assertEqual
(
1
);
expect
(
data
[
i
].
jsComponentName
).
assertEqual
(
"
card
"
);
expect
(
data
[
i
].
colorMode
).
assertEqual
(
-
1
);
expect
(
data
[
i
].
isDefault
).
assertEqual
(
1
);
expect
(
data
[
i
].
updateEnabled
).
assertEqual
(
1
);
expect
(
data
[
i
].
scheduledUpdateTime
).
assertEqual
(
"
0:0
"
);
expect
(
data
[
i
].
formVisibleNotify
).
assertEqual
(
0
);
expect
(
data
[
i
].
defaultDimension
).
assertEqual
(
1
);
expect
(
data
[
i
].
supportDimensions
[
0
]).
assertEqual
(
1
);
expect
(
data
[
i
].
supportDimensions
[
1
]).
assertEqual
(
2
);
expect
(
data
[
i
].
metaData
.
customizeData
[
0
].
name
).
assertEqual
(
"
originWidgetName
"
);
expect
(
data
[
i
].
metaData
.
customizeData
[
0
].
value
).
assertEqual
(
"
myTest
"
);
}
expect
(
data
[
0
].
name
).
assertEqual
(
"
Form_Js001
"
);
expect
(
data
[
1
].
name
).
assertEqual
(
"
Form_Js002
"
);
expect
(
data
[
0
].
updateDuration
).
assertEqual
(
0
);
expect
(
data
[
1
].
updateDuration
).
assertEqual
(
1
);
console
.
log
(
"
FMS_getFormsInfo_0300_callback result end
"
);
done
();
}
);
setTimeout
(
function
()
{
console
.
info
(
'
=====================FMS_getFormsInfo_0300_callback==================end
'
);
},
TIMEOUT
)
console
.
log
(
"
FMS_getFormsInfo_0300_callback end, ret:
"
+
ret
);
})
/**
* @tc.name getAllFormsInfo test
* @tc.number FMS_getFormsInfo_0300
* @tc.desc All form configuration information is queried successfully (by Promise)
*/
it
(
'
FMS_getFormsInfo_0300_promise
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
FMS_getFormsInfo_0300_promise begin
"
);
var
promise
=
formManager
.
getAllFormsInfo
();
promise
.
then
((
data
)
=>
{
console
.
log
(
"
FMS_getFormsInfo_0300_promise async::sucess, data json:
"
+
JSON
.
stringify
(
data
));
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
expect
(
typeof
(
data
[
i
].
description
)).
assertEqual
(
"
string
"
);
expect
(
data
[
i
].
description
).
assertEqual
(
"
form_description
"
);
expect
(
data
[
i
].
type
).
assertEqual
(
1
);
expect
(
data
[
i
].
jsComponentName
).
assertEqual
(
"
card
"
);
expect
(
data
[
i
].
colorMode
).
assertEqual
(
-
1
);
expect
(
data
[
i
].
isDefault
).
assertEqual
(
1
);
expect
(
data
[
i
].
updateEnabled
).
assertEqual
(
1
);
expect
(
data
[
i
].
scheduledUpdateTime
).
assertEqual
(
"
0:0
"
);
expect
(
data
[
i
].
formVisibleNotify
).
assertEqual
(
0
);
expect
(
data
[
i
].
defaultDimension
).
assertEqual
(
1
);
expect
(
data
[
i
].
supportDimensions
[
0
]).
assertEqual
(
1
);
expect
(
data
[
i
].
supportDimensions
[
1
]).
assertEqual
(
2
);
expect
(
data
[
i
].
metaData
.
customizeData
[
0
].
name
).
assertEqual
(
"
originWidgetName
"
);
expect
(
data
[
i
].
metaData
.
customizeData
[
0
].
value
).
assertEqual
(
"
myTest
"
);
}
expect
(
data
[
0
].
name
).
assertEqual
(
"
Form_Js001
"
);
expect
(
data
[
1
].
name
).
assertEqual
(
"
Form_Js002
"
);
expect
(
data
[
0
].
updateDuration
).
assertEqual
(
0
);
expect
(
data
[
1
].
updateDuration
).
assertEqual
(
1
);
console
.
log
(
"
FMS_getFormsInfo_0300_promise result end
"
);
done
();
}
);
setTimeout
(
function
()
{
console
.
info
(
'
=====================FMS_getFormsInfo_0300_promise==================end
'
);
},
TIMEOUT
)
})
/**
* @tc.name bundleName is null test
* @tc.number FMS_getFormsInfo_0600
* @tc.desc When the bundleName is null, the form configuration information query fails
* (by AsyncCallback)
*/
it
(
'
FMS_getFormsInfo_0600_callback
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
FMS_getFormsInfo_0600_callback begin
"
);
var
ret
=
formManager
.
getFormsInfo
(
""
,
(
result
,
data
)
=>
{
console
.
log
(
"
FMS_getFormsInfo_0600_callback getFormsInfo async::sucess, data json:
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
FMS_getFormsInfo_0600_callback async::result, result:
"
+
result
);
expect
(
result
).
assertEqual
(
0
);
console
.
log
(
"
FMS_getFormsInfo_0600_callback result end
"
);
done
();
}
);
setTimeout
(
function
()
{
console
.
info
(
'
=====================FMS_getFormsInfo_0600_callback==================end
'
);
},
TIMEOUT
)
console
.
log
(
"
FMS_getFormsInfo_0600_callback end, ret:
"
+
ret
);
})
/**
* @tc.name bundleName is null test
* @tc.number FMS_getFormsInfo_0600
* @tc.desc When the bundleName is null, the form configuration information query fails (by Promise)
*/
it
(
'
FMS_getFormsInfo_0600_promise
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
FMS_getFormsInfo_0600_promise begin
"
);
var
promise
=
formManager
.
getFormsInfo
(
""
,
);
promise
.
then
((
result
)
=>
{
console
.
log
(
"
FMS_getFormsInfo_0600_promise result:
"
+
result
);
expect
(
result
).
assertEqual
(
0
);
console
.
log
(
"
FMS_getFormsInfo_0600_promise result end
"
);
done
();
}
);
setTimeout
(
function
()
{
console
.
info
(
'
=====================FMS_getFormsInfo_0600_promise==================end
'
);
},
TIMEOUT
)
})
/**
* @tc.name bundleName isn't exist test
* @tc.number FMS_getFormsInfo_0700
* @tc.desc When the bundleName isn't exist, the form configuration information query fails
* (by AsyncCallback).
*/
it
(
'
FMS_getFormsInfo_0700_callback
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
FMS_getFormsInfo_0700_callback begin
"
);
var
ret
=
formManager
.
getFormsInfo
(
"
aaaaaaa
"
,
(
result
,
data
)
=>
{
console
.
log
(
"
FMS_getFormsInfo_0700_callback getFormsInfo async::sucess, data json:
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
FMS_getFormsInfo_0700_callback async::result, result:
"
+
result
);
expect
(
result
).
assertEqual
(
0
);
console
.
log
(
"
FMS_getFormsInfo_0700_callback result end
"
);
done
();
}
);
setTimeout
(
function
()
{
console
.
info
(
'
=====================FMS_getFormsInfo_0700_callback==================end
'
);
},
TIMEOUT
)
console
.
log
(
"
FMS_getFormsInfo_0700_callback end, ret:
"
+
ret
);
})
/**
* @tc.name bundleName isn't exist test
* @tc.number FMS_getFormsInfo_0700
* @tc.desc When the bundleName isn't exist, the form configuration information query fails (by Promise)
*/
it
(
'
FMS_getFormsInfo_0700_promise
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
FMS_getFormsInfo_0700_promise begin
"
);
var
promise
=
formManager
.
getFormsInfo
(
"
aaaaaaa
"
,
);
promise
.
then
((
result
)
=>
{
console
.
log
(
"
FMS_getFormsInfo_0700_promise result:
"
+
result
);
expect
(
result
).
assertEqual
(
0
);
console
.
log
(
"
FMS_getFormsInfo_0700_promise result end
"
);
done
();
}
);
setTimeout
(
function
()
{
console
.
info
(
'
=====================FMS_getFormsInfo_0700_promise==================end
'
);
},
TIMEOUT
)
})
/**
* @tc.name getFormsInfo test
* @tc.number FMS_getFormsInfo_0800
* @tc.desc When the bundleName exist, the form configuration information is queried successfully
* (by AsyncCallback)
*/
it
(
'
FMS_getFormsInfo_0800_callback
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
FMS_getFormsInfo_0800_callback begin
"
);
var
ret
=
formManager
.
getFormsInfo
(
"
com.form.formsystemtestservicea
"
,
(
result
,
data
)
=>
{
console
.
log
(
"
FMS_getFormsInfo_0800_callback getFormsInfo async::sucess, data json:
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
FMS_getFormsInfo_0800_callback async::result, result:
"
+
result
);
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
expect
(
typeof
(
data
[
i
].
description
)).
assertEqual
(
"
string
"
);
expect
(
data
[
i
].
description
).
assertEqual
(
"
form_description
"
);
expect
(
data
[
i
].
type
).
assertEqual
(
1
);
expect
(
data
[
i
].
jsComponentName
).
assertEqual
(
"
card
"
);
expect
(
data
[
i
].
colorMode
).
assertEqual
(
-
1
);
expect
(
data
[
i
].
isDefault
).
assertEqual
(
1
);
expect
(
data
[
i
].
updateEnabled
).
assertEqual
(
1
);
expect
(
data
[
i
].
scheduledUpdateTime
).
assertEqual
(
"
0:0
"
);
expect
(
data
[
i
].
formVisibleNotify
).
assertEqual
(
0
);
expect
(
data
[
i
].
defaultDimension
).
assertEqual
(
1
);
expect
(
data
[
i
].
supportDimensions
[
0
]).
assertEqual
(
1
);
expect
(
data
[
i
].
supportDimensions
[
1
]).
assertEqual
(
2
);
expect
(
data
[
i
].
metaData
.
customizeData
[
0
].
name
).
assertEqual
(
"
originWidgetName
"
);
expect
(
data
[
i
].
metaData
.
customizeData
[
0
].
value
).
assertEqual
(
"
myTest
"
);
}
expect
(
data
[
0
].
name
).
assertEqual
(
"
Form_Js001
"
);
expect
(
data
[
1
].
name
).
assertEqual
(
"
Form_Js002
"
);
expect
(
data
[
0
].
updateDuration
).
assertEqual
(
0
);
expect
(
data
[
1
].
updateDuration
).
assertEqual
(
1
);
console
.
log
(
"
FMS_getFormsInfo_0800_callback result end
"
);
done
();
}
);
setTimeout
(
function
()
{
console
.
info
(
'
=====================FMS_getFormsInfo_0800_callback==================end
'
);
},
TIMEOUT
)
console
.
log
(
"
FMS_getFormsInfo_0800_callback end, ret:
"
+
ret
);
})
/**
* @tc.name getFormsInfo test
* @tc.number FMS_getFormsInfo_0800
* @tc.desc When the bundleName exist, the form configuration information is queried successfully
* (by Promise)
*/
it
(
'
FMS_getFormsInfo_0800_promise
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
FMS_getFormsInfo_0800_promise begin
"
);
var
promise
=
formManager
.
getFormsInfo
(
"
com.form.formsystemtestservicea
"
,
);
promise
.
then
((
data
)
=>
{
console
.
log
(
"
FMS_getFormsInfo_0300_promise async::sucess, data json:
"
+
JSON
.
stringify
(
data
));
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
expect
(
typeof
(
data
[
i
].
description
)).
assertEqual
(
"
string
"
);
expect
(
data
[
i
].
description
).
assertEqual
(
"
form_description
"
);
expect
(
data
[
i
].
type
).
assertEqual
(
1
);
expect
(
data
[
i
].
jsComponentName
).
assertEqual
(
"
card
"
);
expect
(
data
[
i
].
colorMode
).
assertEqual
(
-
1
);
expect
(
data
[
i
].
isDefault
).
assertEqual
(
1
);
expect
(
data
[
i
].
updateEnabled
).
assertEqual
(
1
);
expect
(
data
[
i
].
scheduledUpdateTime
).
assertEqual
(
"
0:0
"
);
expect
(
data
[
i
].
formVisibleNotify
).
assertEqual
(
0
);
expect
(
data
[
i
].
defaultDimension
).
assertEqual
(
1
);
expect
(
data
[
i
].
supportDimensions
[
0
]).
assertEqual
(
1
);
expect
(
data
[
i
].
supportDimensions
[
1
]).
assertEqual
(
2
);
expect
(
data
[
i
].
metaData
.
customizeData
[
0
].
name
).
assertEqual
(
"
originWidgetName
"
);
expect
(
data
[
i
].
metaData
.
customizeData
[
0
].
value
).
assertEqual
(
"
myTest
"
);
}
expect
(
data
[
0
].
name
).
assertEqual
(
"
Form_Js001
"
);
expect
(
data
[
1
].
name
).
assertEqual
(
"
Form_Js002
"
);
expect
(
data
[
0
].
updateDuration
).
assertEqual
(
0
);
expect
(
data
[
1
].
updateDuration
).
assertEqual
(
1
);
console
.
log
(
"
FMS_getFormsInfo_0800_promise result end
"
);
done
();
}
);
setTimeout
(
function
()
{
console
.
info
(
'
=====================FMS_getFormsInfo_0800_promise==================end
'
);
},
TIMEOUT
)
})
/**
* @tc.name getFormsInfo test
* @tc.number FMS_getFormsInfo_1100
* @tc.desc When the bundleName is null, moduleName is exist,the form configuration information
* query fails (by AsyncCallback).
*/
it
(
'
FMS_getFormsInfo_1100_callback
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
FMS_getFormsInfo_1100_callback begin
"
);
var
ret
=
formManager
.
getFormsInfo
(
""
,
"
formmodule001
"
,
(
result
,
data
)
=>
{
console
.
log
(
"
FMS_getFormsInfo_1100_callback getFormsInfo async::sucess, data json:
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
FMS_getFormsInfo_1100_callback async::result, result:
"
+
result
);
expect
(
result
).
assertEqual
(
0
);
console
.
log
(
"
FMS_getFormsInfo_1100_callback result end
"
);
done
();
}
);
setTimeout
(
function
()
{
console
.
info
(
'
=====================FMS_getFormsInfo_1100_callback==================end
'
);
},
TIMEOUT
)
console
.
log
(
"
FMS_getFormsInfo_1100_callback end, ret:
"
+
ret
);
})
/**
* @tc.name getFormsInfo test
* @tc.number FMS_getFormsInfo_1100
* @tc.desc When the bundleName is null, moduleName is exist,the form configuration information
* query fails (by Promise)
*/
it
(
'
FMS_getFormsInfo_1100_promise
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
FMS_getFormsInfo_1100_promise begin
"
);
var
promise
=
formManager
.
getFormsInfo
(
""
,
"
formmodule001
"
,
);
promise
.
then
((
result
)
=>
{
console
.
log
(
"
FMS_getFormsInfo_1100_promise result:
"
+
result
);
expect
(
result
).
assertEqual
(
0
);
console
.
log
(
"
FMS_getFormsInfo_1100_promise result end
"
);
done
();
}
);
setTimeout
(
function
()
{
console
.
info
(
'
=====================FMS_getFormsInfo_1100_promise==================end
'
);
},
TIMEOUT
)
})
/**
* @tc.name getFormsInfo test
* @tc.number FMS_getFormsInfo_1200
* @tc.desc When the bundleName isn't exist, moduleName is exist, the form configuration information
* query fails (by AsyncCallback)
*/
it
(
'
FMS_getFormsInfo_1200_callback
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
FMS_getFormsInfo_1200_callback begin
"
);
var
ret
=
formManager
.
getFormsInfo
(
"
aaaaaa
"
,
"
formmodule001
"
,
(
result
,
data
)
=>
{
console
.
log
(
"
FMS_getFormsInfo_1200_callback getFormsInfo async::sucess, data json:
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
FMS_getFormsInfo_1200_callback async::result, result:
"
+
result
);
expect
(
result
).
assertEqual
(
0
);
console
.
log
(
"
FMS_getFormsInfo_1200_callback result end
"
);
done
();
}
);
setTimeout
(
function
()
{
console
.
info
(
'
=====================FMS_getFormsInfo_1200_callback==================end
'
);
},
TIMEOUT
)
console
.
log
(
"
FMS_getFormsInfo_1200_callback end, ret:
"
+
ret
);
})
/**
* @tc.name getFormsInfo test
* @tc.number FMS_getFormsInfo_1200
* @tc.desc When the bundleName isn't exist, moduleName is exist, the form configuration
* information query fails (by Promise)
*/
it
(
'
FMS_getFormsInfo_1200_promise
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
FMS_getFormsInfo_1200_promise begin
"
);
var
promise
=
formManager
.
getFormsInfo
(
"
aaaaaaa
"
,
"
formmodule001
"
,
);
promise
.
then
((
result
)
=>
{
console
.
log
(
"
FMS_getFormsInfo_1200_promise result:
"
+
result
);
expect
(
result
).
assertEqual
(
0
);
console
.
log
(
"
FMS_getFormsInfo_1200_promise result end
"
);
done
();
}
);
setTimeout
(
function
()
{
console
.
info
(
'
=====================FMS_getFormsInfo_1200_promise==================end
'
);
},
TIMEOUT
)
})
/**
* @tc.name getFormsInfo test
* @tc.number FMS_getFormsInfo_1300
* @tc.desc When the bundleName is exist, moduleName is null, the form configuration information
* query fails (by AsyncCallback)
*/
it
(
'
FMS_getFormsInfo_1300_callback
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
FMS_getFormsInfo_1300_callback begin
"
);
var
ret
=
formManager
.
getFormsInfo
(
"
com.form.formsystemtestservicea
"
,
""
,
(
result
,
data
)
=>
{
console
.
log
(
"
FMS_getFormsInfo_1300_callback getFormsInfo async::sucess, data json:
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
FMS_getFormsInfo_1300_callback async::result, result:
"
+
result
);
expect
(
result
).
assertEqual
(
0
);
console
.
log
(
"
FMS_getFormsInfo_1300_callback result end
"
);
done
();
}
);
setTimeout
(
function
()
{
console
.
info
(
'
=====================FMS_getFormsInfo_1300_callback==================end
'
);
},
TIMEOUT
)
console
.
log
(
"
FMS_getFormsInfo_1300_callback end, ret:
"
+
ret
);
})
/**
* @tc.name getFormsInfo test
* @tc.number FMS_getFormsInfo_1300
* @tc.desc When the bundleName is exist, moduleName is null, the form configuration information
* query fails (by Promise)
*/
it
(
'
FMS_getFormsInfo_1300_promise
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
FMS_getFormsInfo_1300_promise begin
"
);
var
promise
=
formManager
.
getFormsInfo
(
"
com.form.formsystemtestservicea
"
,
""
,
);
promise
.
then
((
result
)
=>
{
console
.
log
(
"
FMS_getFormsInfo_1300_promise result:
"
+
result
);
expect
(
result
).
assertEqual
(
0
);
console
.
log
(
"
FMS_getFormsInfo_1300_promise result end
"
);
done
();
}
);
setTimeout
(
function
()
{
console
.
info
(
'
=====================FMS_getFormsInfo_1300_promise==================end
'
);
},
TIMEOUT
)
})
/**
* @tc.name getFormsInfo test
* @tc.number FMS_getFormsInfo_1400
* @tc.desc When the bundleName is exist, moduleName is null, the form configuration information
* query fails (by AsyncCallback)
*/
it
(
'
FMS_getFormsInfo_1400_callback
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
FMS_getFormsInfo_1400_callback begin
"
);
var
ret
=
formManager
.
getFormsInfo
(
"
com.form.formsystemtestservicea
"
,
"
aaaaa
"
,
(
result
,
data
)
=>
{
console
.
log
(
"
FMS_getFormsInfo_1400_callback getFormsInfo async::sucess, data json:
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
FMS_getFormsInfo_1400_callback async::result, result:
"
+
result
);
expect
(
result
).
assertEqual
(
0
);
console
.
log
(
"
FMS_getFormsInfo_1400_callback result end
"
);
done
();
}
);
setTimeout
(
function
()
{
console
.
info
(
'
=====================FMS_getFormsInfo_1400_callback==================end
'
);
},
TIMEOUT
)
console
.
log
(
"
FMS_getFormsInfo_1400_callback end, ret:
"
+
ret
);
})
/**
* @tc.name getFormsInfo test
* @tc.number FMS_getFormsInfo_1400
* @tc.desc When the bundleName is exist, moduleName is null, the form configuration information
* query fails (by Promise)
*/
it
(
'
FMS_getFormsInfo_1400_promise
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
FMS_getFormsInfo_1400_promise begin
"
);
var
promise
=
formManager
.
getFormsInfo
(
"
com.form.formsystemtestservicea
"
,
"
aaaaa
"
,
);
promise
.
then
((
result
)
=>
{
console
.
log
(
"
FMS_getFormsInfo_1400_promise result:
"
+
result
);
expect
(
result
).
assertEqual
(
0
);
console
.
log
(
"
FMS_getFormsInfo_1400_promise result end
"
);
done
();
}
);
setTimeout
(
function
()
{
console
.
info
(
'
=====================FMS_getFormsInfo_1400_promise==================end
'
);
},
TIMEOUT
)
})
/**
* @tc.name getFormsInfo test
* @tc.number FMS_getFormsInfo_1500
* @tc.desc When the bundleName and moduleName is exist, the form configuration information is
* queried successfully (by AsyncCallback).
*/
it
(
'
FMS_getFormsInfo_1500_callback
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
FMS_getFormsInfo_1500_callback begin
"
);
var
ret
=
formManager
.
getFormsInfo
(
"
com.form.formsystemtestservicea
"
,
"
formmodule001
"
,
(
result
,
data
)
=>
{
console
.
log
(
"
FMS_getFormsInfo_1500_callback getFormsInfo async::sucess, data json:
"
+
JSON
.
stringify
(
data
));
console
.
log
(
"
FMS_getFormsInfo_1500_callback async::result, result:
"
+
result
);
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
expect
(
typeof
(
data
[
i
].
description
)).
assertEqual
(
"
string
"
);
expect
(
data
[
i
].
description
).
assertEqual
(
"
form_description
"
);
expect
(
data
[
i
].
type
).
assertEqual
(
1
);
expect
(
data
[
i
].
jsComponentName
).
assertEqual
(
"
card
"
);
expect
(
data
[
i
].
colorMode
).
assertEqual
(
-
1
);
expect
(
data
[
i
].
isDefault
).
assertEqual
(
1
);
expect
(
data
[
i
].
updateEnabled
).
assertEqual
(
1
);
expect
(
data
[
i
].
scheduledUpdateTime
).
assertEqual
(
"
0:0
"
);
expect
(
data
[
i
].
formVisibleNotify
).
assertEqual
(
0
);
expect
(
data
[
i
].
defaultDimension
).
assertEqual
(
1
);
expect
(
data
[
i
].
supportDimensions
[
0
]).
assertEqual
(
1
);
expect
(
data
[
i
].
supportDimensions
[
1
]).
assertEqual
(
2
);
expect
(
data
[
i
].
metaData
.
customizeData
[
0
].
name
).
assertEqual
(
"
originWidgetName
"
);
expect
(
data
[
i
].
metaData
.
customizeData
[
0
].
value
).
assertEqual
(
"
myTest
"
);
}
expect
(
data
[
0
].
name
).
assertEqual
(
"
Form_Js001
"
);
expect
(
data
[
1
].
name
).
assertEqual
(
"
Form_Js002
"
);
expect
(
data
[
0
].
updateDuration
).
assertEqual
(
0
);
expect
(
data
[
1
].
updateDuration
).
assertEqual
(
1
);
console
.
log
(
"
FMS_getFormsInfo_1500_callback result end
"
);
done
();
}
);
setTimeout
(
function
()
{
console
.
info
(
'
=====================FMS_getFormsInfo_1500_callback==================end
'
);
},
TIMEOUT
)
console
.
log
(
"
FMS_getFormsInfo_1500_callback end, ret:
"
+
ret
);
})
/**
* @tc.name getFormsInfo test
* @tc.number FMS_getFormsInfo_1500
* @tc.desc When the bundleName and moduleName is exist, the form configuration information is
* queried successfully (by Promise)
*/
it
(
'
FMS_getFormsInfo_1500_promise
'
,
0
,
async
function
(
done
)
{
console
.
log
(
"
FMS_getFormsInfo_1500_promise begin
"
);
var
promise
=
formManager
.
getFormsInfo
(
"
com.form.formsystemtestservicea
"
,
"
formmodule001
"
,
);
promise
.
then
((
data
)
=>
{
console
.
log
(
"
FMS_getFormsInfo_1500_promise async::sucess, data json:
"
+
JSON
.
stringify
(
data
));
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
expect
(
typeof
(
data
[
i
].
description
)).
assertEqual
(
"
string
"
);
expect
(
data
[
i
].
description
).
assertEqual
(
"
form_description
"
);
expect
(
data
[
i
].
type
).
assertEqual
(
1
);
expect
(
data
[
i
].
jsComponentName
).
assertEqual
(
"
card
"
);
expect
(
data
[
i
].
colorMode
).
assertEqual
(
-
1
);
expect
(
data
[
i
].
isDefault
).
assertEqual
(
1
);
expect
(
data
[
i
].
updateEnabled
).
assertEqual
(
1
);
expect
(
data
[
i
].
scheduledUpdateTime
).
assertEqual
(
"
0:0
"
);
expect
(
data
[
i
].
formVisibleNotify
).
assertEqual
(
0
);
expect
(
data
[
i
].
defaultDimension
).
assertEqual
(
1
);
expect
(
data
[
i
].
supportDimensions
[
0
]).
assertEqual
(
1
);
expect
(
data
[
i
].
supportDimensions
[
1
]).
assertEqual
(
2
);
expect
(
data
[
i
].
metaData
.
customizeData
[
0
].
name
).
assertEqual
(
"
originWidgetName
"
);
expect
(
data
[
i
].
metaData
.
customizeData
[
0
].
value
).
assertEqual
(
"
myTest
"
);
}
expect
(
data
[
0
].
name
).
assertEqual
(
"
Form_Js001
"
);
expect
(
data
[
1
].
name
).
assertEqual
(
"
Form_Js002
"
);
expect
(
data
[
0
].
updateDuration
).
assertEqual
(
0
);
expect
(
data
[
1
].
updateDuration
).
assertEqual
(
1
);
console
.
log
(
"
FMS_getFormsInfo_1500_promise result end
"
);
done
();
});
setTimeout
(
function
()
{
console
.
info
(
'
=====================FMS_getFormsInfo_1500_promise==================end
'
);
},
TIMEOUT
)
})
})
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/js/test/List.test.js
0 → 100644
浏览文件 @
2ff715d0
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
require
(
'
./GetAllFormsInfoJsunit.test.js
'
)
\ No newline at end of file
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/resources/base/element/string.json
0 → 100644
浏览文件 @
2ff715d0
{
"string"
:
[
{
"name"
:
"entry_MainAbility"
,
"value"
:
"GetAllFormsInfo"
},
{
"name"
:
"mainability_description"
,
"value"
:
"JS_Empty Ability"
}
]
}
\ No newline at end of file
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/entry/src/main/resources/base/media/icon.png
0 → 100644
浏览文件 @
2ff715d0
6.6 KB
aafwk/aafwk_standard/formmanager/formsystemtesthost/getallformsinfo/signature/openharmony_sx.p7b
0 → 100644
浏览文件 @
2ff715d0
文件已添加
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/BUILD.gn
0 → 100644
浏览文件 @
2ff715d0
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsFormSystemTestServiceA") {
hap_profile = "./formmodule001/src/main/config.json"
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsFormSystemTestServiceA"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./formmodule001/src/main/js/default"
}
ohos_resources("hjs_demo_resources") {
sources = [ "./formmodule001/src/main/resources" ]
hap_profile = "./formmodule001/src/main/config.json"
}
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/Test.json
0 → 100644
浏览文件 @
2ff715d0
{
"description"
:
"Configuration for hjunit demo Tests"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"60000"
,
"package"
:
"com.form.formsystemtestservicea"
,
"shell-timeout"
:
"60000"
},
"kits"
:
[
{
"test-file-name"
:
[
"ActsFormSystemTestserviceA.hap"
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
},
{
"type"
:
"PushKit"
,
"push"
:
[
"formsystemtestservicea001.hap->/data/formsystemtestservicea001.hap"
]
}
]
}
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/config.json
0 → 100644
浏览文件 @
2ff715d0
{
"app"
:
{
"bundleName"
:
"com.form.formsystemtestservicea"
,
"vendor"
:
"ohos"
,
"version"
:
{
"code"
:
1
,
"name"
:
"1.0"
},
"apiVersion"
:
{
"compatible"
:
5
,
"target"
:
5
,
"releaseType"
:
"Beta1"
}
},
"deviceConfig"
:
{},
"module"
:
{
"package"
:
"com.form.formsystemtestservicea"
,
"name"
:
".MyApplication"
,
"deviceType"
:
[
"phone"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"formmodule001"
,
"moduleType"
:
"entry"
},
"abilities"
:
[
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"visible"
:
true
,
"name"
:
"FormStServiceAbilityA"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:entry_MainAbility"
,
"type"
:
"service"
,
"launchType"
:
"standard"
,
"formsEnabled"
:
true
,
"srcLanguage"
:
"c++"
,
"forms"
:
[
{
"name"
:
"Form_Js001"
,
"description"
:
"form_description"
,
"isDefault"
:
true
,
"type"
:
"JS"
,
"colorMode"
:
"auto"
,
"supportDimensions"
:[
"1*2"
,
"2*2"
],
"defaultDimension"
:
"1*2"
,
"updateEnabled"
:
true
,
"scheduledUpdateTime"
:
"10:30"
,
"jsComponentName"
:
"card"
,
"formVisibleNotify"
:
true
,
"metaData"
:
{
"customizeData"
:
[
{
"name"
:
"originWidgetName"
,
"value"
:
"myTest"
}
]
}
},
{
"name"
:
"Form_Js002"
,
"description"
:
"form_description"
,
"isDefault"
:
true
,
"type"
:
"JS"
,
"colorMode"
:
"auto"
,
"supportDimensions"
:[
"1*2"
,
"2*2"
],
"defaultDimension"
:
"1*2"
,
"updateEnabled"
:
true
,
"updateDuration"
:
1
,
"jsComponentName"
:
"card"
,
"formVisibleNotify"
:
true
,
"metaData"
:
{
"customizeData"
:
[
{
"name"
:
"originWidgetName"
,
"value"
:
"myTest"
}
]
}
}
]
}
],
"js"
:
[
{
"pages"
:
[
"pages/index/index"
],
"name"
:
"default"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
true
}
}
]
}
}
\ No newline at end of file
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/app.js
0 → 100644
浏览文件 @
2ff715d0
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
Subscriber
from
'
@ohos.commonevent
'
export
default
{
constructor
(
obj
)
{
console
.
log
(
'
formSystemTestServiceA: constructor ok, time stamp:
'
+
Date
.
parse
(
new
Date
()));
Subscriber
.
publish
(
"
fms_serviceA_constructor
"
,
(
err
,
data
)
=>
{
console
.
log
(
"
formSystemTestServiceA: constructor publish callback return!
"
)
}
);
},
updateData
(
obj
)
{
console
.
log
(
'
formSystemTestServiceA: updateData ok, time stamp:
'
+
Date
.
parse
(
new
Date
()));
Subscriber
.
publish
(
"
fms_serviceA_updateData
"
,
(
err
,
data
)
=>
{
console
.
log
(
"
formSystemTestServiceA: updateData publish callback return!
"
)
}
);
},
getDataString
()
{
console
.
log
(
'
formSystemTestServiceA: getDataString ok, time stamp:
'
+
Date
.
parse
(
new
Date
()));
Subscriber
.
publish
(
"
fms_serviceA_getDataString
"
,
(
err
,
data
)
=>
{
console
.
log
(
"
formSystemTestServiceA: getDataString publish callback return!
"
)
}
);
return
"
dataString
"
;
},
addImageData
(
name
,
data
){
console
.
log
(
'
formSystemTestServiceA: addImageData ok, time stamp:
'
+
Date
.
parse
(
new
Date
()));
Subscriber
.
publish
(
"
fms_serviceA_addImageData
"
,
(
err
,
data
)
=>
{
console
.
log
(
"
formSystemTestServiceA: addImageData publish callback return!
"
)
}
);
},
removeImageData
(
name
){
console
.
log
(
'
formSystemTestServiceA: removeImageData ok, time stamp:
'
+
Date
.
parse
(
new
Date
()));
Subscriber
.
publish
(
"
fms_serviceA_removeImageData
"
,
(
err
,
data
)
=>
{
console
.
log
(
"
formSystemTestServiceA: removeImageData publish callback return!
"
)
}
);
},
onCreate
(
para
)
{
console
.
log
(
'
formSystemTestServiceA: onCreate ok, para:
'
+
para
+
'
, time stamp:
'
+
Date
.
parse
(
new
Date
()));
Subscriber
.
publish
(
"
fms_serviceA_onCreate
"
,
(
err
,
data
)
=>
{
console
.
log
(
"
formSystemTestServiceA: onCreate publish callback return!
"
)
}
);
return
{
"
city
"
:
"
beijingA
"
};
},
onDestroy
(
para
)
{
console
.
log
(
'
formSystemTestServiceA: onDestroy para:
'
+
para
+
'
, time stamp:
'
+
Date
.
parse
(
new
Date
()));
Subscriber
.
publish
(
"
fms_serviceA_onDestroy
"
,
(
err
,
data
)
=>
{
console
.
log
(
"
formSystemTestServiceA: onDestroy publish callback return!
"
)
}
);
},
onDelete
(
formId
)
{
console
.
log
(
'
formSystemTestServiceA: onDelete ok, formId:
'
+
formId
+
'
, time stamp:
'
+
Date
.
parse
(
new
Date
()));
Subscriber
.
publish
(
"
fms_serviceA_onDelete
"
,
(
err
,
data
)
=>
{
console
.
log
(
"
formSystemTestServiceA: onDelete publish callback return!
"
)
}
);
},
onTriggerEvent
(
formId
,
message
)
{
console
.
log
(
'
formSystemTestServiceA: onTriggerEvent ok, formId:
'
+
formId
+
'
, message:
'
+
message
+
'
, time stamp:
'
+
Date
.
parse
(
new
Date
()));
Subscriber
.
publish
(
"
fms_serviceA_onTriggerEvent
"
,
(
err
,
data
)
=>
{
console
.
log
(
"
formSystemTestServiceA: onTriggerEvent publish callback return!
"
)
}
);
},
onUpdate
(
formId
)
{
console
.
log
(
'
formSystemTestServiceA: onUpdate ok, formId:
'
+
formId
+
'
, time stamp:
'
+
Date
.
parse
(
new
Date
()));
Subscriber
.
publish
(
"
fms_serviceA_onUpdate
"
,
(
err
,
data
)
=>
{
console
.
log
(
"
formSystemTestServiceA: onUpdate publish callback return!
"
)
}
);
},
onCastTemp
(
formId
)
{
console
.
log
(
'
formSystemTestServiceA: onCastTemp ok, formId:
'
+
formId
+
'
, time stamp:
'
+
Date
.
parse
(
new
Date
()));
Subscriber
.
publish
(
"
fms_serviceA_onCastTemp
"
,
(
err
,
data
)
=>
{
console
.
log
(
"
formSystemTestServiceA: onCastTemp publish callback return!
"
)
}
);
},
onVisibilityChanged
(
formEventsMap
)
{
console
.
log
(
'
formSystemTestServiceA: OnVisibilityChanged ok, map:
'
+
formEventsMap
+
'
, time stamp:
'
+
Date
.
parse
(
new
Date
()));
Subscriber
.
publish
(
"
fms_serviceA_onVisibilityChanged
"
,
(
err
,
data
)
=>
{
console
.
log
(
"
formSystemTestServiceA: onVisibilityChanged publish callback return!
"
)
}
);
},
onAcquireState
(
want
)
{
console
.
log
(
'
formSystemTestServiceA: OnAcquireState ok,
'
+
'
want.abilityName:
'
+
want
.
abilityName
+
'
, want.bundleName:
'
+
want
.
bundleName
+
'
, time stamp:
'
+
Date
.
parse
(
new
Date
()));
Subscriber
.
publish
(
"
fms_serviceA_onAcquireState
"
,
(
err
,
data
)
=>
{
console
.
log
(
"
formSystemTestServiceA: onAcquireState publish callback return!
"
)
}
);
}
};
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/i18n/en-US.json
0 → 100644
浏览文件 @
2ff715d0
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
}
}
\ No newline at end of file
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/i18n/zh-CN.json
0 → 100644
浏览文件 @
2ff715d0
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
}
}
\ No newline at end of file
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/pages/index/index.css
0 → 100644
浏览文件 @
2ff715d0
.container
{
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.title
{
font-size
:
40px
;
color
:
#000000
;
opacity
:
0.9
;
}
@media
screen
and
(
device-type
:
tablet
)
and
(
orientation
:
landscape
)
{
.title
{
font-size
:
100px
;
}
}
@media
screen
and
(
device-type
:
wearable
)
{
.title
{
font-size
:
28px
;
color
:
#FFFFFF
;
}
}
@media
screen
and
(
device-type
:
tv
)
{
.container
{
background-image
:
url("../../common/images/Wallpaper.png")
;
background-size
:
cover
;
background-repeat
:
no-repeat
;
background-position
:
center
;
}
.title
{
font-size
:
100px
;
color
:
#FFFFFF
;
}
}
@media
screen
and
(
device-type
:
phone
)
and
(
orientation
:
landscape
)
{
.title
{
font-size
:
60px
;
}
}
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/pages/index/index.hml
0 → 100644
浏览文件 @
2ff715d0
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/js/default/pages/index/index.js
0 → 100644
浏览文件 @
2ff715d0
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export
default
{
data
:
{
title
:
""
},
onInit
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
}
}
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/resources/base/element/string.json
0 → 100644
浏览文件 @
2ff715d0
{
"string"
:
[
{
"name"
:
"entry_MainAbility"
,
"value"
:
"A_fms"
},
{
"name"
:
"mainability_description"
,
"value"
:
"JS_Empty Ability"
}
]
}
\ No newline at end of file
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/formmodule001/src/main/resources/base/media/icon.png
0 → 100644
浏览文件 @
2ff715d0
6.6 KB
aafwk/aafwk_standard/formmanager/formsystemtestservice/formsystemtestservicea/signature/openharmony_sx.p7b
0 → 100644
浏览文件 @
2ff715d0
文件已添加
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录