Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
8fead50f
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看板
提交
8fead50f
编写于
6月 29, 2022
作者:
F
fjr
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wantAgent和commonEvent
Signed-off-by:
N
fjr
<
fujiarui6@huawei.com
>
上级
af40decc
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
52 addition
and
63 deletion
+52
-63
notification/ans_standard/publish_test/activebtn/activebutton/entry/src/main/js/test/ActiveButton.js
...vebtn/activebutton/entry/src/main/js/test/ActiveButton.js
+2
-3
notification/ans_standard/publish_test/getwantagentinfo/entry/src/main/js/test/WantAgent.test.js
...getwantagentinfo/entry/src/main/js/test/WantAgent.test.js
+16
-17
notification/ans_standard/publish_test/publishcontentype/publishtype/entry/src/main/js/test/ExampleJsunit.test.js
.../publishtype/entry/src/main/js/test/ExampleJsunit.test.js
+1
-1
notification/ans_standard/publish_test/publishcontentype/sub/entry/src/main/js/test/Subscriber.js
...ublishcontentype/sub/entry/src/main/js/test/Subscriber.js
+1
-1
notification/ans_standard/publish_test/wantagent/wantagent1/entry/src/main/js/test/WantAgent.test.js
...agent/wantagent1/entry/src/main/js/test/WantAgent.test.js
+13
-14
notification/ans_standard/publish_test/wantagent/wantagent1promise/entry/src/main/js/test/WantAgent.test.js
...antagent1promise/entry/src/main/js/test/WantAgent.test.js
+2
-3
notification/ans_standard/publish_test/wantagent/wantagent2/entry/src/main/js/test/WantAgent.test.js
...agent/wantagent2/entry/src/main/js/test/WantAgent.test.js
+2
-3
notification/ans_standard/publish_test/wantagent/wantagent2promise/entry/src/main/js/test/WantAgent.test.js
...antagent2promise/entry/src/main/js/test/WantAgent.test.js
+3
-3
notification/ans_standard/publish_test/wantagent/wantagent3/entry/src/main/js/test/WantAgent.test.js
...agent/wantagent3/entry/src/main/js/test/WantAgent.test.js
+2
-3
notification/ans_standard/publish_test/wantagent/wantagent3promise/entry/src/main/js/test/WantAgent.test.js
...antagent3promise/entry/src/main/js/test/WantAgent.test.js
+2
-3
notification/ans_standard/publish_test/wantagent/wantagent4/entry/src/main/js/test/WantAgent.test.js
...agent/wantagent4/entry/src/main/js/test/WantAgent.test.js
+2
-3
notification/ans_standard/publish_test/wantagent/wantagent4promise/entry/src/main/js/test/WantAgent.test.js
...antagent4promise/entry/src/main/js/test/WantAgent.test.js
+2
-3
notification/ans_standard/publish_test/wantagent/wantagent5/entry/src/main/js/test/WantAgent.test.js
...agent/wantagent5/entry/src/main/js/test/WantAgent.test.js
+2
-3
notification/ans_standard/publish_test/wantagent/wantagent5promise/entry/src/main/js/test/WantAgent.test.js
...antagent5promise/entry/src/main/js/test/WantAgent.test.js
+2
-3
未找到文件。
notification/ans_standard/publish_test/activebtn/activebutton/entry/src/main/js/test/ActiveButton.js
浏览文件 @
8fead50f
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
*/
*/
import
notify
from
'
@ohos.notification
'
import
notify
from
'
@ohos.notification
'
import
WantAgent
from
'
@ohos.wantAgent
'
import
WantAgent
from
'
@ohos.wantAgent
'
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
describe
(
'
ActsAnsActionButtonTest
'
,
function
()
{
describe
(
'
ActsAnsActionButtonTest
'
,
function
()
{
...
@@ -87,7 +86,7 @@ describe('ActsAnsActionButtonTest', function () {
...
@@ -87,7 +86,7 @@ describe('ActsAnsActionButtonTest', function () {
],
],
operationType
:
WantAgent
.
OperationType
.
START_ABILITY
,
operationType
:
WantAgent
.
OperationType
.
START_ABILITY
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
WantAgent
.
WantAgent
Flags
.
UPDATE_PRESENT_FLAG
]
};
};
var
wantAgentData
=
await
WantAgent
.
getWantAgent
(
agentInfoA
);
var
wantAgentData
=
await
WantAgent
.
getWantAgent
(
agentInfoA
);
...
@@ -172,7 +171,7 @@ describe('ActsAnsActionButtonTest', function () {
...
@@ -172,7 +171,7 @@ describe('ActsAnsActionButtonTest', function () {
],
],
operationType
:
WantAgent
.
OperationType
.
START_ABILITY
,
operationType
:
WantAgent
.
OperationType
.
START_ABILITY
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
WantAgent
.
WantAgent
Flags
.
UPDATE_PRESENT_FLAG
]
};
};
var
wantAgentDataB
=
await
WantAgent
.
getWantAgent
(
agentInfoB
);
var
wantAgentDataB
=
await
WantAgent
.
getWantAgent
(
agentInfoB
);
...
...
notification/ans_standard/publish_test/getwantagentinfo/entry/src/main/js/test/WantAgent.test.js
浏览文件 @
8fead50f
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
*/
*/
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
...
@@ -54,9 +53,9 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
...
@@ -54,9 +53,9 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
}
}
},
},
],
],
operationType
:
OperationType
.
START_ABILITY
,
operationType
:
wantAgent
.
OperationType
.
START_ABILITY
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
wantAgent
.
getWantAgent
(
agentInfoa
,
wantAgent
.
getWantAgent
(
agentInfoa
,
(
err
,
data
)
=>
{
(
err
,
data
)
=>
{
...
@@ -134,9 +133,9 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
...
@@ -134,9 +133,9 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
}
}
},
},
],
],
operationType
:
OperationType
.
START_ABILITY
,
operationType
:
wantAgent
.
OperationType
.
START_ABILITY
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
wantAgent
.
getWantAgent
(
agentInfod
).
then
(
wantAgent
.
getWantAgent
(
agentInfod
).
then
(
(
data
)
=>
{
(
data
)
=>
{
...
@@ -197,9 +196,9 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
...
@@ -197,9 +196,9 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
}
}
},
},
],
],
operationType
:
OperationType
.
START_ABILITY
,
operationType
:
wantAgent
.
OperationType
.
START_ABILITY
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
wantAgent
.
getWantAgent
(
agentInfob
,(
err
,
data
)
=>
{
wantAgent
.
getWantAgent
(
agentInfob
,(
err
,
data
)
=>
{
WantAgentb
=
data
WantAgentb
=
data
...
@@ -226,9 +225,9 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
...
@@ -226,9 +225,9 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
}
}
},
},
],
],
operationType
:
OperationType
.
START_ABILITY
,
operationType
:
wantAgent
.
OperationType
.
START_ABILITY
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
setTimeout
(
function
(){
setTimeout
(
function
(){
wantAgent
.
getWantAgent
(
agentInfoc
,
wantAgent
.
getWantAgent
(
agentInfoc
,
...
@@ -304,9 +303,9 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
...
@@ -304,9 +303,9 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
}
}
},
},
],
],
operationType
:
OperationType
.
START_ABILITY
,
operationType
:
wantAgent
.
OperationType
.
START_ABILITY
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
wantAgent
.
getWantAgent
(
agentInfoe
,(
err
,
data
)
=>
{
wantAgent
.
getWantAgent
(
agentInfoe
,(
err
,
data
)
=>
{
console
.
log
(
"
=======agentInfoe=======
"
+
err
.
code
+
JSON
.
stringify
(
data
))
console
.
log
(
"
=======agentInfoe=======
"
+
err
.
code
+
JSON
.
stringify
(
data
))
...
@@ -334,9 +333,9 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
...
@@ -334,9 +333,9 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
}
}
},
},
],
],
operationType
:
OperationType
.
START_ABILITY
,
operationType
:
wantAgent
.
OperationType
.
START_ABILITY
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
setTimeout
(
function
(){
setTimeout
(
function
(){
wantAgent
.
getWantAgent
(
agentInfof
,
wantAgent
.
getWantAgent
(
agentInfof
,
...
@@ -399,9 +398,9 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
...
@@ -399,9 +398,9 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
}
}
},
},
],
],
operationType
:
OperationType
.
START_ABILITY
,
operationType
:
wantAgent
.
OperationType
.
START_ABILITY
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
wantAgent
.
getWantAgent
(
agentInfoe
,(
err
,
data
)
=>
{
wantAgent
.
getWantAgent
(
agentInfoe
,(
err
,
data
)
=>
{
WantAgentd
=
data
WantAgentd
=
data
...
@@ -428,9 +427,9 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
...
@@ -428,9 +427,9 @@ describe('ActsAnsGetWantAgentInfoTest', function () {
}
}
},
},
],
],
operationType
:
OperationType
.
START_ABILITY
,
operationType
:
wantAgent
.
OperationType
.
START_ABILITY
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
setTimeout
(
function
(){
setTimeout
(
function
(){
wantAgent
.
getWantAgent
(
agentInfof
,
wantAgent
.
getWantAgent
(
agentInfof
,
...
...
notification/ans_standard/publish_test/publishcontentype/publishtype/entry/src/main/js/test/ExampleJsunit.test.js
浏览文件 @
8fead50f
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
* limitations under the License.
* limitations under the License.
*/
*/
import
notification
from
'
@ohos.notification
'
import
notification
from
'
@ohos.notification
'
import
Subscriber
from
'
@ohos.common
e
vent
'
import
Subscriber
from
'
@ohos.common
E
vent
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
var
time
=
5000
var
time
=
5000
var
multiLineDataOne
var
multiLineDataOne
...
...
notification/ans_standard/publish_test/publishcontentype/sub/entry/src/main/js/test/Subscriber.js
浏览文件 @
8fead50f
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
import
Subscriber
from
'
@ohos.common
e
vent
'
import
Subscriber
from
'
@ohos.common
E
vent
'
import
notification
from
'
@ohos.notification
'
import
notification
from
'
@ohos.notification
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
var
multiLineDataOne
var
multiLineDataOne
...
...
notification/ans_standard/publish_test/wantagent/wantagent1/entry/src/main/js/test/WantAgent.test.js
浏览文件 @
8fead50f
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
*/
*/
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
var
time
=
1000
var
time
=
1000
var
WantAgent
;
var
WantAgent
;
...
@@ -50,9 +49,9 @@ describe('ActsAnsWantAgentOneTest', function () {
...
@@ -50,9 +49,9 @@ describe('ActsAnsWantAgentOneTest', function () {
}
}
},
},
],
],
operationType
:
OperationType
.
START_ABILITY
,
operationType
:
wantAgent
.
OperationType
.
START_ABILITY
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
console
.
info
(
'
----getWantAgent before----
'
);
console
.
info
(
'
----getWantAgent before----
'
);
await
wantAgent
.
getWantAgent
(
agentInfo
,
await
wantAgent
.
getWantAgent
(
agentInfo
,
...
@@ -130,9 +129,9 @@ describe('ActsAnsWantAgentOneTest', function () {
...
@@ -130,9 +129,9 @@ describe('ActsAnsWantAgentOneTest', function () {
}
}
},
},
],
],
operationType
:
OperationType
.
START_ABILITY
,
operationType
:
wantAgent
.
OperationType
.
START_ABILITY
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
ONE_TIME_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
ONE_TIME_FLAG
]
}
}
console
.
info
(
'
----getWantAgent before----
'
);
console
.
info
(
'
----getWantAgent before----
'
);
await
wantAgent
.
getWantAgent
(
agentInfo
,
await
wantAgent
.
getWantAgent
(
agentInfo
,
...
@@ -183,9 +182,9 @@ describe('ActsAnsWantAgentOneTest', function () {
...
@@ -183,9 +182,9 @@ describe('ActsAnsWantAgentOneTest', function () {
}
}
},
},
],
],
operationType
:
OperationType
.
START_ABILITY
,
operationType
:
wantAgent
.
OperationType
.
START_ABILITY
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
NO_BUILD_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
NO_BUILD_FLAG
]
}
}
console
.
info
(
'
----getWantAgent before----
'
);
console
.
info
(
'
----getWantAgent before----
'
);
await
wantAgent
.
getWantAgent
(
agentInfo
,
await
wantAgent
.
getWantAgent
(
agentInfo
,
...
@@ -236,9 +235,9 @@ describe('ActsAnsWantAgentOneTest', function () {
...
@@ -236,9 +235,9 @@ describe('ActsAnsWantAgentOneTest', function () {
}
}
},
},
],
],
operationType
:
OperationType
.
START_ABILITY
,
operationType
:
wantAgent
.
OperationType
.
START_ABILITY
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
CANCEL_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
CANCEL_PRESENT_FLAG
]
}
}
console
.
info
(
'
----getWantAgent before----
'
);
console
.
info
(
'
----getWantAgent before----
'
);
await
wantAgent
.
getWantAgent
(
agentInfo
,
await
wantAgent
.
getWantAgent
(
agentInfo
,
...
@@ -289,9 +288,9 @@ describe('ActsAnsWantAgentOneTest', function () {
...
@@ -289,9 +288,9 @@ describe('ActsAnsWantAgentOneTest', function () {
}
}
},
},
],
],
operationType
:
OperationType
.
START_ABILITY
,
operationType
:
wantAgent
.
OperationType
.
START_ABILITY
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
CONSTANT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
CONSTANT_FLAG
]
}
}
console
.
info
(
'
----getWantAgent before----
'
);
console
.
info
(
'
----getWantAgent before----
'
);
await
wantAgent
.
getWantAgent
(
agentInfo
,
await
wantAgent
.
getWantAgent
(
agentInfo
,
...
@@ -313,12 +312,12 @@ describe('ActsAnsWantAgentOneTest', function () {
...
@@ -313,12 +312,12 @@ describe('ActsAnsWantAgentOneTest', function () {
console
.
info
(
'
----getWantAgent after----
'
);
console
.
info
(
'
----getWantAgent after----
'
);
})
})
/*
/*
* @tc.number: ACTS_SetWant_0600
* @tc.number: ACTS_SetWant_0600
* @tc.name: getWantAgent(OperationType.START_ABILITY)
* @tc.name: getWantAgent(OperationType.START_ABILITY)
* @tc.desc: verify the function of getWantAgent(OperationType.START_ABILITY)[REPLACE_ELEMENT]
* @tc.desc: verify the function of getWantAgent(OperationType.START_ABILITY)[REPLACE_ELEMENT]
*/
*/
it
(
'
ACTS_SetWant_0600
'
,
0
,
async
function
(
done
)
{
it
(
'
ACTS_SetWant_0600
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
----ACTS_SetWant_0600 start----
'
);
console
.
info
(
'
----ACTS_SetWant_0600 start----
'
);
var
agentInfo
=
{
var
agentInfo
=
{
wants
:
[
wants
:
[
...
@@ -557,7 +556,7 @@ describe('ActsAnsWantAgentOneTest', function () {
...
@@ -557,7 +556,7 @@ describe('ActsAnsWantAgentOneTest', function () {
],
],
operationType
:
wantAgent
.
OperationType
.
START_ABILITY
,
operationType
:
wantAgent
.
OperationType
.
START_ABILITY
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
REPLACE_
BUNDLE
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
REPLACE_
ENTITIES
]
}
}
console
.
info
(
'
----getWantAgent before----
'
);
console
.
info
(
'
----getWantAgent before----
'
);
await
wantAgent
.
getWantAgent
(
agentInfo
,
await
wantAgent
.
getWantAgent
(
agentInfo
,
...
...
notification/ans_standard/publish_test/wantagent/wantagent1promise/entry/src/main/js/test/WantAgent.test.js
浏览文件 @
8fead50f
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
*/
*/
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
var
time
=
1000
var
time
=
1000
var
WantAgent
;
var
WantAgent
;
...
@@ -48,9 +47,9 @@ describe('ActsAnsWantAgentOneProTest', function () {
...
@@ -48,9 +47,9 @@ describe('ActsAnsWantAgentOneProTest', function () {
}
}
},
},
],
],
operationType
:
OperationType
.
START_ABILITY
,
operationType
:
wantAgent
.
OperationType
.
START_ABILITY
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
console
.
info
(
'
----getWantAgent before----
'
);
console
.
info
(
'
----getWantAgent before----
'
);
wantAgent
.
getWantAgent
(
agentInfo
).
then
(
wantAgent
.
getWantAgent
(
agentInfo
).
then
(
...
...
notification/ans_standard/publish_test/wantagent/wantagent2/entry/src/main/js/test/WantAgent.test.js
浏览文件 @
8fead50f
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
*/
*/
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
var
time
=
1000
var
time
=
1000
var
WantAgent
;
var
WantAgent
;
...
@@ -65,9 +64,9 @@ describe('ActsAnsWantAgentTwoTest', function () {
...
@@ -65,9 +64,9 @@ describe('ActsAnsWantAgentTwoTest', function () {
}
}
}
}
],
],
operationType
:
OperationType
.
START_ABILITIES
,
operationType
:
wantAgent
.
OperationType
.
START_ABILITIES
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
console
.
info
(
'
----getWantAgent before----
'
);
console
.
info
(
'
----getWantAgent before----
'
);
wantAgent
.
getWantAgent
(
agentInfo
,
wantAgent
.
getWantAgent
(
agentInfo
,
...
...
notification/ans_standard/publish_test/wantagent/wantagent2promise/entry/src/main/js/test/WantAgent.test.js
浏览文件 @
8fead50f
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
*/
*/
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
var
time
=
1000
var
time
=
1000
var
WantAgent
;
var
WantAgent
;
...
@@ -26,6 +25,7 @@ describe('ActsAnsWantAgentTwoProTest', function () {
...
@@ -26,6 +25,7 @@ describe('ActsAnsWantAgentTwoProTest', function () {
* @tc.desc: verify the function of getWantAgent(OperationType.START_ABILITIES)
* @tc.desc: verify the function of getWantAgent(OperationType.START_ABILITIES)
*/
*/
it
(
'
ACTS_SetWant_0400
'
,
0
,
async
function
(
done
)
{
it
(
'
ACTS_SetWant_0400
'
,
0
,
async
function
(
done
)
{
expect
(
3
).
assertEqual
(
wantAgent
.
OperationType
.
START_SERVICE
)
var
agentInfo
=
{
var
agentInfo
=
{
wants
:
[
wants
:
[
{
{
...
@@ -65,9 +65,9 @@ describe('ActsAnsWantAgentTwoProTest', function () {
...
@@ -65,9 +65,9 @@ describe('ActsAnsWantAgentTwoProTest', function () {
}
}
}
}
],
],
operationType
:
OperationType
.
START_ABILITIES
,
operationType
:
wantAgent
.
OperationType
.
START_ABILITIES
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
console
.
info
(
'
----getWantAgent before----
'
);
console
.
info
(
'
----getWantAgent before----
'
);
wantAgent
.
getWantAgent
(
agentInfo
).
then
(
wantAgent
.
getWantAgent
(
agentInfo
).
then
(
...
...
notification/ans_standard/publish_test/wantagent/wantagent3/entry/src/main/js/test/WantAgent.test.js
浏览文件 @
8fead50f
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
*/
*/
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
var
time
=
1000
var
time
=
1000
var
WantAgent
;
var
WantAgent
;
...
@@ -47,9 +46,9 @@ describe('ActsAnsWantAgentTreeTest', function () {
...
@@ -47,9 +46,9 @@ describe('ActsAnsWantAgentTreeTest', function () {
}
}
},
},
],
],
operationType
:
OperationType
.
SEND_COMMON_EVENT
,
operationType
:
wantAgent
.
OperationType
.
SEND_COMMON_EVENT
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
console
.
info
(
'
----getWantAgent before----
'
);
console
.
info
(
'
----getWantAgent before----
'
);
wantAgent
.
getWantAgent
(
agentInfo
,
wantAgent
.
getWantAgent
(
agentInfo
,
...
...
notification/ans_standard/publish_test/wantagent/wantagent3promise/entry/src/main/js/test/WantAgent.test.js
浏览文件 @
8fead50f
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
*/
*/
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
var
time
=
1000
var
time
=
1000
var
WantAgent
;
var
WantAgent
;
...
@@ -47,9 +46,9 @@ describe('ActsAnsWantAgentTreeProTest', function () {
...
@@ -47,9 +46,9 @@ describe('ActsAnsWantAgentTreeProTest', function () {
}
}
},
},
],
],
operationType
:
OperationType
.
SEND_COMMON_EVENT
,
operationType
:
wantAgent
.
OperationType
.
SEND_COMMON_EVENT
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
console
.
info
(
'
----getWantAgent before----
'
);
console
.
info
(
'
----getWantAgent before----
'
);
wantAgent
.
getWantAgent
(
agentInfo
).
then
(
wantAgent
.
getWantAgent
(
agentInfo
).
then
(
...
...
notification/ans_standard/publish_test/wantagent/wantagent4/entry/src/main/js/test/WantAgent.test.js
浏览文件 @
8fead50f
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
*/
*/
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
var
time
=
1000
var
time
=
1000
var
WantAgent
;
var
WantAgent
;
...
@@ -48,9 +47,9 @@ describe('ActsAnsWantAgentFourTest', function () {
...
@@ -48,9 +47,9 @@ describe('ActsAnsWantAgentFourTest', function () {
}
}
},
},
],
],
operationType
:
OperationType
.
UNKNOWN_TYPE
,
operationType
:
wantAgent
.
OperationType
.
UNKNOWN_TYPE
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
console
.
info
(
'
----getWantAgent before----
'
);
console
.
info
(
'
----getWantAgent before----
'
);
wantAgent
.
getWantAgent
(
agentInfo
,
wantAgent
.
getWantAgent
(
agentInfo
,
...
...
notification/ans_standard/publish_test/wantagent/wantagent4promise/entry/src/main/js/test/WantAgent.test.js
浏览文件 @
8fead50f
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
*/
*/
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
var
time
=
1000
var
time
=
1000
var
WantAgent
;
var
WantAgent
;
...
@@ -47,9 +46,9 @@ describe('ActsAnsWantAgentFourProTest', function () {
...
@@ -47,9 +46,9 @@ describe('ActsAnsWantAgentFourProTest', function () {
}
}
},
},
],
],
operationType
:
OperationType
.
UNKNOWN_TYPE
,
operationType
:
wantAgent
.
OperationType
.
UNKNOWN_TYPE
,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
console
.
info
(
'
----getWantAgent before----
'
);
console
.
info
(
'
----getWantAgent before----
'
);
wantAgent
.
getWantAgent
(
agentInfo
).
then
(
wantAgent
.
getWantAgent
(
agentInfo
).
then
(
...
...
notification/ans_standard/publish_test/wantagent/wantagent5/entry/src/main/js/test/WantAgent.test.js
浏览文件 @
8fead50f
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
*/
*/
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
var
time
=
1000
var
time
=
1000
var
WantAgent
;
var
WantAgent
;
...
@@ -47,9 +46,9 @@ describe('ActsAnsWantAgentFiveTest', function () {
...
@@ -47,9 +46,9 @@ describe('ActsAnsWantAgentFiveTest', function () {
}
}
},
},
],
],
// operationType: OperationType.START_ABILITY,
// operationType:
wantAgent.
OperationType.START_ABILITY,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
console
.
info
(
'
----getWantAgent before----
'
);
console
.
info
(
'
----getWantAgent before----
'
);
wantAgent
.
getWantAgent
(
agentInfo
,
wantAgent
.
getWantAgent
(
agentInfo
,
...
...
notification/ans_standard/publish_test/wantagent/wantagent5promise/entry/src/main/js/test/WantAgent.test.js
浏览文件 @
8fead50f
...
@@ -14,7 +14,6 @@
...
@@ -14,7 +14,6 @@
*/
*/
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
wantAgent
from
'
@ohos.wantAgent
'
;
import
{
OperationType
,
WantAgentFlags
}
from
'
@ohos.wantagent
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
;
var
time
=
1000
var
time
=
1000
var
WantAgent
;
var
WantAgent
;
...
@@ -47,9 +46,9 @@ describe('ActsAnsWantAgentFiveProTest', function () {
...
@@ -47,9 +46,9 @@ describe('ActsAnsWantAgentFiveProTest', function () {
}
}
},
},
],
],
// operationType: OperationType.START_ABILITY,
// operationType:
wantAgent.
OperationType.START_ABILITY,
requestCode
:
0
,
requestCode
:
0
,
wantAgentFlags
:[
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgentFlags
:[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
}
}
console
.
info
(
'
----getWantAgent before----
'
);
console
.
info
(
'
----getWantAgent before----
'
);
wantAgent
.
getWantAgent
(
agentInfo
).
then
(
wantAgent
.
getWantAgent
(
agentInfo
).
then
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录