Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
c5051da0
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
12 个月 前同步成功
通知
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c5051da0
编写于
9月 29, 2021
作者:
O
openharmony_ci
提交者:
Gitee
9月 29, 2021
浏览文件
操作
浏览文件
下载
差异文件
!835 update test code
Merge pull request !835 from blackleon/master_0930
上级
53313669
d45d4dee
变更
71
隐藏空白更改
内联
并排
Showing
71 changed file
with
1274 addition
and
56 deletion
+1274
-56
notification/ans_standard/publish_test/BUILD.gn
notification/ans_standard/publish_test/BUILD.gn
+5
-1
notification/ans_standard/publish_test/activeButton/.gitignore
...ication/ans_standard/publish_test/activeButton/.gitignore
+15
-0
notification/ans_standard/publish_test/activeButton/.idea/.gitignore
...n/ans_standard/publish_test/activeButton/.idea/.gitignore
+3
-0
notification/ans_standard/publish_test/activeButton/.idea/compiler.xml
...ans_standard/publish_test/activeButton/.idea/compiler.xml
+6
-0
notification/ans_standard/publish_test/activeButton/.idea/gradle.xml
...n/ans_standard/publish_test/activeButton/.idea/gradle.xml
+22
-0
notification/ans_standard/publish_test/activeButton/.idea/jarRepositories.xml
...ndard/publish_test/activeButton/.idea/jarRepositories.xml
+30
-0
notification/ans_standard/publish_test/activeButton/.idea/misc.xml
...ion/ans_standard/publish_test/activeButton/.idea/misc.xml
+4
-0
notification/ans_standard/publish_test/activeButton/BUILD.gn
notification/ans_standard/publish_test/activeButton/BUILD.gn
+30
-0
notification/ans_standard/publish_test/activeButton/Test.json
...fication/ans_standard/publish_test/activeButton/Test.json
+18
-0
notification/ans_standard/publish_test/activeButton/entry/.gitignore
...n/ans_standard/publish_test/activeButton/entry/.gitignore
+1
-0
notification/ans_standard/publish_test/activeButton/entry/src/main/config.json
...dard/publish_test/activeButton/entry/src/main/config.json
+62
-0
notification/ans_standard/publish_test/activeButton/entry/src/main/js/default/app.js
...ublish_test/activeButton/entry/src/main/js/default/app.js
+22
-0
notification/ans_standard/publish_test/activeButton/entry/src/main/js/default/i18n/en-US.json
...st/activeButton/entry/src/main/js/default/i18n/en-US.json
+6
-0
notification/ans_standard/publish_test/activeButton/entry/src/main/js/default/i18n/zh-CN.json
...st/activeButton/entry/src/main/js/default/i18n/zh-CN.json
+6
-0
notification/ans_standard/publish_test/activeButton/entry/src/main/js/default/pages/index/index.css
...iveButton/entry/src/main/js/default/pages/index/index.css
+9
-0
notification/ans_standard/publish_test/activeButton/entry/src/main/js/default/pages/index/index.hml
...iveButton/entry/src/main/js/default/pages/index/index.hml
+5
-0
notification/ans_standard/publish_test/activeButton/entry/src/main/js/default/pages/index/index.js
...tiveButton/entry/src/main/js/default/pages/index/index.js
+47
-0
notification/ans_standard/publish_test/activeButton/entry/src/main/js/resources/base/element/string.json
...tton/entry/src/main/js/resources/base/element/string.json
+12
-0
notification/ans_standard/publish_test/activeButton/entry/src/main/js/resources/base/media/icon.png
...iveButton/entry/src/main/js/resources/base/media/icon.png
+0
-0
notification/ans_standard/publish_test/activeButton/entry/src/main/js/test/ActiveButton.js
..._test/activeButton/entry/src/main/js/test/ActiveButton.js
+146
-0
notification/ans_standard/publish_test/activeButton/entry/src/main/js/test/List.test.js
...ish_test/activeButton/entry/src/main/js/test/List.test.js
+15
-0
notification/ans_standard/publish_test/activeButton/signature/openharmony_sx.p7b
...rd/publish_test/activeButton/signature/openharmony_sx.p7b
+0
-0
notification/ans_standard/publish_test/badgedisplayed/localcandisplay/BUILD.gn
...dard/publish_test/badgedisplayed/localcandisplay/BUILD.gn
+3
-6
notification/ans_standard/publish_test/enablenotification/enablenotificationfive/entry/src/main/js/default/pages/index/index.hml
...ationfive/entry/src/main/js/default/pages/index/index.hml
+1
-1
notification/ans_standard/publish_test/enablenotification/enablenotificationfive/entry/src/main/js/test/BadgeDisplay.js
...lenotificationfive/entry/src/main/js/test/BadgeDisplay.js
+3
-2
notification/ans_standard/publish_test/enablenotification/enablenotificationfour/entry/src/main/js/test/BadgeDisplay.js
...lenotificationfour/entry/src/main/js/test/BadgeDisplay.js
+3
-2
notification/ans_standard/publish_test/enablenotificationset/enablenotificationfive/entry/src/main/js/test/BadgeDisplay.js
...lenotificationfive/entry/src/main/js/test/BadgeDisplay.js
+3
-2
notification/ans_standard/publish_test/enablenotificationset/enablenotificationfour/entry/src/main/js/test/BadgeDisplay.js
...lenotificationfour/entry/src/main/js/test/BadgeDisplay.js
+3
-2
notification/ans_standard/publish_test/getactive/getactivenormal/sub/Test.json
...dard/publish_test/getactive/getactivenormal/sub/Test.json
+2
-2
notification/ans_standard/publish_test/getactive/getcancelactivenum/Test.json
...ndard/publish_test/getactive/getcancelactivenum/Test.json
+2
-2
notification/ans_standard/publish_test/getwantagentinfo/getwantagentinfoonepro/entry/src/main/js/test/WantAgent.test.js
...tagentinfoonepro/entry/src/main/js/test/WantAgent.test.js
+4
-4
notification/ans_standard/publish_test/getwantagentinfo/getwantagentinfotwopro/entry/src/main/js/test/WantAgent.test.js
...tagentinfotwopro/entry/src/main/js/test/WantAgent.test.js
+7
-6
notification/ans_standard/publish_test/publishicontest/BUILD.gn
...cation/ans_standard/publish_test/publishicontest/BUILD.gn
+31
-0
notification/ans_standard/publish_test/publishicontest/Test.json
...ation/ans_standard/publish_test/publishicontest/Test.json
+19
-0
notification/ans_standard/publish_test/publishicontest/entry/src/main/config.json
...d/publish_test/publishicontest/entry/src/main/config.json
+61
-0
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/default/app.js
...ish_test/publishicontest/entry/src/main/js/default/app.js
+22
-0
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/default/i18n/en-US.json
...publishicontest/entry/src/main/js/default/i18n/en-US.json
+6
-0
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/default/i18n/zh-CN.json
...publishicontest/entry/src/main/js/default/i18n/zh-CN.json
+6
-0
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/default/pages/index/index.css
...hicontest/entry/src/main/js/default/pages/index/index.css
+9
-0
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/default/pages/index/index.hml
...hicontest/entry/src/main/js/default/pages/index/index.hml
+5
-0
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/default/pages/index/index.js
...shicontest/entry/src/main/js/default/pages/index/index.js
+47
-0
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/resources/base/element/string.json
...test/entry/src/main/js/resources/base/element/string.json
+12
-0
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/resources/base/media/icon.png
...hicontest/entry/src/main/js/resources/base/media/icon.png
+0
-0
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/test/Icon.js
...blish_test/publishicontest/entry/src/main/js/test/Icon.js
+99
-0
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/test/List.test.js
..._test/publishicontest/entry/src/main/js/test/List.test.js
+15
-0
notification/ans_standard/publish_test/publishicontest/signature/openharmony_sx.p7b
...publish_test/publishicontest/signature/openharmony_sx.p7b
+0
-0
notification/ans_standard/publish_test/publishimage/.gitignore
...ication/ans_standard/publish_test/publishimage/.gitignore
+15
-0
notification/ans_standard/publish_test/publishimage/.idea/.gitignore
...n/ans_standard/publish_test/publishimage/.idea/.gitignore
+3
-0
notification/ans_standard/publish_test/publishimage/.idea/compiler.xml
...ans_standard/publish_test/publishimage/.idea/compiler.xml
+6
-0
notification/ans_standard/publish_test/publishimage/.idea/gradle.xml
...n/ans_standard/publish_test/publishimage/.idea/gradle.xml
+22
-0
notification/ans_standard/publish_test/publishimage/.idea/jarRepositories.xml
...ndard/publish_test/publishimage/.idea/jarRepositories.xml
+30
-0
notification/ans_standard/publish_test/publishimage/.idea/misc.xml
...ion/ans_standard/publish_test/publishimage/.idea/misc.xml
+4
-0
notification/ans_standard/publish_test/publishimage/BUILD.gn
notification/ans_standard/publish_test/publishimage/BUILD.gn
+30
-0
notification/ans_standard/publish_test/publishimage/Test.json
...fication/ans_standard/publish_test/publishimage/Test.json
+18
-0
notification/ans_standard/publish_test/publishimage/entry/.gitignore
...n/ans_standard/publish_test/publishimage/entry/.gitignore
+1
-0
notification/ans_standard/publish_test/publishimage/entry/src/main/config.json
...dard/publish_test/publishimage/entry/src/main/config.json
+62
-0
notification/ans_standard/publish_test/publishimage/entry/src/main/js/default/app.js
...ublish_test/publishimage/entry/src/main/js/default/app.js
+22
-0
notification/ans_standard/publish_test/publishimage/entry/src/main/js/default/i18n/en-US.json
...st/publishimage/entry/src/main/js/default/i18n/en-US.json
+6
-0
notification/ans_standard/publish_test/publishimage/entry/src/main/js/default/i18n/zh-CN.json
...st/publishimage/entry/src/main/js/default/i18n/zh-CN.json
+6
-0
notification/ans_standard/publish_test/publishimage/entry/src/main/js/default/pages/index/index.css
...lishimage/entry/src/main/js/default/pages/index/index.css
+9
-0
notification/ans_standard/publish_test/publishimage/entry/src/main/js/default/pages/index/index.hml
...lishimage/entry/src/main/js/default/pages/index/index.hml
+5
-0
notification/ans_standard/publish_test/publishimage/entry/src/main/js/default/pages/index/index.js
...blishimage/entry/src/main/js/default/pages/index/index.js
+47
-0
notification/ans_standard/publish_test/publishimage/entry/src/main/js/resources/base/element/string.json
...mage/entry/src/main/js/resources/base/element/string.json
+12
-0
notification/ans_standard/publish_test/publishimage/entry/src/main/js/resources/base/media/icon.png
...lishimage/entry/src/main/js/resources/base/media/icon.png
+0
-0
notification/ans_standard/publish_test/publishimage/entry/src/main/js/test/List.test.js
...ish_test/publishimage/entry/src/main/js/test/List.test.js
+15
-0
notification/ans_standard/publish_test/publishimage/entry/src/main/js/test/publishImage.js
..._test/publishimage/entry/src/main/js/test/publishImage.js
+120
-0
notification/ans_standard/publish_test/publishimage/signature/openharmony_sx.p7b
...rd/publish_test/publishimage/signature/openharmony_sx.p7b
+0
-0
notification/ans_standard/publish_test/subscribe/publishfirst/BUILD.gn
...ans_standard/publish_test/subscribe/publishfirst/BUILD.gn
+3
-6
notification/ans_standard/publish_test/subscribe/publishsecond/BUILD.gn
...ns_standard/publish_test/subscribe/publishsecond/BUILD.gn
+3
-6
notification/ans_standard/publish_test/wantagent/test1/BUILD.gn
...cation/ans_standard/publish_test/wantagent/test1/BUILD.gn
+4
-7
notification/ans_standard/publish_test/wantagent/test2/BUILD.gn
...cation/ans_standard/publish_test/wantagent/test2/BUILD.gn
+4
-7
未找到文件。
notification/ans_standard/publish_test/BUILD.gn
浏览文件 @
c5051da0
...
...
@@ -19,7 +19,8 @@ group("publish_test") {
#"actsanspublishcontroltest:ActsAnsPublishControlTest",
#"badgedisplayed:badgedisplayed",
#"badgedisplayedset:badgedisplayedset",
#"enablenotification:enablenotification",
"enablenotification:enablenotification",
#"enablenotificationset:enablenotificationset",
"getactive:getactive",
"getwantagentinfo:getwantagentinfo",
...
...
@@ -27,6 +28,9 @@ group("publish_test") {
#"publishcontentype:ActsAnsNotificationTest",
#"subscribe:subscribe",
#"unsubscribe:ActsAnsUnSubscriberTest",
#"activeButton:ActsAnsActionButtonTest",
#"publishicontest:ActsAnsIconTest",
#"publishimage:ActsAnsPublishImageTest",
"wantagent:wantagent",
]
}
...
...
notification/ans_standard/publish_test/activeButton/.gitignore
0 → 100644
浏览文件 @
c5051da0
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
/entry/.preview
.cxx
notification/ans_standard/publish_test/activeButton/.idea/.gitignore
0 → 100644
浏览文件 @
c5051da0
# Default ignored files
/shelf/
/workspace.xml
notification/ans_standard/publish_test/activeButton/.idea/compiler.xml
0 → 100644
浏览文件 @
c5051da0
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"CompilerConfiguration"
>
<bytecodeTargetLevel
target=
"1.8"
/>
</component>
</project>
\ No newline at end of file
notification/ans_standard/publish_test/activeButton/.idea/gradle.xml
0 → 100644
浏览文件 @
c5051da0
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"GradleMigrationSettings"
migrationVersion=
"1"
/>
<component
name=
"GradleSettings"
>
<option
name=
"linkedExternalProjectsSettings"
>
<GradleProjectSettings>
<option
name=
"testRunner"
value=
"PLATFORM"
/>
<option
name=
"distributionType"
value=
"LOCAL"
/>
<option
name=
"externalProjectPath"
value=
"$PROJECT_DIR$"
/>
<option
name=
"gradleHome"
value=
"D:\HUAWEI\DevEco Studio 2.1.0.301\tools\gradle"
/>
<option
name=
"modules"
>
<set>
<option
value=
"$PROJECT_DIR$"
/>
<option
value=
"$PROJECT_DIR$/entry"
/>
</set>
</option>
<option
name=
"resolveModulePerSourceSet"
value=
"false"
/>
<option
name=
"useQualifiedModuleNames"
value=
"false"
/>
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
notification/ans_standard/publish_test/activeButton/.idea/jarRepositories.xml
0 → 100644
浏览文件 @
c5051da0
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"RemoteRepositoriesConfiguration"
>
<remote-repository>
<option
name=
"id"
value=
"central"
/>
<option
name=
"name"
value=
"Maven Central repository"
/>
<option
name=
"url"
value=
"https://repo1.maven.org/maven2"
/>
</remote-repository>
<remote-repository>
<option
name=
"id"
value=
"jboss.community"
/>
<option
name=
"name"
value=
"JBoss Community repository"
/>
<option
name=
"url"
value=
"https://repository.jboss.org/nexus/content/repositories/public/"
/>
</remote-repository>
<remote-repository>
<option
name=
"id"
value=
"maven2"
/>
<option
name=
"name"
value=
"maven2"
/>
<option
name=
"url"
value=
"https://developer.huawei.com/repo/"
/>
</remote-repository>
<remote-repository>
<option
name=
"id"
value=
"BintrayJCenter"
/>
<option
name=
"name"
value=
"BintrayJCenter"
/>
<option
name=
"url"
value=
"https://jcenter.bintray.com/"
/>
</remote-repository>
<remote-repository>
<option
name=
"id"
value=
"maven"
/>
<option
name=
"name"
value=
"maven"
/>
<option
name=
"url"
value=
"https://repo.huaweicloud.com/repository/maven/"
/>
</remote-repository>
</component>
</project>
\ No newline at end of file
notification/ans_standard/publish_test/activeButton/.idea/misc.xml
0 → 100644
浏览文件 @
c5051da0
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1_8"
default=
"true"
project-jdk-name=
"1.8"
project-jdk-type=
"JavaSDK"
/>
</project>
\ No newline at end of file
notification/ans_standard/publish_test/activeButton/BUILD.gn
0 → 100644
浏览文件 @
c5051da0
# 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("ActsAnsActionButtonTest") {
hap_profile = "./entry/src/main/config.json"
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAnsActionButtonTest"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/js/default"
}
ohos_resources("hjs_demo_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
notification/ans_standard/publish_test/activeButton/Test.json
0 → 100644
浏览文件 @
c5051da0
{
"description"
:
"Configuration for hjunit demo Tests"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"60000"
,
"package"
:
"com.example.actsansactionbuttontest"
,
"shell-timeout"
:
"60000"
},
"kits"
:
[
{
"test-file-name"
:
[
"ActsAnsActionButtonTest"
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
}
]
}
notification/ans_standard/publish_test/activeButton/entry/.gitignore
0 → 100644
浏览文件 @
c5051da0
/build
notification/ans_standard/publish_test/activeButton/entry/src/main/config.json
0 → 100644
浏览文件 @
c5051da0
{
"app"
:
{
"bundleName"
:
"com.example.actsansactionbuttontest"
,
"vendor"
:
"example"
,
"version"
:
{
"code"
:
1
,
"name"
:
"1.0"
},
"apiVersion"
:
{
"compatible"
:
5
,
"target"
:
5
,
"releaseType"
:
"Beta1"
}
},
"deviceConfig"
:
{},
"module"
:
{
"package"
:
"com.example.actsansactionbuttontest"
,
"name"
:
".MyApplication"
,
"deviceType"
:
[
"phone"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"entry"
,
"moduleType"
:
"entry"
},
"abilities"
:
[
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"name"
:
"com.example.actsansactionbuttontest.MainAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"page"
,
"isVisible"
:
"true"
,
"launchType"
:
"standard"
,
"visible"
:
true
}
],
"js"
:
[
{
"pages"
:
[
"pages/index/index"
],
"name"
:
"default"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
}
]
}
}
\ No newline at end of file
notification/ans_standard/publish_test/activeButton/entry/src/main/js/default/app.js
0 → 100644
浏览文件 @
c5051da0
/*
* 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
'
);
}
};
notification/ans_standard/publish_test/activeButton/entry/src/main/js/default/i18n/en-US.json
0 → 100644
浏览文件 @
c5051da0
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
}
}
\ No newline at end of file
notification/ans_standard/publish_test/activeButton/entry/src/main/js/default/i18n/zh-CN.json
0 → 100644
浏览文件 @
c5051da0
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
}
}
\ No newline at end of file
notification/ans_standard/publish_test/activeButton/entry/src/main/js/default/pages/index/index.css
0 → 100644
浏览文件 @
c5051da0
.container
{
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.title
{
font-size
:
100px
;
}
notification/ans_standard/publish_test/activeButton/entry/src/main/js/default/pages/index/index.hml
0 → 100644
浏览文件 @
c5051da0
<div class="container">
<text class="title">
activeButton
</text>
</div>
notification/ans_standard/publish_test/activeButton/entry/src/main/js/default/pages/index/index.js
0 → 100644
浏览文件 @
c5051da0
/*
* 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
file
from
'
@system.file
'
import
{
Core
,
ExpectExtend
}
from
'
deccjsunit/index
'
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
export
default
{
data
:
{
title
:
""
},
onInit
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
},
onShow
()
{
console
.
info
(
'
onShow finish
'
)
const
core
=
Core
.
getInstance
()
const
expectExtend
=
new
ExpectExtend
({
'
id
'
:
'
extend
'
})
core
.
addService
(
'
expect
'
,
expectExtend
)
core
.
init
()
const
configService
=
core
.
getDefaultService
(
'
config
'
)
configService
.
setConfig
(
this
)
require
(
'
../../../test/List.test
'
)
core
.
execute
()
},
onReady
()
{
console
.
info
(
'
onReady
'
);
},
}
notification/ans_standard/publish_test/activeButton/entry/src/main/js/resources/base/element/string.json
0 → 100644
浏览文件 @
c5051da0
{
"string"
:
[
{
"name"
:
"app_name"
,
"value"
:
"ActiveBtn"
},
{
"name"
:
"mainability_description"
,
"value"
:
"JS_Phone_Empty Feature Ability"
}
]
}
\ No newline at end of file
notification/ans_standard/publish_test/activeButton/entry/src/main/js/resources/base/media/icon.png
0 → 100644
浏览文件 @
c5051da0
6.6 KB
notification/ans_standard/publish_test/activeButton/entry/src/main/js/test/ActiveButton.js
0 → 100644
浏览文件 @
c5051da0
/*
* 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
notify
from
'
@ohos.notification
'
import
wantagent
from
'
@ohos.wantAgent
'
import
image
from
'
@ohos.multimedia.image
'
import
{
OperationType
,
Flags
}
from
'
@ohos.wantagent
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
var
largeBuffer
var
smallBuffer
var
opts
var
subInfo
var
largeIcon
var
smallIcon
var
time
=
1000
describe
(
'
ActsAnsActionButtonTest
'
,
function
()
{
console
.
info
(
"
===========ActsDoNotSubscriberTest start====================>
"
);
//consume
function
consumeCallback
(
err
,
data
)
{
console
.
debug
(
"
==========================>consumeDoNotCallbackOne data : =======================>
"
+
err
+
JSON
.
stringify
(
data
));
expect
(
typeof
(
data
.
request
.
actionButtons
)).
assertEqual
(
'
object
'
)
for
(
let
i
=
0
;
i
<
data
.
request
.
actionButtons
;
i
++
)
{
console
.
debug
(
"
======consumeCallback====data.actionButtons.title:====>
"
+
data
.
request
.
actionButtons
[
i
].
title
);
console
.
debug
(
"
======consumeCallback====sortings.hashCode:====>
"
+
data
.
request
.
actionButtons
[
i
].
wantAgent
);
console
.
debug
(
"
======consumeCallback====sortings.hashCode:====>
"
+
data
.
request
.
actionButtons
[
i
].
icon
);
}
}
//consume
function
consumeCallbackTwo
(
err
,
data
)
{
console
.
debug
(
"
==========================>consumeDoNotCallbackTwo data : =======================>
"
+
err
+
JSON
.
stringify
(
data
));
expect
(
typeof
(
data
.
request
.
actionButtons
)).
assertEqual
(
'
object
'
)
for
(
let
i
=
0
;
i
<
data
.
request
.
actionButtons
;
i
++
)
{
console
.
debug
(
"
======consumeDoNotCallbackTwo====sortings.hashCode:====>
"
+
data
.
request
.
actionButtons
[
i
].
title
);
console
.
debug
(
"
======consumeDoNotCallbackTwo====sortings.hashCode:====>
"
+
data
.
request
.
actionButtons
[
i
].
wantAgent
);
console
.
debug
(
"
======consumeCallback====sortings.hashCode:====>
"
+
data
.
request
.
actionButtons
[
i
].
icon
);
}
}
//subscribe
function
subscribeCallback
(
err
)
{
console
.
debug
(
"
==========================>subscribeDoNotCallback=======================>
"
);
}
function
publishCallback200
(){
console
.
debug
(
"
==========================>publishCallback200=======================>
"
);
}
/*
* @tc.number: ActsDoNotSubscriber_test_0100
* @tc.name: subscribe()
* @tc.desc: verify the function of subscribe
*/
it
(
'
ActsActiveButton_test_0100
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
===============ActsActiveButton_test_0100======begin====================>
"
);
var
subInfo
=
{
onConsume
:
consumeCallback
}
try
{
await
notify
.
subscribe
(
subInfo
,
subscribeCallback
);
}
catch
(
err
)
{
console
.
error
(
'
=ActsActiveButton_test_0100 订阅 activeButton err:
'
+
err
);
}
console
.
debug
(
"
===============ActsActiveButton_test_0100=======end3===================>
"
);
var
agentInfo
=
{
wants
:
[
{
deviceId
:
"
deviceId
"
,
bundleName
:
"
com.example.test
"
,
abilityName
:
"
com.example.test.TriggerAbility
"
,
action
:
"
action1
"
,
entities
:
[
"
entity1
"
],
type
:
"
MIMETYPE
"
,
uri
:
"
key={true,true,false}
"
,
parameters
:
{
mykey0
:
2222
,
mykey1
:
[
1
,
2
,
3
],
mykey2
:
"
[1, 2, 3]
"
,
mykey3
:
"
ssssssssssssssssssssssssss
"
,
mykey4
:
[
false
,
true
,
false
],
mykey5
:
[
"
qqqqq
"
,
"
wwwwww
"
,
"
aaaaaaaaaaaaaaaaa
"
],
mykey6
:
true
,
}
}
],
operationType
:
OperationType
.
START_ABILITY
,
requestCode
:
0
,
wantAgentFlags
:[
Flags
.
UPDATE_PRESENT_FLAG
]
};
var
wantAgentData
=
await
wantagent
.
getWantAgent
(
agentInfo
);
largeBuffer
=
new
ArrayBuffer
(
64
);
smallBuffer
=
new
ArrayBuffer
(
32
);
opts
=
{
alphaType
:
0
,
editable
:
true
,
pixelFormat
:
4
,
scaleMode
:
1
,
size
:
{
height
:
2
,
width
:
3
}}
const
promise_Large
=
image
.
createPixelMap
(
largeBuffer
,
opts
);
promise_Large
.
then
((
data
)
=>
{
console
.
debug
(
"
==========================createPixelMap_promise_Large=======================>
"
);
largeIcon
=
data
;
console
.
debug
(
"
==========================createPixelMap_promise_Large largeIcon=======================>
"
+
largeIcon
);
const
promise_Small
=
image
.
createPixelMap
(
smallBuffer
,
opts
);
promise_Small
.
then
((
data
)
=>
{
console
.
debug
(
"
==========================createPixelMap_promise_Small=======================>
"
);
smallIcon
=
data
;
console
.
debug
(
"
==========================createPixelMap_promise_Small smallIcon=======================>
"
+
smallIcon
);
var
notificationRequest
=
{
content
:{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_LONG_TEXT
,
longText
:
{
title
:
"
test_title
"
,
text
:
"
test_text
"
,
additionalText
:
"
test_additionalText
"
,
longText
:
"
long_text
"
,
briefText
:
"
long_briefText
"
,
expandedTitle
:
"
long_expandedTitle
"
},
},
id
:
1
,
slotType
:
notify
.
SlotType
.
SERVICE_INFORMATION
,
actionButtons
:
[{
title
:
"
button
"
,
wantAgent
:
wantAgentData
,
icon
:
largeIcon
},{
title
:
"
button
"
,
wantAgent
:
wantAgentData
,
icon
:
smallIcon
}]
}
notify
.
publish
(
notificationRequest
,
publishCallback200
);
console
.
info
(
"
===============ActsActiveButton_test_0100==========================>
"
);
done
();
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ActsActiveButton_test_0100====>
"
);
},
time
);
})
})
})
})
notification/ans_standard/publish_test/activeButton/entry/src/main/js/test/List.test.js
0 → 100644
浏览文件 @
c5051da0
/*
* 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
(
'
./ActiveButton.js
'
)
notification/ans_standard/publish_test/activeButton/signature/openharmony_sx.p7b
0 → 100644
浏览文件 @
c5051da0
文件已添加
notification/ans_standard/publish_test/badgedisplayed/localcandisplay/BUILD.gn
浏览文件 @
c5051da0
...
...
@@ -10,20 +10,17 @@
# 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_
hap
("ActsAnsLocalCanDisplayTest") {
ohos_
js_hap_suite
("ActsAnsLocalCanDisplayTest") {
hap_profile = "./entry/src/main/config.json"
hap_name = "ActsAnsLocalCanDisplayTest"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAnsLocalCanDisplayTest"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/js/default"
...
...
notification/ans_standard/publish_test/enablenotification/enablenotificationfive/entry/src/main/js/default/pages/index/index.hml
浏览文件 @
c5051da0
<div class="container">
<text class="title">
通知许可设定--参数传空
0928
通知许可设定--参数传空
1111
</text>
</div>
notification/ans_standard/publish_test/enablenotification/enablenotificationfive/entry/src/main/js/test/BadgeDisplay.js
浏览文件 @
c5051da0
...
...
@@ -42,10 +42,11 @@ describe('ActsAnsEnableNotificationFiveTest', function () {
* @tc.desc: verify the function of enableNotification
*/
it
(
'
ActsEnableNotification_test_1000
'
,
0
,
async
function
(
done
)
{
await
notify
.
enableNotification
(
var
promise
=
notify
.
enableNotification
(
{
bundle
:
"
com.example.actsanslocalnotificationtest
"
,
},
""
).
then
(
console
.
log
(
"
====>ActsEnableNotification_test_1000 success====>
"
))
},
""
)
expect
(
promise
).
assertEqual
(
undefined
)
done
();
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ActsEnableNotification_test_1000====>
"
);
...
...
notification/ans_standard/publish_test/enablenotification/enablenotificationfour/entry/src/main/js/test/BadgeDisplay.js
浏览文件 @
c5051da0
...
...
@@ -42,10 +42,11 @@ describe('ActsAnsEnableNotificationFourTest', function () {
* @tc.desc: verify the function of enableNotification
*/
it
(
'
ActsEnableNotification_test_0800
'
,
0
,
async
function
(
done
)
{
await
notify
.
enableNotification
(
var
promise
=
notify
.
enableNotification
(
{
bundle
:
"
com.example.actsanslocalnotificationtest
"
,
},
100
).
then
(
console
.
log
(
"
====>ActsEnableNotification_test_0800 success====>
"
))
},
100
)
expect
(
promise
).
assertEqual
(
undefined
)
done
();
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ActsEnableNotification_test_0800====>
"
);
...
...
notification/ans_standard/publish_test/enablenotificationset/enablenotificationfive/entry/src/main/js/test/BadgeDisplay.js
浏览文件 @
c5051da0
...
...
@@ -42,10 +42,11 @@ describe('ActsAnsEnableNotificationSetFiveTest', function () {
* @tc.desc: verify the function of enableNotification
*/
it
(
'
ActsEnableNotificationSet_test_1000
'
,
0
,
async
function
(
done
)
{
await
notify
.
enableNotification
(
var
promise
=
notify
.
enableNotification
(
{
bundle
:
"
com.example.actsanslocalnotificationtest
"
,
},
""
).
then
(
console
.
log
(
"
====>ActsEnableNotificationSet_test_1000 success====>
"
))
},
""
)
expect
(
promise
).
assertEqual
(
undefined
)
done
();
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ActsEnableNotificationSet_test_1000====>
"
);
...
...
notification/ans_standard/publish_test/enablenotificationset/enablenotificationfour/entry/src/main/js/test/BadgeDisplay.js
浏览文件 @
c5051da0
...
...
@@ -42,10 +42,11 @@ describe('ActsAnsEnableNotificationSetFourTest', function () {
* @tc.desc: verify the function of enableNotification
*/
it
(
'
ActsEnableNotificationSet_test_0800
'
,
0
,
async
function
(
done
)
{
await
notify
.
enableNotification
(
var
promise
=
notify
.
enableNotification
(
{
bundle
:
"
com.example.actsanslocalnotificationtest
"
,
},
100
).
then
(
console
.
log
(
"
====>ActsEnableNotificationSet_test_0800 success====>
"
))
},
100
)
expect
(
promise
).
assertEqual
(
undefined
)
done
();
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ActsEnableNotificationSet_test_0800====>
"
);
...
...
notification/ans_standard/publish_test/getactive/getactivenormal/sub/Test.json
浏览文件 @
c5051da0
...
...
@@ -2,9 +2,9 @@
"description"
:
"Configuration for hjunit demo Tests"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"
18
0000"
,
"test-timeout"
:
"
2160
0000"
,
"package"
:
"com.example.actsansactivesubscribertest"
,
"shell-timeout"
:
"
6
0000"
"shell-timeout"
:
"
2160
0000"
},
"kits"
:
[
{
...
...
notification/ans_standard/publish_test/getactive/getcancelactivenum/Test.json
浏览文件 @
c5051da0
...
...
@@ -2,9 +2,9 @@
"description"
:
"Configuration for hjunit demo Tests"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"
18
0000"
,
"test-timeout"
:
"
2160
0000"
,
"package"
:
"com.example.actsansgetcancelactivenumtest"
,
"shell-timeout"
:
"
6
0000"
"shell-timeout"
:
"
2160
0000"
},
"kits"
:
[
{
...
...
notification/ans_standard/publish_test/getwantagentinfo/getwantagentinfoonepro/entry/src/main/js/test/WantAgent.test.js
浏览文件 @
c5051da0
...
...
@@ -147,17 +147,17 @@ describe('ActsAnsGetWantAgentInfoOneProTest', function () {
console
.
info
(
data
);
expect
(
typeof
(
data
)).
assertEqual
(
"
object
"
);
wantAgent
.
equal
(
WantAgent1
,
WantAgent2
).
then
(
(
error
,
data
)
=>
{
(
data
)
=>
{
console
.
info
(
'
----equalPromise1 success!----
'
)
console
.
info
(
data
);
expect
(
typeof
(
data
)).
assertEqual
(
"
boolean
"
);
expect
(
data
).
assertEqual
(
false
);
}
)
wantAgent
.
equal
(
WantAgent1
,
WantAgent1
).
then
(
(
error
,
data
)
=>
{
(
data
)
=>
{
console
.
info
(
'
----equalPromise2 success!----
'
)
console
.
info
(
data
);
expect
(
typeof
(
data
)).
assertEqual
(
"
boolean
"
);
expect
(
data
).
assertEqual
(
true
);
}
)
}
...
...
notification/ans_standard/publish_test/getwantagentinfo/getwantagentinfotwopro/entry/src/main/js/test/WantAgent.test.js
浏览文件 @
c5051da0
...
...
@@ -71,10 +71,10 @@ describe('ActsAnsGetWantAgentInfoTwoProTest', function () {
expect
(
typeof
(
data
)).
assertEqual
(
"
object
"
);
}
done
();
}),
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ACTS_SetWantInfo_0700====>
"
);
},
time
)
}),
console
.
info
(
'
----getWantAgent1 after----
'
);
})
...
...
@@ -121,17 +121,17 @@ describe('ActsAnsGetWantAgentInfoTwoProTest', function () {
console
.
info
(
data
);
expect
(
typeof
(
data
)).
assertEqual
(
"
object
"
);
wantAgent
.
equal
(
WantAgent1
,
WantAgent2
).
then
(
(
error
,
data
)
=>
{
(
data
)
=>
{
console
.
info
(
'
----equalPromise1 success!----
'
)
console
.
info
(
data
);
expect
(
typeof
(
data
)).
assertEqual
(
"
boolean
"
);
expect
(
data
).
assertEqual
(
false
);
}
)
wantAgent
.
equal
(
WantAgent1
,
WantAgent1
).
then
(
(
error
,
data
)
=>
{
(
data
)
=>
{
console
.
info
(
'
----equalPromise2 success!----
'
)
console
.
info
(
data
);
expect
(
typeof
(
data
)).
assertEqual
(
"
boolean
"
);
expect
(
data
).
assertEqual
(
true
);
}
)
}
...
...
@@ -141,10 +141,11 @@ describe('ActsAnsGetWantAgentInfoTwoProTest', function () {
expect
(
typeof
(
data
)).
assertEqual
(
"
object
"
);
}
done
();
});
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ACTS_SetWantInfo_0800====>
"
);
},
time
)
});
console
.
info
(
'
----getWantAgent2 after----
'
);
})
})
...
...
notification/ans_standard/publish_test/publishicontest/BUILD.gn
0 → 100644
浏览文件 @
c5051da0
# 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("ActsAnsIconTest") {
hap_profile = "./entry/src/main/config.json"
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAnsIconTest"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/js/default"
}
ohos_resources("hjs_demo_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
notification/ans_standard/publish_test/publishicontest/Test.json
0 → 100755
浏览文件 @
c5051da0
{
"description"
:
"Configuration for hjunit demo Tests"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"120000"
,
"package"
:
"com.example.actsansicontest"
,
"shell-timeout"
:
"120000"
},
"kits"
:
[
{
"test-file-name"
:
[
"ActsAnsIconTest.hap"
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
}
]
}
notification/ans_standard/publish_test/publishicontest/entry/src/main/config.json
0 → 100644
浏览文件 @
c5051da0
{
"app"
:
{
"bundleName"
:
"com.example.actsansicontest"
,
"vendor"
:
"example"
,
"version"
:
{
"code"
:
1
,
"name"
:
"1.0"
},
"apiVersion"
:
{
"compatible"
:
5
,
"target"
:
5
,
"releaseType"
:
"Beta1"
}
},
"deviceConfig"
:
{},
"module"
:
{
"package"
:
"com.example.actsansicontest"
,
"name"
:
".actsansicontest"
,
"deviceType"
:
[
"phone"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"entry"
,
"moduleType"
:
"entry"
},
"abilities"
:
[
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"name"
:
"com.example.actsansicontest.MainAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"page"
,
"isVisible"
:
"true"
,
"launchType"
:
"standard"
}
],
"js"
:
[
{
"pages"
:
[
"pages/index/index"
],
"name"
:
"default"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
}
]
}
}
\ No newline at end of file
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/default/app.js
0 → 100644
浏览文件 @
c5051da0
/*
* 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
'
);
}
};
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/default/i18n/en-US.json
0 → 100644
浏览文件 @
c5051da0
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
}
}
\ No newline at end of file
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/default/i18n/zh-CN.json
0 → 100644
浏览文件 @
c5051da0
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
}
}
\ No newline at end of file
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/default/pages/index/index.css
0 → 100644
浏览文件 @
c5051da0
.container
{
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.title
{
font-size
:
100px
;
}
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/default/pages/index/index.hml
0 → 100644
浏览文件 @
c5051da0
<div class="container">
<text class="title">
icon_pixcelMap
</text>
</div>
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/default/pages/index/index.js
0 → 100644
浏览文件 @
c5051da0
/*
* 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
file
from
'
@system.file
'
import
{
Core
,
ExpectExtend
}
from
'
deccjsunit/index
'
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
export
default
{
data
:
{
title
:
""
},
onInit
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
},
onShow
()
{
console
.
info
(
'
onShow finish
'
)
const
core
=
Core
.
getInstance
()
const
expectExtend
=
new
ExpectExtend
({
'
id
'
:
'
extend
'
})
core
.
addService
(
'
expect
'
,
expectExtend
)
core
.
init
()
const
configService
=
core
.
getDefaultService
(
'
config
'
)
configService
.
setConfig
(
this
)
require
(
'
../../../test/List.test
'
)
core
.
execute
()
},
onReady
()
{
console
.
info
(
'
onReady
'
);
},
}
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/resources/base/element/string.json
0 → 100644
浏览文件 @
c5051da0
{
"string"
:
[
{
"name"
:
"app_name"
,
"value"
:
"Subscriber"
},
{
"name"
:
"mainability_description"
,
"value"
:
"JS_Phone_Empty Feature Ability"
}
]
}
\ No newline at end of file
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/resources/base/media/icon.png
0 → 100644
浏览文件 @
c5051da0
6.6 KB
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/test/Icon.js
0 → 100644
浏览文件 @
c5051da0
/*
* 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
notify
from
'
@ohos.notification
'
import
image
from
'
@ohos.multimedia.image
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
var
largeBuffer
var
smallBuffer
var
opts
var
subInfo
var
largeIcon
var
smallIcon
var
time
=
1000
describe
(
'
ActsAnsIconTest
'
,
function
()
{
console
.
info
(
"
===========ActsAnsIconTest start====================>
"
);
//consume
function
consumeCallback
(
err
,
data
)
{
console
.
debug
(
"
==========================consumeCallback data : =======================>
"
+
err
+
JSON
.
stringify
(
data
));
console
.
log
(
"
==========================consumeCallback smallIcon : =======================>
"
+
JSON
.
stringify
(
data
.
request
.
smallIcon
))
console
.
log
(
"
==========================consumeCallback largeIcon : =======================>
"
+
JSON
.
stringify
(
data
.
request
.
largeIcon
))
}
function
subscribeCallback
(
err
)
{
console
.
info
(
"
==========================subscribeCallback start=======================>
"
);
console
.
info
(
"
================subscribeCallback err : =======================>
"
+
JSON
.
stringify
(
err
));
console
.
info
(
"
==========================subscribeCallback end=======================>
"
);
}
function
publishCallback
(
err
){
console
.
info
(
"
==========================publishCallback start=======================>
"
);
console
.
info
(
"
================publishCallback err : =======================>
"
+
JSON
.
stringify
(
err
));
console
.
info
(
"
==========================publishCallback end=======================>
"
);
}
/*
* @tc.number: ActsAnsIconTest_0100
* @tc.name: createPixelMap()
* @tc.desc: verify the function of subscribe
*/
it
(
'
ActsAnsIconTest_0100
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
===============ActsAnsIconTest_0100 start====================>
"
);
subInfo
=
{
onConsume
:
consumeCallback
,
}
await
notify
.
subscribe
(
subInfo
,
subscribeCallback
);
largeBuffer
=
new
ArrayBuffer
(
64
);
smallBuffer
=
new
ArrayBuffer
(
32
);
opts
=
{
alphaType
:
0
,
editable
:
true
,
pixelFormat
:
4
,
scaleMode
:
1
,
size
:
{
height
:
2
,
width
:
3
}}
const
promise_Large
=
image
.
createPixelMap
(
largeBuffer
,
opts
);
promise_Large
.
then
((
data
)
=>
{
console
.
debug
(
"
==========================createPixelMap_promise_Large=======================>
"
);
largeIcon
=
data
;
console
.
debug
(
"
==========================createPixelMap_promise_Large largeIcon=======================>
"
+
largeIcon
);
const
promise_Small
=
image
.
createPixelMap
(
smallBuffer
,
opts
);
promise_Small
.
then
((
data
)
=>
{
console
.
debug
(
"
==========================createPixelMap_promise_Small=======================>
"
);
smallIcon
=
data
;
console
.
debug
(
"
==========================createPixelMap_promise_Small smallIcon=======================>
"
+
smallIcon
);
notify
.
publish
({
id
:
1
,
content
:
{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_BASIC_TEXT
,
normal
:
{
title
:
"
test1_title
"
,
text
:
"
test1_text
"
,
additionalText
:
"
test1_additionalText
"
},
},
slotType
:
notify
.
SlotType
.
SOCIAL_COMMUNICATION
,
classification
:
"
classification1
"
,
sortingKey
:
"
sortingKey1
"
,
smallIcon
:
smallIcon
,
largeIcon
:
largeIcon
,
},
publishCallback
);
done
();
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ActsAnsIconTest_0100====>
"
);
},
time
);
});
})
})
});
notification/ans_standard/publish_test/publishicontest/entry/src/main/js/test/List.test.js
0 → 100644
浏览文件 @
c5051da0
/*
* 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
(
'
./Icon.js
'
)
\ No newline at end of file
notification/ans_standard/publish_test/publishicontest/signature/openharmony_sx.p7b
0 → 100755
浏览文件 @
c5051da0
文件已添加
notification/ans_standard/publish_test/publishimage/.gitignore
0 → 100644
浏览文件 @
c5051da0
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
/entry/.preview
.cxx
notification/ans_standard/publish_test/publishimage/.idea/.gitignore
0 → 100644
浏览文件 @
c5051da0
# Default ignored files
/shelf/
/workspace.xml
notification/ans_standard/publish_test/publishimage/.idea/compiler.xml
0 → 100644
浏览文件 @
c5051da0
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"CompilerConfiguration"
>
<bytecodeTargetLevel
target=
"1.8"
/>
</component>
</project>
\ No newline at end of file
notification/ans_standard/publish_test/publishimage/.idea/gradle.xml
0 → 100644
浏览文件 @
c5051da0
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"GradleMigrationSettings"
migrationVersion=
"1"
/>
<component
name=
"GradleSettings"
>
<option
name=
"linkedExternalProjectsSettings"
>
<GradleProjectSettings>
<option
name=
"testRunner"
value=
"PLATFORM"
/>
<option
name=
"distributionType"
value=
"LOCAL"
/>
<option
name=
"externalProjectPath"
value=
"$PROJECT_DIR$"
/>
<option
name=
"gradleHome"
value=
"D:\HUAWEI\DevEco Studio 2.1.0.301\tools\gradle"
/>
<option
name=
"modules"
>
<set>
<option
value=
"$PROJECT_DIR$"
/>
<option
value=
"$PROJECT_DIR$/entry"
/>
</set>
</option>
<option
name=
"resolveModulePerSourceSet"
value=
"false"
/>
<option
name=
"useQualifiedModuleNames"
value=
"false"
/>
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
notification/ans_standard/publish_test/publishimage/.idea/jarRepositories.xml
0 → 100644
浏览文件 @
c5051da0
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"RemoteRepositoriesConfiguration"
>
<remote-repository>
<option
name=
"id"
value=
"central"
/>
<option
name=
"name"
value=
"Maven Central repository"
/>
<option
name=
"url"
value=
"https://repo1.maven.org/maven2"
/>
</remote-repository>
<remote-repository>
<option
name=
"id"
value=
"jboss.community"
/>
<option
name=
"name"
value=
"JBoss Community repository"
/>
<option
name=
"url"
value=
"https://repository.jboss.org/nexus/content/repositories/public/"
/>
</remote-repository>
<remote-repository>
<option
name=
"id"
value=
"maven2"
/>
<option
name=
"name"
value=
"maven2"
/>
<option
name=
"url"
value=
"https://developer.huawei.com/repo/"
/>
</remote-repository>
<remote-repository>
<option
name=
"id"
value=
"BintrayJCenter"
/>
<option
name=
"name"
value=
"BintrayJCenter"
/>
<option
name=
"url"
value=
"https://jcenter.bintray.com/"
/>
</remote-repository>
<remote-repository>
<option
name=
"id"
value=
"maven"
/>
<option
name=
"name"
value=
"maven"
/>
<option
name=
"url"
value=
"https://repo.huaweicloud.com/repository/maven/"
/>
</remote-repository>
</component>
</project>
\ No newline at end of file
notification/ans_standard/publish_test/publishimage/.idea/misc.xml
0 → 100644
浏览文件 @
c5051da0
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"ProjectRootManager"
version=
"2"
languageLevel=
"JDK_1_8"
default=
"true"
project-jdk-name=
"1.8"
project-jdk-type=
"JavaSDK"
/>
</project>
\ No newline at end of file
notification/ans_standard/publish_test/publishimage/BUILD.gn
0 → 100644
浏览文件 @
c5051da0
# 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("ActsAnsPublishImageTest") {
hap_profile = "./entry/src/main/config.json"
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAnsPublishImageTest"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/js/default"
}
ohos_resources("hjs_demo_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
notification/ans_standard/publish_test/publishimage/Test.json
0 → 100644
浏览文件 @
c5051da0
{
"description"
:
"Configuration for hjunit demo Tests"
,
"driver"
:
{
"type"
:
"JSUnitTest"
,
"test-timeout"
:
"60000"
,
"package"
:
"com.example.actsanspublishimagetest"
,
"shell-timeout"
:
"60000"
},
"kits"
:
[
{
"test-file-name"
:
[
"ActsAnsPublishImageTest"
],
"type"
:
"AppInstallKit"
,
"cleanup-apps"
:
true
}
]
}
notification/ans_standard/publish_test/publishimage/entry/.gitignore
0 → 100644
浏览文件 @
c5051da0
/build
notification/ans_standard/publish_test/publishimage/entry/src/main/config.json
0 → 100644
浏览文件 @
c5051da0
{
"app"
:
{
"bundleName"
:
"com.example.actsanspublishimagetest"
,
"vendor"
:
"example"
,
"version"
:
{
"code"
:
1
,
"name"
:
"1.0"
},
"apiVersion"
:
{
"compatible"
:
5
,
"target"
:
5
,
"releaseType"
:
"Beta1"
}
},
"deviceConfig"
:
{},
"module"
:
{
"package"
:
"com.example.actsanspublishimagetest"
,
"name"
:
".MyApplication"
,
"deviceType"
:
[
"phone"
],
"distro"
:
{
"deliveryWithInstall"
:
true
,
"moduleName"
:
"entry"
,
"moduleType"
:
"entry"
},
"abilities"
:
[
{
"skills"
:
[
{
"entities"
:
[
"entity.system.home"
],
"actions"
:
[
"action.system.home"
]
}
],
"name"
:
"com.example.actsanspublishimagetest.MainAbility"
,
"icon"
:
"$media:icon"
,
"description"
:
"$string:mainability_description"
,
"label"
:
"$string:app_name"
,
"type"
:
"page"
,
"isVisible"
:
"true"
,
"launchType"
:
"standard"
,
"visible"
:
true
}
],
"js"
:
[
{
"pages"
:
[
"pages/index/index"
],
"name"
:
"default"
,
"window"
:
{
"designWidth"
:
720
,
"autoDesignWidth"
:
false
}
}
]
}
}
\ No newline at end of file
notification/ans_standard/publish_test/publishimage/entry/src/main/js/default/app.js
0 → 100644
浏览文件 @
c5051da0
/*
* 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
'
);
}
};
notification/ans_standard/publish_test/publishimage/entry/src/main/js/default/i18n/en-US.json
0 → 100644
浏览文件 @
c5051da0
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
}
}
\ No newline at end of file
notification/ans_standard/publish_test/publishimage/entry/src/main/js/default/i18n/zh-CN.json
0 → 100644
浏览文件 @
c5051da0
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
}
}
\ No newline at end of file
notification/ans_standard/publish_test/publishimage/entry/src/main/js/default/pages/index/index.css
0 → 100644
浏览文件 @
c5051da0
.container
{
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.title
{
font-size
:
100px
;
}
notification/ans_standard/publish_test/publishimage/entry/src/main/js/default/pages/index/index.hml
0 → 100644
浏览文件 @
c5051da0
<div class="container">
<text class="title">
发布图片通知
</text>
</div>
notification/ans_standard/publish_test/publishimage/entry/src/main/js/default/pages/index/index.js
0 → 100644
浏览文件 @
c5051da0
/*
* 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
file
from
'
@system.file
'
import
{
Core
,
ExpectExtend
}
from
'
deccjsunit/index
'
const
injectRef
=
Object
.
getPrototypeOf
(
global
)
||
global
injectRef
.
regeneratorRuntime
=
require
(
'
@babel/runtime/regenerator
'
)
export
default
{
data
:
{
title
:
""
},
onInit
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
},
onShow
()
{
console
.
info
(
'
onShow finish
'
)
const
core
=
Core
.
getInstance
()
const
expectExtend
=
new
ExpectExtend
({
'
id
'
:
'
extend
'
})
core
.
addService
(
'
expect
'
,
expectExtend
)
core
.
init
()
const
configService
=
core
.
getDefaultService
(
'
config
'
)
configService
.
setConfig
(
this
)
require
(
'
../../../test/List.test
'
)
core
.
execute
()
},
onReady
()
{
console
.
info
(
'
onReady
'
);
},
}
notification/ans_standard/publish_test/publishimage/entry/src/main/js/resources/base/element/string.json
0 → 100644
浏览文件 @
c5051da0
{
"string"
:
[
{
"name"
:
"app_name"
,
"value"
:
"Pubimage"
},
{
"name"
:
"mainability_description"
,
"value"
:
"JS_Phone_Empty Feature Ability"
}
]
}
\ No newline at end of file
notification/ans_standard/publish_test/publishimage/entry/src/main/js/resources/base/media/icon.png
0 → 100644
浏览文件 @
c5051da0
6.6 KB
notification/ans_standard/publish_test/publishimage/entry/src/main/js/test/List.test.js
0 → 100644
浏览文件 @
c5051da0
/*
* 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
(
'
./publishImage.js
'
)
notification/ans_standard/publish_test/publishimage/entry/src/main/js/test/publishImage.js
0 → 100644
浏览文件 @
c5051da0
/*
* 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
notify
from
'
@ohos.notification
'
import
image
from
'
@ohos.multimedia.image
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
var
imageBuffer
var
opts
var
pubimage
var
time
=
1000
describe
(
'
ActsAnsPublishImageTest
'
,
function
()
{
console
.
info
(
"
===========ActsDoNotSubscriberTest start====================>
"
);
//consume
function
consumeCallbackOne
(
err
,
data
)
{
console
.
debug
(
"
==========================>consumeDoNotCallback1 data : =======================>
"
+
err
+
JSON
.
stringify
(
data
));
checkConsumeData
(
data
)
}
function
consumeCallbackTwo
(
err
,
data
)
{
console
.
debug
(
"
==========================>consumeDoNotCallback2 data : =======================>
"
+
err
+
JSON
.
stringify
(
data
));
checkConsumeData
(
data
)
}
function
checkConsumeData
(
data
){
expect
(
typeof
(
data
)).
assertEqual
(
"
object
"
);
expect
(
data
.
id
).
assertEqual
(
1
);
expect
(
data
.
content
.
contentType
).
assertEqual
(
notify
.
ContentType
.
NOTIFICATION_CONTENT_PICTURE
);
expect
(
data
.
content
.
picture
.
title
).
assertEqual
(
"
image_title
"
);
expect
(
data
.
content
.
picture
.
text
).
assertEqual
(
"
image_text
"
);
expect
(
data
.
content
.
picture
.
additionalText
).
assertEqual
(
"
image_additionalText
"
);
expect
(
data
.
content
.
picture
.
briefText
).
assertEqual
(
"
image_briefText
"
);
expect
(
data
.
content
.
picture
.
expandedTitle
).
assertEqual
(
"
expandedTitle
"
);
// expect(typeof(data.content.picture.picture)).assertEqual();
expect
(
data
.
slotType
).
assertEqual
(
notify
.
SlotType
.
SOCIAL_COMMUNICATION
);
expect
(
data
.
classification
).
assertEqual
(
"
classification1
"
);
expect
(
data
.
sortingKey
).
assertEqual
(
"
sortingKey1
"
);
}
//subscribeOn
function
subscribeOnCallback
(
err
)
{
console
.
debug
(
"
==========================>subscribeDoNotOnCallback=======================>
"
);
}
//subscribe
function
subscribeCallback
(
err
)
{
console
.
debug
(
"
==========================>subscribeDoNotCallback=======================>
"
);
}
function
publishCallback001
(){
console
.
log
(
'
ActsAnsPublishImageTest ACTS_Publish_0100 asyncCallback
'
)
}
/*
* @tc.number: ActsPublishImage_test_0100
* @tc.name: subscribe()
* @tc.desc: verify the function of subscribe
*/
it
(
'
ActsPublishImage_test_0100
'
,
0
,
async
function
(
done
)
{
console
.
debug
(
"
===============ActsDoNotSubscriber_test_0100======begin====================>
"
);
var
subInfo
=
{
onConsume
:
consumeCallbackOne
,
onConnecte
:
subscribeOnCallback
,
}
try
{
await
notify
.
subscribe
(
subInfo
,
subscribeCallback
);
}
catch
(
err
)
{
console
.
error
(
'
=ActsDoNotSubscriber_test_0100 订阅 subscribeDoNotCallback err:
'
+
err
);
}
console
.
debug
(
"
===============ActsSubscriber_test_0100=======end3===================>
"
);
done
();
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ActsPublishImage_test_0100====>
"
);
},
time
);
})
/*
* @tc.number: ACTS_publishTest_0100
* @tc.name: publish()
* @tc.desc: verify the function of publish
*/
it
(
'
ActsPublishImage_test_0200
'
,
0
,
async
function
(
done
)
{
imageBuffer
=
new
ArrayBuffer
(
32
);
opts
=
{
alphaType
:
0
,
editable
:
true
,
pixelFormat
:
4
,
scaleMode
:
1
,
size
:
{
height
:
2
,
width
:
3
}}
const
promise_Large
=
image
.
createPixelMap
(
imageBuffer
,
opts
);
promise_Large
.
then
((
data
)
=>
{
console
.
debug
(
"
==========================createPixelMap_promise_Large=======================>
"
);
pubimage
=
data
;
console
.
debug
(
"
==========================createPixelMap_promise_Large largeIcon=======================>
"
+
pubimage
);
notify
.
publish
({
id
:
1
,
content
:
{
contentType
:
notify
.
ContentType
.
NOTIFICATION_CONTENT_PICTURE
,
picture
:
{
title
:
"
image_title
"
,
text
:
"
image_text
"
,
additionalText
:
"
image_additionalText
"
,
briefText
:
"
image_brief
"
,
expandedTitle
:
"
expandedTitle
"
,
picture
:
pubimage
},
},
slotType
:
notify
.
SlotType
.
SOCIAL_COMMUNICATION
,
classification
:
"
classification1
"
,
sortingKey
:
"
sortingKey1
"
,
},
publishCallback001
);
done
()
setTimeout
(
function
(){
console
.
debug
(
"
====>time out ACTS_publishTest_0100====>
"
);
},
time
);
})
})
})
notification/ans_standard/publish_test/publishimage/signature/openharmony_sx.p7b
0 → 100644
浏览文件 @
c5051da0
文件已添加
notification/ans_standard/publish_test/subscribe/publishfirst/BUILD.gn
浏览文件 @
c5051da0
...
...
@@ -10,20 +10,17 @@
# 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_
hap
("ActsAnsPublishOneTest") {
ohos_
js_hap_suite
("ActsAnsPublishOneTest") {
hap_profile = "./entry/src/main/config.json"
hap_name = "ActsAnsPublishOneTest"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAnsPublishOneTest"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/js/default"
...
...
notification/ans_standard/publish_test/subscribe/publishsecond/BUILD.gn
浏览文件 @
c5051da0
...
...
@@ -10,20 +10,17 @@
# 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_
hap
("ActsAnsPublishTwoTest") {
ohos_
js_hap_suite
("ActsAnsPublishTwoTest") {
hap_profile = "./entry/src/main/config.json"
hap_name = "ActsAnsPublishTwoTest"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsAnsPublishTwoTest"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/js/default"
...
...
notification/ans_standard/publish_test/wantagent/test1/BUILD.gn
浏览文件 @
c5051da0
...
...
@@ -9,21 +9,18 @@
# 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.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_
hap
("test1") {
ohos_
js_hap_suite
("test1") {
hap_profile = "./entry/src/main/config.json"
hap_name = "test1"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "test1"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/js/default"
...
...
notification/ans_standard/publish_test/wantagent/test2/BUILD.gn
浏览文件 @
c5051da0
...
...
@@ -9,21 +9,18 @@
# 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.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_
hap
("test2") {
ohos_
js_hap_suite
("test2") {
hap_profile = "./entry/src/main/config.json"
hap_name = "test2"
subsystem_name = XTS_SUITENAME
final_hap_path =
"${SUITES_OUTPUT_ROOT}/${XTS_SUITENAME}/testcases/${hap_name}.hap"
testonly = true
deps = [
":hjs_demo_js_assets",
":hjs_demo_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "test2"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/js/default"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录