未验证 提交 22dbef13 编写于 作者: O openharmony_ci 提交者: Gitee

!9390 增加statistic接口用例

Merge pull request !9390 from 高曦/master
/** /**
* Copyright (c) 2021-2022 Huawei Device Co., Ltd. * Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
...@@ -19,6 +19,7 @@ import requestMethodJsunit from './RequestMethodJsunit.test'; ...@@ -19,6 +19,7 @@ import requestMethodJsunit from './RequestMethodJsunit.test';
import httpResponseJsunit from './HttpResponseJsunit.test'; import httpResponseJsunit from './HttpResponseJsunit.test';
import HttpRequestOptionsJsunit from './HttpRequestOptionsJsunit.test'; import HttpRequestOptionsJsunit from './HttpRequestOptionsJsunit.test';
import httpRequestJsunit from './HttpRequestJsunit.test'; import httpRequestJsunit from './HttpRequestJsunit.test';
import StatisticsTest from './StatisticsTest.test';
export default function testsuite() { export default function testsuite() {
httpJsunit(); httpJsunit();
...@@ -27,4 +28,5 @@ export default function testsuite() { ...@@ -27,4 +28,5 @@ export default function testsuite() {
httpResponseJsunit(); httpResponseJsunit();
HttpRequestOptionsJsunit(); HttpRequestOptionsJsunit();
httpRequestJsunit(); httpRequestJsunit();
StatisticsTest();
} }
\ No newline at end of file
...@@ -235,11 +235,7 @@ describe('ActsNetworkSearchTest', function () { ...@@ -235,11 +235,7 @@ describe('ActsNetworkSearchTest', function () {
} }
done(); done();
}); });
/** /**
* @tc.number Telephony_NetworkSearch_getNetworkState_Promise_0700 * @tc.number Telephony_NetworkSearch_getNetworkState_Promise_0700
* @tc.name SlotId parameter input is -1, test getNetworkState() query function go to the error * @tc.name SlotId parameter input is -1, test getNetworkState() query function go to the error
...@@ -441,26 +437,6 @@ describe('ActsNetworkSearchTest', function () { ...@@ -441,26 +437,6 @@ describe('ActsNetworkSearchTest', function () {
} }
}); });
/**
* @tc.number Telephony_StateRegistry_on_0200
* @tc.name Add a networkStatus change listen and test observer.on({slotId:0}) to view the callback results
* @tc.desc Function test
*/
it('Telephony_StateRegistry_on_0200', 0, async function (done) {
try {
observer.on('networkStateChange', {
slotId: 0
}, NetworkState => {
console.log("on networkStateChange, NetworkState:" + JSON.stringify(NetworkState));
expect(typeof NetworkState === undefined).assertFalse();
});
done();
} catch (error) {
expect(false).assertTrue();
done();
}
});
/** /**
* @tc.number Telephony_StateRegistry_off_0200 * @tc.number Telephony_StateRegistry_off_0200
* @tc.name Add a networkStatus change listen and test observer.off() to view the callback results * @tc.name Add a networkStatus change listen and test observer.off() to view the callback results
...@@ -483,26 +459,6 @@ describe('ActsNetworkSearchTest', function () { ...@@ -483,26 +459,6 @@ describe('ActsNetworkSearchTest', function () {
} }
}); });
/**
* @tc.number Telephony_StateRegistry_on_0300
* @tc.name Add a networkStatus change listen and test observer.on({slotId:0}) to view the callback results
* @tc.desc Function test
*/
it('Telephony_StateRegistry_on_0300', 0, async function (done) {
try {
observer.on('signalInfoChange', {
slotId: 0
}, SignalInformation => {
console.log("on signalInfoChange, SignalInformation:" + JSON.stringify(SignalInformation));
expect(typeof SignalInformation === undefined).assertFalse();
});
done();
} catch (error) {
expect(false).assertTrue();
done();
}
});
/** /**
* @tc.number Telephony_StateRegistry_off_0300 * @tc.number Telephony_StateRegistry_off_0300
* @tc.name Add a networkStatus change listen and test observer.off() to view the callback results * @tc.name Add a networkStatus change listen and test observer.off() to view the callback results
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册