提交 97e2fb5d 编写于 作者: Z zhaoyuan17

Update xts code

Signed-off-by: Nzhaoyuan17 <zhaoyuan17@huawei.com>
上级 669a7672
......@@ -10,7 +10,8 @@
{
"test-file-name": [
"ActsParticleAbilityTest.hap",
"ParticleStartAbility.hap"
"ParticleStartAbility.hap",
"amsStDataAbility.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
......
......@@ -17,14 +17,20 @@ import rpc from "@ohos.rpc"
import featureAbility from '@ohos.ability.featureAbility'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index'
const TIMEOUT = 9000;
const START_ABILITY_TIMEOUT = 5000;
const START_ABILITY_TIMEOUT = 4000;
var subscriberInfoStartAbility_0100 = {
events: ["ACTS_Particle_StartAbility_0100_CommonEvent"],
events: ["ACTS_Particle_StartAbility_0100_CommonEvent", "DISCONNECT_0100"],
};
var subscriberInfoStartAbility_0200 = {
events: ["ACTS_Particle_StartAbility_0200_CommonEvent"],
events: ["ACTS_Particle_StartAbility_0200_CommonEvent", "DISCONNECT_0200"],
};
var subscriberInfoAcquireDataHelper_0100 = {
events: ["ACTS_AcquireDataHelper_01001", "DISCONNECT_0300"],
};
var subscriberInfoAcquireDataHelper_0200 = {
events: ["ACTS_AcquireDataHelper_02000", "DISCONNECT_0400"],
};
describe('ActsParticleAbilityTest', function () {
......@@ -42,13 +48,39 @@ describe('ActsParticleAbilityTest', function () {
console.log('ACTS_featureAbilityTest ConnectAbility onConnect remote 是否为proxy:' + (remote instanceof rpc.RemoteProxy));
}
function onDisconnectCallback(element) {
function onDisconnectCallback1(element) {
commonEvent.publish("DISCONNECT_0100", ()=>{console.log('disconnect finish1')});
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.deviceId : ' + element.deviceId)
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.bundleName : ' + element.bundleName)
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.abilityName : ' + element.abilityName)
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.uri : ' + element.uri)
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.shortName : ' + element.shortName)
}
function onDisconnectCallback2(element) {
commonEvent.publish("DISCONNECT_0200", ()=>{console.log('disconnect finish2')});
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.deviceId : ' + element.deviceId)
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.bundleName : ' + element.bundleName)
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.abilityName : ' + element.abilityName)
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.uri : ' + element.uri)
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.shortName : ' + element.shortName)
}
function onDisconnectCallback3(element) {
commonEvent.publish("DISCONNECT_0300", ()=>{console.log('disconnect finish3')});
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.deviceId : ' + element.deviceId)
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.bundleName : ' + element.bundleName)
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.abilityName : ' + element.abilityName)
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.uri : ' + element.uri)
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.shortName : ' + element.shortName)
}
function onDisconnectCallback4(element) {
commonEvent.publish("DISCONNECT_0400", ()=>{console.log('disconnect finish4')});
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.deviceId : ' + element.deviceId)
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.bundleName : ' + element.bundleName)
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.abilityName : ' + element.abilityName)
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.uri : ' + element.uri)
console.log('ACTS_featureAbilityTest ConnectAbility onDisconnect element.shortName : ' + element.shortName)
}
function onFailedCallback(code) {
console.log('ACTS_featureAbilityTest ConnectAbility onFailed errCode : ' + code)
......@@ -65,21 +97,33 @@ describe('ActsParticleAbilityTest', function () {
var subscriber;
let id;
let connId;
let events = new Map();
function subscribeCallBack(err, data) {
console.debug("====>Subscribe CallBack data:====>" + JSON.stringify(data));
events.set(data.event, 0);
if(events.size == 1){
if(data.event != "DISCONNECT_0100"){
clearTimeout(id);
expect(data.event).assertEqual("ACTS_Particle_StartAbility_0100_CommonEvent");
console.debug("====>Subscribe CallBack data:====>" + JSON.stringify(data));
var result = featureAbility.disconnectAbility(
featureAbility.disconnectAbility(
connId,
(error, data) => {
console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data)
},
);
console.log('DisconnectNative ConnectAbility result : ' + result);
} else {
expect(data.event).assertEqual("DISCONNECT_0100");
commonEvent.unsubscribe(subscriber, unSubscribeCallback)
done();
}
} else {
expect(data.event).assertEqual("DISCONNECT_0100");
commonEvent.unsubscribe(subscriber, unSubscribeCallback)
done();
}
}
commonEvent.createSubscriber(subscriberInfoStartAbility_0100).then(async (data) => {
console.debug("====>Create Subscriber====>");
......@@ -89,14 +133,17 @@ describe('ActsParticleAbilityTest', function () {
function unSubscribeCallback() {
console.debug("====>UnSubscribe CallBack====>");
done();
}
function timeout() {
expect().assertFail();
console.debug('ACTS_ParticleAbility_startAbility_0100 timeout');
commonEvent.unsubscribe(subscriber, unSubscribeCallback)
done();
featureAbility.disconnectAbility(
connId,
(error, data) => {
console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data)
},
);
}
id = setTimeout(timeout, START_ABILITY_TIMEOUT);
......@@ -108,14 +155,11 @@ describe('ActsParticleAbilityTest', function () {
},
{
onConnect: onConnectCallback,
onDisconnect: onDisconnectCallback,
onDisconnect: onDisconnectCallback1,
onFailed: onFailedCallback,
},
);
console.log('StartConnectNative ConnectAbility connId : ' + connId);
setTimeout(function () {
console.log('StartConnectNative ConnectAbility timeout')
}, TIMEOUT);
})
/*
......@@ -129,21 +173,32 @@ describe('ActsParticleAbilityTest', function () {
var subscriber;
let id;
let connId;
let events = new Map();
function subscribeCallBack(err, data) {
console.debug("====>Subscribe CallBack data:====>" + JSON.stringify(data));
events.set(data.event, 0);
if(events.size == 1){
if(data.event != "DISCONNECT_0200"){
clearTimeout(id);
expect(data.event).assertEqual("ACTS_Particle_StartAbility_0200_CommonEvent");
console.debug("====>Subscribe CallBack data:====>" + JSON.stringify(data));
var result = featureAbility.disconnectAbility(
featureAbility.disconnectAbility(
connId,
(error, data) => {
console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data)
},
);
console.log('DisconnectNative ConnectAbility result : ' + result);
} else {
expect(data.event).assertEqual("DISCONNECT_0200");
commonEvent.unsubscribe(subscriber, unSubscribeCallback)
done();
}
} else {
expect(data.event).assertEqual("DISCONNECT_0200");
commonEvent.unsubscribe(subscriber, unSubscribeCallback)
done();
}
}
commonEvent.createSubscriber(subscriberInfoStartAbility_0200).then(async (data) => {
console.debug("====>Create Subscriber====>");
......@@ -153,33 +208,186 @@ describe('ActsParticleAbilityTest', function () {
function unSubscribeCallback() {
console.debug("====>UnSubscribe CallBack====>");
done();
}
function timeout() {
expect().assertFail();
console.debug('ACTS_ParticleAbility_startAbility_0200 timeout');
featureAbility.disconnectAbility(
connId,
(error, data) => {
console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data)
},
);
}
id = setTimeout(timeout, START_ABILITY_TIMEOUT);
connId = await featureAbility.connectAbility(
{
bundleName: bundleName,
abilityName: abilityName,
action: "StartAbilityCallback"
},
{
onConnect: onConnectCallback,
onDisconnect: onDisconnectCallback2,
onFailed: onFailedCallback,
},
);
console.log('StartConnectNative ConnectAbility connId : ' + connId);
})
/*
* @tc.number: ACTS_ParticleAbility_acquireDataAbilityHelper_0100
* @tc.name: ConnectAbility : Connects an ability to a Service ability and
* use service to test acquireDataAbilityHelper.
* @tc.desc: Check the event of the interface
*/
it('ACTS_ParticleAbility_acquireDataAbilityHelper_0100', 0, async function (done) {
console.log('ACTS_ParticleAbility_acquireDataAbilityHelper_0100====<begin');
console.log('========StartConnect called');
var subscriber;
let id;
let connId;
let events = new Map();
function subscribeCallBack(err, data) {
console.debug("====>Subscribe CallBack data:====>" + JSON.stringify(data));
events.set(data.event, 0);
if(events.size == 1){
if(data.event != "DISCONNECT_0300"){
clearTimeout(id);
expect(data.event).assertEqual("ACTS_AcquireDataHelper_01001");
featureAbility.disconnectAbility(
connId,
(error, data) => {
console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data)
},
);
} else {
expect(data.event).assertEqual("DISCONNECT_0300");
commonEvent.unsubscribe(subscriber, unSubscribeCallback)
done();
}
} else {
expect(data.event).assertEqual("DISCONNECT_0300");
commonEvent.unsubscribe(subscriber, unSubscribeCallback)
done();
}
}
commonEvent.createSubscriber(subscriberInfoAcquireDataHelper_0100).then(async (data) => {
console.debug("====>Create Subscriber====>");
subscriber = data;
await commonEvent.subscribe(subscriber, subscribeCallBack);
})
function unSubscribeCallback() {
console.debug("====>UnSubscribe CallBack====>");
}
function timeout() {
expect().assertFail();
console.debug('ACTS_ParticleAbility_acquireDataAbilityHelper_0100 timeout');
featureAbility.disconnectAbility(
connId,
(error, data) => {
console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data)
},
);
}
id = setTimeout(timeout, START_ABILITY_TIMEOUT);
connId = await featureAbility.connectAbility(
{
bundleName: bundleName,
abilityName: abilityName,
action: "StartAbilityCallback"
action: "AcquireDataHelper"
},
{
onConnect: onConnectCallback,
onDisconnect: onDisconnectCallback,
onDisconnect: onDisconnectCallback3,
onFailed: onFailedCallback,
},
);
console.log('StartConnectNative ConnectAbility connId : ' + connId);
setTimeout(function () {
console.log('StartConnectNative ConnectAbility timeout')
}, TIMEOUT);
})
/*
* @tc.number: ACTS_ParticleAbility_acquireDataAbilityHelper_0200
* @tc.name: ConnectAbility : Connects an ability to a Service ability and
* use service to test acquireDataAbilityHelper.
* @tc.desc: Check the event of the interface
*/
it('ACTS_ParticleAbility_acquireDataAbilityHelper_0200', 0, async function (done) {
console.log('ACTS_ParticleAbility_acquireDataAbilityHelper_0200====<begin');
console.log('========StartConnect called');
var subscriber;
let id;
let connId;
let events = new Map();
function subscribeCallBack(err, data) {
console.debug("====>Subscribe CallBack data:====>" + JSON.stringify(data));
events.set(data.event, 0);
if(events.size == 1){
if(data.event != "DISCONNECT_0400"){
clearTimeout(id);
expect(data.event).assertEqual("ACTS_AcquireDataHelper_02000");
featureAbility.disconnectAbility(
connId,
(error, data) => {
console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data)
},
);
} else {
expect(data.event).assertEqual("DISCONNECT_0400");
commonEvent.unsubscribe(subscriber, unSubscribeCallback)
done();
}
} else {
expect(data.event).assertEqual("DISCONNECT_0400");
commonEvent.unsubscribe(subscriber, unSubscribeCallback)
done();
}
}
commonEvent.createSubscriber(subscriberInfoAcquireDataHelper_0200).then(async (data) => {
console.debug("====>Create Subscriber====>");
subscriber = data;
await commonEvent.subscribe(subscriber, subscribeCallBack);
})
function unSubscribeCallback() {
console.debug("====>UnSubscribe CallBack====>");
}
function timeout() {
expect().assertFail();
console.debug('ACTS_ParticleAbility_acquireDataAbilityHelper_0200 timeout');
featureAbility.disconnectAbility(
connId,
(error, data) => {
console.log('featureAbilityTest DisconnectAbility result errCode : ' + error.code + " data: " + data)
},
);
}
id = setTimeout(timeout, START_ABILITY_TIMEOUT);
connId = await featureAbility.connectAbility(
{
bundleName: bundleName,
abilityName: abilityName,
action: "AcquireDataHelper_no"
},
{
onConnect: onConnectCallback,
onDisconnect: onDisconnectCallback4,
onFailed: onFailedCallback,
},
);
console.log('StartConnectNative ConnectAbility connId : ' + connId);
})
})
\ No newline at end of file
......@@ -23,33 +23,20 @@ function publishCallBackOne() {
function publishCallBackTwo() {
console.debug("====>Publish CallBack ACTS_Particle_StartAbility_0200_CommonEvent====>");
}
function publishCallBackThree() {
console.debug("====>Publish CallBack ACTS_Particle_StartAbility_0300_CommonEvent====>");
}
function publishCallBackFour() {
console.debug("====>Publish CallBack ACTS_Particle_StartAbility_0400_CommonEvent====>");
}
function publishCallBackFive() {
console.debug("====>Publish CallBack ACTS_Particle_StartAbility_0500_CommonEvent====>");
}
function publishCallBackSix() {
console.debug("====>Publish CallBack ACTS_Particle_StartAbility_0600_CommonEvent====>");
}
export default {
data: {
title: "ParticleStartAbility"
},
onInit() {
this.title = this.data.title;
this.title = "ParticleStartAbility";
},
onShow() {
commonEvent.publish("ACTS_Particle_StartAbility_0100_CommonEvent", publishCallBackOne);
commonEvent.publish("ACTS_Particle_StartAbility_0200_CommonEvent", publishCallBackTwo);
commonEvent.publish("ACTS_Particle_StartAbility_0300_CommonEvent", publishCallBackThree);
commonEvent.publish("ACTS_Particle_StartAbility_0400_CommonEvent", publishCallBackFour);
commonEvent.publish("ACTS_Particle_StartAbility_0500_CommonEvent", publishCallBackFive);
commonEvent.publish("ACTS_Particle_StartAbility_0600_CommonEvent", publishCallBackSix);
},
onReady() {
},
......
......@@ -14,6 +14,7 @@
*/
import rpc from "@ohos.rpc"
import particleAbility from '@ohos.ability.particleability'
import commonEvent from '@ohos.commonevent'
let mMyStub;
let mMyProxy;
......@@ -100,6 +101,42 @@ export default {
}
);
}
if (want.action == "AcquireDataHelper") {
console.log('stub SerivceAbilityServer OnConnect start 3')
let dataAbilityUri = "dataability:///com.ix.VerifyActDataAbility";
const valueBucket = {
"name": "ACTS_AcquireDataHelper",
"age": 221,
"salary": 20.5,
"blobType": "u8",
}
let DAHelper = particleAbility.acquireDataAbilityHelper(dataAbilityUri);
console.log('stub SerivceAbilityServer OnConnect ' + DAHelper + JSON.stringify(DAHelper) + typeof DAHelper)
if (JSON.stringify(DAHelper) != 'null') {
var asyncCallback = DAHelper.insert(dataAbilityUri, valueBucket,
(err, data) => {
console.log("json err【" + JSON.stringify(err) + " 】json data【" + JSON.stringify(data) + " 】;");
commonEvent.publish("ACTS_AcquireDataHelper_0100" + data, err => {
console.log('Publish ACTS_AcquireDataHelper_0100 result: ' + err.code);
});
}
);
}
console.log('stub SerivceAbilityServer OnConnect is null');
}
if (want.action == "AcquireDataHelper_no") {
console.log('stub SerivceAbilityServer OnConnect start 4')
let dataAbilityUri = "";
var DAHelper = particleAbility.acquireDataAbilityHelper(dataAbilityUri);
console.log('stub SerivceAbilityServer OnConnect ' + DAHelper + JSON.stringify(DAHelper) + typeof DAHelper);
if (JSON.stringify(DAHelper) == 'null') {
console.log('stub SerivceAbilityServer OnConnect DAHelper is null')
commonEvent.publish("ACTS_AcquireDataHelper_02000", err => {
console.log('Publish ACTS_AcquireDataHelper_0200 result: ' + err.code)
});
}
console.log('stub SerivceAbilityServer OnConnect end')
}
return mMyStub;
},
onReconnect(want) {
......@@ -112,4 +149,3 @@ export default {
console.log('SerivceAbilityServer onCommand');
},
}
......@@ -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("amsStServiceAilityServer") {
ohos_js_hap_suite("amsStServiceAilityServer") {
hap_profile = "./entry/src/main/config.json"
hap_name = "amsStServiceAilityServer"
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 = "amsStServiceAilityServer"
}
ohos_js_assets("hjs_demo_js_assets") {
source_dir = "./entry/src/main/js/default"
......
......@@ -43,7 +43,6 @@ describe('ActsAnsGetSlotTestCallback', function () {
expect(data.bypassDnd).assertEqual(false);
expect(data.lockscreenVisibility).assertEqual(2);
expect(data.vibrationEnabled).assertEqual(true);
expect(data.sound).assertEqual("");
expect(data.lightEnabled).assertEqual(false);
expect(data.lightColor).assertEqual(0);
console.debug("====>getSlot ActsAnsGetSlotTestCallback_0100 finish====>");
......@@ -78,7 +77,6 @@ describe('ActsAnsGetSlotTestCallback', function () {
expect(data.bypassDnd).assertEqual(false);
expect(data.lockscreenVisibility).assertEqual(2);
expect(data.vibrationEnabled).assertEqual(true);
expect(data.sound).assertEqual("");
expect(data.lightEnabled).assertEqual(false);
expect(data.lightColor).assertEqual(0);
console.debug("====>getSlot ActsAnsGetSlotTestCallback_0200 finish====>");
......@@ -120,7 +118,6 @@ describe('ActsAnsGetSlotTestCallback', function () {
expect(data.bypassDnd).assertEqual(false);
expect(data.lockscreenVisibility).assertEqual(3);
expect(data.vibrationEnabled).assertEqual(false);
expect(data.sound).assertEqual("");
expect(data.lightEnabled).assertEqual(false);
expect(data.lightColor).assertEqual(0);
console.debug("====>getSlot ActsAnsGetSlotTestCallback_0300 finish====>");
......@@ -162,7 +159,6 @@ describe('ActsAnsGetSlotTestCallback', function () {
expect(data.bypassDnd).assertEqual(false);
expect(data.lockscreenVisibility).assertEqual(3);
expect(data.vibrationEnabled).assertEqual(false);
expect(data.sound).assertEqual("");
expect(data.lightEnabled).assertEqual(false);
expect(data.lightColor).assertEqual(0);
console.debug("====>getSlotActsAnsGetSlotTestCallback_0400 finish====>");
......@@ -204,7 +200,6 @@ describe('ActsAnsGetSlotTestCallback', function () {
expect(data.bypassDnd).assertEqual(false);
expect(data.lockscreenVisibility).assertEqual(3);
expect(data.vibrationEnabled).assertEqual(false);
expect(data.sound).assertEqual("");
expect(data.lightEnabled).assertEqual(false);
expect(data.lightColor).assertEqual(0);
console.debug("====>getSlot ActsAnsGetSlotTestCallback_0500 finish====>");
......
......@@ -45,7 +45,6 @@ describe('ActsAnsGetSlotTestPromise', function () {
expect(data.bypassDnd).assertEqual(false);
expect(data.lockscreenVisibility).assertEqual(2);
expect(data.vibrationEnabled).assertEqual(true);
expect(data.sound).assertEqual("");
expect(data.lightEnabled).assertEqual(false);
expect(data.lightColor).assertEqual(0);
console.debug("====>getSlot ActsAnsGetSlotTestPromise_0100 finish====>");
......@@ -88,7 +87,6 @@ describe('ActsAnsGetSlotTestPromise', function () {
expect(data.bypassDnd).assertEqual(false);
expect(data.lockscreenVisibility).assertEqual(2);
expect(data.vibrationEnabled).assertEqual(true);
expect(data.sound).assertEqual("");
expect(data.lightEnabled).assertEqual(false);
expect(data.lightColor).assertEqual(0);
console.debug("====>getSlot Promise SERVICE_INFORMATION ActsAnsGetSlotTestPromise_0200 finish====>");
......@@ -131,7 +129,6 @@ describe('ActsAnsGetSlotTestPromise', function () {
expect(data.bypassDnd).assertEqual(false);
expect(data.lockscreenVisibility).assertEqual(3);
expect(data.vibrationEnabled).assertEqual(false);
expect(data.sound).assertEqual("");
expect(data.lightEnabled).assertEqual(false);
expect(data.lightColor).assertEqual(0);
console.debug("====>getSlot Promise CONTENT_INFORMATION ActsAnsGetSlotTestPromise_0300 finish====>");
......@@ -174,7 +171,6 @@ describe('ActsAnsGetSlotTestPromise', function () {
expect(data.bypassDnd).assertEqual(false);
expect(data.lockscreenVisibility).assertEqual(3);
expect(data.vibrationEnabled).assertEqual(false);
expect(data.sound).assertEqual("");
expect(data.lightEnabled).assertEqual(false);
expect(data.lightColor).assertEqual(0);
console.debug("====>getSlot Promise OTHER_TYPES ActsAnsGetSlotTestPromise_0400 finish====>");
......@@ -217,7 +213,6 @@ describe('ActsAnsGetSlotTestPromise', function () {
expect(data.bypassDnd).assertEqual(false);
expect(data.lockscreenVisibility).assertEqual(3);
expect(data.vibrationEnabled).assertEqual(false);
expect(data.sound).assertEqual("");
expect(data.lightEnabled).assertEqual(false);
expect(data.lightColor).assertEqual(0);
console.debug("====>getSlotPromise UNKNOWN_TYPE ActsAnsGetSlotTestPromise_0500 finish====>");
......
......@@ -38,7 +38,6 @@ describe('ActsAnsRemoveSlotTest', function () {
expect(data.bypassDnd).assertEqual(false);
expect(data.lockscreenVisibility).assertEqual(2);
expect(data.vibrationEnabled).assertEqual(true);
expect(data.sound).assertEqual("");
expect(data.lightEnabled).assertEqual(false);
expect(data.lightColor).assertEqual(0);
console.debug("====>getSlot ActsAnsRemoveSlotTest_0100 finish====>");
......@@ -83,7 +82,6 @@ describe('ActsAnsRemoveSlotTest', function () {
expect(data.bypassDnd).assertEqual(false);
expect(data.lockscreenVisibility).assertEqual(2);
expect(data.vibrationEnabled).assertEqual(true);
expect(data.sound).assertEqual("");
expect(data.lightEnabled).assertEqual(false);
expect(data.lightColor).assertEqual(0);
console.debug("====>getSlot ActsAnsRemoveSlotTest_0200 finish====>");
......
......@@ -28,8 +28,8 @@ var idRecord = new Array(20).fill(0);
const publishFrequence = 10;
const TIMEOUT = 3000;
function consumeCallback(err,data) {
console.debug("====>consumeCallback err: ====>" + JSON.stringify(err));
function consumeCallback(data) {
console.debug("====>consumeCallback data: ====>" + JSON.stringify(data));
console.debug("====>consumeCallback id: ====>" + data.request.id);
switch(data.request.id){
case 1:
......@@ -120,9 +120,8 @@ function consumeCallback(err,data) {
}
}
function subscribeOnCallback(err) {
console.debug("====>subscribeOnCallback err: ====>" + JSON.stringify(err));
expect(err.code).assertEqual(0);
function subscribeOnCallback() {
console.debug("====>subscribeOnCallback enter====>");
}
function subscribeCallback(err) {
......@@ -193,7 +192,8 @@ describe('ActsAnsPublishControlTest', function () {
/*
* @tc.number : ActsAnsPublishControlTest_0100
* @tc.name : Verify rejection of publishing notifications that exceed the threshold
* @tc.desc : Twenty notifications are published continuously within one second, and the first ten notifications can be received, the last ten notifications cannot be received
* @tc.desc : Twenty notifications are published continuously within one second, and the first
* ten notifications can be received, the last ten notifications cannot be received
*/
it('ActsAnsPublishControlTest_0100', 0, async function (done) {
console.debug("====>ActsAnsPublishControlTest_0100 start====>");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册