未验证 提交 0d9f482e 编写于 作者: O openharmony_ci 提交者: Gitee

!6837 电话用例整改.p7b

Merge pull request !6837 from zhangfuzhi/monthly_20221018
......@@ -15,6 +15,15 @@
],
"type": "AppInstallKit",
"cleanup-apps": true
},
{
"type": "ShellKit",
"run-command": [
"power-shell wakeup",
"power-shell setmode 602",
"uinput -T -m 200 1000 200 200 200",
"param set persist.ace.testmode.enabled 1"
]
}
]
}
......@@ -19,8 +19,8 @@
"mainAbility": ".MainAbility",
"srcPath":"",
"deviceType": [
"tablet",
"default",
"tablet",
"default",
"phone"
],
"distro": {
......@@ -67,53 +67,13 @@
}
],
"reqPermissions": [
{
"name": "ohos.permission.LOCATION",
"reason": "need use ohos.permission.LOCATION"
},
{
"name":"ohos.permission.SET_TELEPHONY_STATE",
"reason":"need use ohos.permission.SET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.GET_TELEPHONY_STATE",
"reason":"need use ohos.permission.GET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.PLACE_CALL",
"reason":"need use ohos.permission.PLACE_CALL"
},
{
"name":"ohos.permission.READ_CONTACTS",
"reason":"need use ohos.permission.READ_CONTACTS"
},
{
"name":"ohos.permission.WRITE_CONTACTS",
"reason":"need use ohos.permission.WRITE_CONTACTS"
},
{
"name":"ohos.permission.SEND_MESSAGES",
"reason":"need use ohos.permission.SEND_MESSAGES"
},
{
"name":"ohos.permission.RECEIVE_SMS",
"reason":"need use ohos.permission.RECEIVE_SMS"
},
{
"name":"ohos.permission.READ_CALL_LOG",
"reason":"need use ohos.permission.READ_CALL_LOG"
},
{
"name":"ohos.permission.GET_NETWORK_INFO",
"reason":"need use ohos.permission.GET_NETWORK_INFO"
},
{
"name":"ohos.permission.INTERNET",
"reason":"need use ohos.permission.INTERNET"
},
{
"name":"ohos.permission.GRANT_SENSITIVE_PERMISSIONS",
"reason":"need use ohos.permission.GRANT_SENSITIVE_PERMISSIONS"
"name":"ohos.permission.READ_CONTACTS",
"reason":"need use ohos.permission.READ_CONTACTS"
}
],
"js": [
......
......@@ -19,74 +19,27 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
import {
AUTO_ACCEPT_NUMBER,
AUTO_ACCEPT_NUMBER2,
PHONE_NUMBER_LENGTH_11,
CALL_STATUS_DIALING,
CALL_ID_NOT_EXIST,
CALL_STATE_UNKNOWN,
CALL_STATE_IDLE,
DEFAULT_SLOT_ID,
CALL_MODE_IMS,
SLOT_ID_INVALID,
PHONE_LIST2,
RTT_MSG,
CALL_MODE_SEND_RECEIVE,
POS_700,
POS_10,
POS_LENGTH_300,
POS_LENGTH_600,
DEVICE_EARPIECE,
BOUNDARY_NUMBER_INT,
SENT_STRING_C,
MINUS_VALUE,
PHONE_NUMBER_LONG,
NULL_PHONE_NUMBER,
DIAL_CARRIER_TYPE,
DIAL_SCENCE_CALL_PRIVILEGED,
MEDIA_TYPE_VOICE,
ROTATION_MINUS_1,
IMAGE_LOCAL_ERROR_PATH,
POS_Z_ERROR,
RESTRICTION_TYPE_ROAMING_INCOMING,
RESTRICTION_MODE_ACTIVATION,
RIGHT_PASSWORD,
RESTRICTION_TYPE_ALL_INCOMING,
TRANSFER_TYPE_NOT_REACHABLE,
TRANSFER_TYPE_UNCONDITIONAL,
PHONE_NUMBER_AREA_LAND,
CALL_TRANSFER_DISABLE,
TRANSFER_TYPE_NO_REPLY,
COMMAND_CALL_ERROR4,
COMMAND_CALL_ERROR,
CARMER_ID_NOT_EXIT,
ZOOM_RATIO_MINUS_1_0,
DIAL_SCENCE_CALL_NORMAL,
DIAL_TYPE_OTT,
EVENT_OTT_FUNCTION_UNSUPPORTED,
TEL_CONFERENCE_IDLE
} from './lib/Const.js';
import {toString} from './lib/ApiToPromise.js';
import {
scenceInCalling,
hangupCall2,
hangupCall,
callDetailsChangeOn,
callId as gloabCallId,
reachState,
callDetailsChangeOff,
reachCallEventState
callDetailsChangeOff
} from './lib/ScenceInCalling.js';
const GETMAIN_CALLID_ERRO = -1;
const REJECT_MESSAGE_STR = 'Hi,hello?';
const REJECT_MESSAGE_NUM = 1234567890123456789012345678901234567890;
const ERR_SLOT_ID = -1;
const SLOTID = 0;
const THE_THREE_NUMBER = '112';
const DIAL_TYPE_ERR_CALL = 3;
const TIME_OUT = 20000;
const WAITING_TIME = 200;
const ERR_SLOT_ID = -1;
var callState = -1;
var timing = 0;
var endTime = 0;
let callId = null;
class RejectMessageOptions {
constructor (str) {
this.messageContent = str;
......@@ -126,9 +79,7 @@ const sleep = (time) => {
});
};
var callState = -1;
var timing = 0;
var endTime = 0;
export default function CallManageImsCall() {
describe('CallManageImsCall', function () {
......
......@@ -16,6 +16,6 @@ import CallManageImsCall from './CallManageAll.test.js'
import ObjectInterfaceTest from './ObjectInterface_test.js'
export default function testsuite() {
CallManageImsCall()
ObjectInterfaceTest()
ObjectInterfaceTest();
CallManageImsCall();
}
......@@ -19,8 +19,8 @@
"mainAbility": ".MainAbility",
"srcPath":"",
"deviceType": [
"tablet",
"default",
"tablet",
"default",
"phone"
],
"distro": {
......@@ -67,47 +67,11 @@
}
],
"reqPermissions": [
{
"name": "ohos.permission.LOCATION",
"reason": "need use ohos.permission.LOCATION"
},
{
"name":"ohos.permission.SET_TELEPHONY_STATE",
"reason":"need use ohos.permission.SET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.GET_TELEPHONY_STATE",
"reason":"need use ohos.permission.GET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.PLACE_CALL",
"reason":"need use ohos.permission.PLACE_CALL"
},
{
"name":"ohos.permission.READ_CONTACTS",
"reason":"need use ohos.permission.READ_CONTACTS"
},
{
"name":"ohos.permission.WRITE_CONTACTS",
"reason":"need use ohos.permission.WRITE_CONTACTS"
},
{
"name":"ohos.permission.SEND_MESSAGES",
"reason":"need use ohos.permission.SEND_MESSAGES"
},
{
"name":"ohos.permission.RECEIVE_SMS",
"reason":"need use ohos.permission.RECEIVE_SMS"
},
{
"name":"ohos.permission.READ_CALL_LOG",
"reason":"need use ohos.permission.READ_CALL_LOG"
},
{
{
"name":"ohos.permission.GET_NETWORK_INFO",
"reason":"need use ohos.permission.GET_NETWORK_INFO"
},
{
{
"name":"ohos.permission.INTERNET",
"reason":"need use ohos.permission.INTERNET"
}
......
......@@ -209,7 +209,5 @@ describe("ActsCellularDataAbnormalTest", function () {
expect(data == 0 || data == 1).assertTrue;
done();
});
})
});
}
......@@ -19,8 +19,8 @@
"mainAbility": ".MainAbility",
"srcPath":"",
"deviceType": [
"tablet",
"default",
"tablet",
"default",
"phone"
],
"distro": {
......
......@@ -6,7 +6,7 @@
"bundle-name": "com.ohos.jshttp",
"package-name": "com.ohos.jshttp",
"shell-timeout": "900000",
"testcase-timeout":"100000"
"testcase-timeout":"200000"
},
"kits": [
{
......
......@@ -12,12 +12,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import Telephony_NETSTACK_HTTPTest from './NetworkManagerHttp.test.js'
import Http2Test from './Http2Test.js'
import HttpCacheTest from './HttpCacheTest.js'
import Telephony_NETSTACK_HTTPTest from './NetworkManagerHttp.test.js';
import Http2Test from './Http2Test.js';
import HttpCacheTest from './HttpCacheTest.js';
export default function testsuite() {
Telephony_NETSTACK_HTTPTest()
Http2Test()
HttpCacheTest()
HttpCacheTest();
Telephony_NETSTACK_HTTPTest();
Http2Test();
}
......@@ -16,8 +16,8 @@
"module": {
"mainAbility": ".MainAbility",
"deviceType": [
"tablet",
"default",
"tablet",
"default",
"phone"
],
"abilities": [
......
......@@ -16,8 +16,8 @@
"module": {
"mainAbility": ".MainAbility",
"deviceType": [
"tablet",
"default",
"tablet",
"default",
"phone"
],
"abilities": [
......
......@@ -16,8 +16,8 @@
"module": {
"mainAbility": ".MainAbility",
"deviceType": [
"tablet",
"default",
"tablet",
"default",
"phone"
],
"abilities": [
......
......@@ -19,8 +19,8 @@
"mainAbility": ".MainAbility",
"srcPath":"",
"deviceType": [
"tablet",
"default",
"tablet",
"default",
"phone"
],
"distro": {
......@@ -66,48 +66,12 @@
"launchType": "standard"
}
],
"reqPermissions": [
{
"name": "ohos.permission.LOCATION",
"reason": "need use ohos.permission.LOCATION"
},
{
"name":"ohos.permission.SET_TELEPHONY_STATE",
"reason":"need use ohos.permission.SET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.GET_TELEPHONY_STATE",
"reason":"need use ohos.permission.GET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.PLACE_CALL",
"reason":"need use ohos.permission.PLACE_CALL"
},
{
"name":"ohos.permission.READ_CONTACTS",
"reason":"need use ohos.permission.READ_CONTACTS"
},
{
"name":"ohos.permission.WRITE_CONTACTS",
"reason":"need use ohos.permission.WRITE_CONTACTS"
},
{
"name":"ohos.permission.SEND_MESSAGES",
"reason":"need use ohos.permission.SEND_MESSAGES"
},
{
"name":"ohos.permission.RECEIVE_SMS",
"reason":"need use ohos.permission.RECEIVE_SMS"
},
{
"name":"ohos.permission.READ_CALL_LOG",
"reason":"need use ohos.permission.READ_CALL_LOG"
},
{
"reqPermissions": [
{
"name":"ohos.permission.GET_NETWORK_INFO",
"reason":"need use ohos.permission.GET_NETWORK_INFO"
},
{
{
"name":"ohos.permission.INTERNET",
"reason":"need use ohos.permission.INTERNET"
}
......
......@@ -19,8 +19,8 @@
"mainAbility": ".MainAbility",
"srcPath":"",
"deviceType": [
"tablet",
"default",
"tablet",
"default",
"phone"
],
"distro": {
......@@ -66,48 +66,12 @@
"launchType": "standard"
}
],
"reqPermissions": [
{
"name": "ohos.permission.LOCATION",
"reason": "need use ohos.permission.LOCATION"
},
{
"name":"ohos.permission.SET_TELEPHONY_STATE",
"reason":"need use ohos.permission.SET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.GET_TELEPHONY_STATE",
"reason":"need use ohos.permission.GET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.PLACE_CALL",
"reason":"need use ohos.permission.PLACE_CALL"
},
{
"name":"ohos.permission.READ_CONTACTS",
"reason":"need use ohos.permission.READ_CONTACTS"
},
{
"name":"ohos.permission.WRITE_CONTACTS",
"reason":"need use ohos.permission.WRITE_CONTACTS"
},
{
"name":"ohos.permission.SEND_MESSAGES",
"reason":"need use ohos.permission.SEND_MESSAGES"
},
{
"name":"ohos.permission.RECEIVE_SMS",
"reason":"need use ohos.permission.RECEIVE_SMS"
},
{
"name":"ohos.permission.READ_CALL_LOG",
"reason":"need use ohos.permission.READ_CALL_LOG"
},
{
"reqPermissions": [
{
"name":"ohos.permission.GET_NETWORK_INFO",
"reason":"need use ohos.permission.GET_NETWORK_INFO"
},
{
{
"name":"ohos.permission.INTERNET",
"reason":"need use ohos.permission.INTERNET"
}
......
......@@ -18,8 +18,8 @@
"mainAbility": ".MainAbility",
"srcPath":"",
"deviceType": [
"tablet",
"default",
"tablet",
"default",
"phone",
"tablet"
],
......
......@@ -19,8 +19,8 @@
"mainAbility": ".MainAbility",
"srcPath": "",
"deviceType": [
"tablet",
"default",
"tablet",
"default",
"phone"
],
"distro": {
......@@ -68,47 +68,11 @@
}
],
"reqPermissions": [
{
"name": "ohos.permission.LOCATION",
"reason": "need use ohos.permission.LOCATION"
},
{
"name":"ohos.permission.SET_TELEPHONY_STATE",
"reason":"need use ohos.permission.SET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.GET_TELEPHONY_STATE",
"reason":"need use ohos.permission.GET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.PLACE_CALL",
"reason":"need use ohos.permission.PLACE_CALL"
},
{
"name":"ohos.permission.READ_CONTACTS",
"reason":"need use ohos.permission.READ_CONTACTS"
},
{
"name":"ohos.permission.WRITE_CONTACTS",
"reason":"need use ohos.permission.WRITE_CONTACTS"
},
{
"name":"ohos.permission.SEND_MESSAGES",
"reason":"need use ohos.permission.SEND_MESSAGES"
},
{
"name":"ohos.permission.RECEIVE_SMS",
"reason":"need use ohos.permission.RECEIVE_SMS"
},
{
"name":"ohos.permission.READ_CALL_LOG",
"reason":"need use ohos.permission.READ_CALL_LOG"
},
{
{
"name":"ohos.permission.GET_NETWORK_INFO",
"reason":"need use ohos.permission.GET_NETWORK_INFO"
},
{
{
"name":"ohos.permission.INTERNET",
"reason":"need use ohos.permission.INTERNET"
}
......
......@@ -19,8 +19,8 @@
"mainAbility": ".MainAbility",
"srcPath": "",
"deviceType": [
"tablet",
"default",
"tablet",
"default",
"phone"
],
"distro": {
......@@ -72,43 +72,11 @@
"name": "ohos.permission.LOCATION",
"reason": "need use ohos.permission.LOCATION"
},
{
"name":"ohos.permission.SET_TELEPHONY_STATE",
"reason":"need use ohos.permission.SET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.GET_TELEPHONY_STATE",
"reason":"need use ohos.permission.GET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.PLACE_CALL",
"reason":"need use ohos.permission.PLACE_CALL"
},
{
"name":"ohos.permission.READ_CONTACTS",
"reason":"need use ohos.permission.READ_CONTACTS"
},
{
"name":"ohos.permission.WRITE_CONTACTS",
"reason":"need use ohos.permission.WRITE_CONTACTS"
},
{
"name":"ohos.permission.SEND_MESSAGES",
"reason":"need use ohos.permission.SEND_MESSAGES"
},
{
"name":"ohos.permission.RECEIVE_SMS",
"reason":"need use ohos.permission.RECEIVE_SMS"
},
{
"name":"ohos.permission.READ_CALL_LOG",
"reason":"need use ohos.permission.READ_CALL_LOG"
},
{
{
"name":"ohos.permission.GET_NETWORK_INFO",
"reason":"need use ohos.permission.GET_NETWORK_INFO"
},
{
{
"name":"ohos.permission.INTERNET",
"reason":"need use ohos.permission.INTERNET"
}
......
......@@ -19,8 +19,8 @@
"mainAbility": ".MainAbility",
"srcPath":"",
"deviceType": [
"tablet",
"default",
"tablet",
"default",
"phone"
],
"distro": {
......@@ -67,47 +67,11 @@
}
],
"reqPermissions": [
{
"name": "ohos.permission.LOCATION",
"reason": "need use ohos.permission.LOCATION"
},
{
"name":"ohos.permission.SET_TELEPHONY_STATE",
"reason":"need use ohos.permission.SET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.GET_TELEPHONY_STATE",
"reason":"need use ohos.permission.GET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.PLACE_CALL",
"reason":"need use ohos.permission.PLACE_CALL"
},
{
"name":"ohos.permission.READ_CONTACTS",
"reason":"need use ohos.permission.READ_CONTACTS"
},
{
"name":"ohos.permission.WRITE_CONTACTS",
"reason":"need use ohos.permission.WRITE_CONTACTS"
},
{
"name":"ohos.permission.SEND_MESSAGES",
"reason":"need use ohos.permission.SEND_MESSAGES"
},
{
"name":"ohos.permission.RECEIVE_SMS",
"reason":"need use ohos.permission.RECEIVE_SMS"
},
{
"name":"ohos.permission.READ_CALL_LOG",
"reason":"need use ohos.permission.READ_CALL_LOG"
},
{
{
"name":"ohos.permission.GET_NETWORK_INFO",
"reason":"need use ohos.permission.GET_NETWORK_INFO"
},
{
{
"name":"ohos.permission.INTERNET",
"reason":"need use ohos.permission.INTERNET"
}
......
......@@ -22,7 +22,6 @@ describe('ActsNetworkSearchTest', function () {
const SLOT_0 = 0;
const SLOT_2 = -1;
const PREFERRED_MODE_ERR2 = -1;
function sleep(timeout) {
return new Promise((resolve, reject) => {
......@@ -87,10 +86,6 @@ describe('ActsNetworkSearchTest', function () {
expect(radio.NsaState.NSA_STATE_DUAL_CONNECTED === 5).assertTrue();
expect(radio.NsaState.NSA_STATE_SA_ATTACHED === 6).assertTrue();
expect(radio.NetworkInformationState.NETWORK_UNKNOWN === 0).assertTrue();
expect(radio.NetworkInformationState.NETWORK_CURRENT === 2).assertTrue();
expect(radio.NetworkInformationState.NETWORK_FORBIDDEN === 3).assertTrue();
expect(radio.NetworkSelectionMode.NETWORK_SELECTION_UNKNOWN === 0).assertTrue();
expect(radio.NetworkSelectionMode.NETWORK_SELECTION_MANUAL === 2).assertTrue();
} catch (error) {
......@@ -195,13 +190,13 @@ describe('ActsNetworkSearchTest', function () {
console.info(
`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400 finish data:${JSON.stringify(data)}`);
expect(data.length === 0).assertTrue();
done();
} catch (err) {
console.info(`Telephony_NetworkSearch_getISOCountryCodeForNetwork_Promise_0400 fail err: ${err}`);
expect(err.code).assertEqual(202);
done();
return;
}
done();
});
/**
......@@ -292,13 +287,13 @@ describe('ActsNetworkSearchTest', function () {
console.info(
`Telephony_NetworkSearch_getSignalInformation_Promise_0400 finish data: ${JSON.stringify(data)}`);
expect(data.length === 0).assertTrue();
done();
} catch (err) {
console.info(`Telephony_NetworkSearch_getSignalInformation_Promise_0400 fail err: ${err}`);
expect(err.code).assertEqual(202);
done();
return;
}
done();
});
/**
......
......@@ -68,7 +68,7 @@
}
],
"reqPermissions": [
{
{
"name":"ohos.permission.GET_NETWORK_INFO",
"reason":"need use ohos.permission.GET_NETWORK_INFO"
}
......
......@@ -19,8 +19,8 @@
"mainAbility": ".MainAbility",
"srcPath": "",
"deviceType": [
"tablet",
"default",
"tablet",
"default",
"phone"
],
"distro": {
......@@ -68,49 +68,9 @@
}
],
"reqPermissions": [
{
"name": "ohos.permission.LOCATION",
"reason": "need use ohos.permission.LOCATION"
},
{
"name":"ohos.permission.SET_TELEPHONY_STATE",
"reason":"need use ohos.permission.SET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.GET_TELEPHONY_STATE",
"reason":"need use ohos.permission.GET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.PLACE_CALL",
"reason":"need use ohos.permission.PLACE_CALL"
},
{
"name":"ohos.permission.READ_CONTACTS",
"reason":"need use ohos.permission.READ_CONTACTS"
},
{
"name":"ohos.permission.WRITE_CONTACTS",
"reason":"need use ohos.permission.WRITE_CONTACTS"
},
{
"name":"ohos.permission.SEND_MESSAGES",
"reason":"need use ohos.permission.SEND_MESSAGES"
},
{
"name":"ohos.permission.RECEIVE_SMS",
"reason":"need use ohos.permission.RECEIVE_SMS"
},
{
"name":"ohos.permission.READ_CALL_LOG",
"reason":"need use ohos.permission.READ_CALL_LOG"
},
{
{
"name":"ohos.permission.GET_NETWORK_INFO",
"reason":"need use ohos.permission.GET_NETWORK_INFO"
},
{
"name":"ohos.permission.INTERNET",
"reason":"need use ohos.permission.INTERNET"
}
],
"js": [
......
......@@ -21,8 +21,7 @@ export function toString(data) {
} else {
return data;
}
}
;
};
export default function callJsunit() {
describe('callTest', function () {
......@@ -46,118 +45,6 @@ export default function callJsunit() {
done();
});
/**
* @tc.number Telephony_Call_CallTransferInfo_Type
* @tc.name Interface CallTransferInfo
* @tc.desc Interface value test
*/
it('Telephony_Call_CallTransferInfo_Type', 0, function (done) {
let caseName = 'Telephony_Call_CallTransferInfo_Type';
console.log(`==========> ${caseName} Test start ==========>`);
let callTransferInfo = {
transferNum: '10000000001', type: 2, settingType: 1
};
expect(callTransferInfo.type === 2).assertTrue();
console.log(`==========> ${caseName} Test end ==========>`);
done();
});
/**
* @tc.number Telephony_Call_CallTransferResult_Status
* @tc.name Interface CallTransferResult
* @tc.desc Interface value test
*/
it('Telephony_Call_CallTransferResult_Status', 0, function (done) {
let caseName = 'Telephony_Call_CallTransferResult_Status';
console.log(`==========> ${caseName} Test start ==========>`);
let callTransferResult = {
status: 0, number: '10000000001'
};
expect(callTransferResult.status === 0).assertTrue();
console.log(`==========> ${caseName} Test end ==========>`);
done();
});
/**
* @tc.number Telephony_Call_CallTransferResult_Number
* @tc.name Interface CallTransferResult
* @tc.desc Interface value test
*/
it('Telephony_Call_CallTransferResult_Number', 0, function (done) {
let caseName = 'Telephony_Call_CallTransferResult_Number';
console.log(`==========> ${caseName} Test start ==========>`);
let callTransferResult = {
status: 0, number: '10000000001'
};
expect(callTransferResult.number === '10000000001').assertTrue();
console.log(`==========> ${caseName} Test end ==========>`);
done();
});
/**
* @tc.number Telephony_Call_CallAttributeOptions_CallId
* @tc.name Interface CallAttributeOptions
* @tc.desc Interface value test
*/
it('Telephony_Call_CallAttributeOptions_CallId', 0, function (done) {
let caseName = 'Telephony_Call_CallAttributeOptions_CallId';
console.log(`==========> ${caseName} Test start ==========>`);
let callAttributeOptions = {
callId: 1
};
expect(callAttributeOptions.callId === 1).assertTrue();
console.log(`==========> ${caseName} Test end ==========>`);
done();
});
/**
* @tc.number Telephony_Call_CallRestrictionInfo_Type
* @tc.name Interface CallRestrictionInfo
* @tc.desc Interface value test
*/
it('Telephony_Call_CallRestrictionInfo_Type', 0, function (done) {
let caseName = 'Telephony_Call_CallRestrictionInfo_Type';
console.log(`==========> ${caseName} Test start ==========>`);
let callRestrictionInfo = {
type: 0, password: '123456', mode: 1
};
expect(callRestrictionInfo.type === 0).assertTrue();
console.log(`==========> ${caseName} Test end ==========>`);
done();
});
/**
* @tc.number Telephony_Call_CallRestrictionInfo_Mode
* @tc.name Interface CallRestrictionInfo
* @tc.desc Interface value test
*/
it('Telephony_Call_CallRestrictionInfo_Mode', 0, function (done) {
let caseName = 'Telephony_Call_CallRestrictionInfo_Mode';
console.log(`==========> ${caseName} Test start ==========>`);
let callRestrictionInfo = {
type: 0, password: '123456', mode: 1
};
expect(callRestrictionInfo.mode === 1).assertTrue();
console.log(`==========> ${caseName} Test end ==========>`);
done();
});
/**
* @tc.number Telephony_Call_CallEventOptions_EventId
* @tc.name Interface CallEventOptions
* @tc.desc Interface value test
*/
it('Telephony_Call_CallEventOptions_EventId', 0, function (done) {
let caseName = 'Telephony_Call_CallEventOptions_EventId';
console.log(`==========> ${caseName} Test start ==========>`);
let callEventOptions = {
eventId: 1
};
expect(callEventOptions.eventId === 1).assertTrue();
console.log(`==========> ${caseName} Test end ==========>`);
done();
});
/**
* @tc.number Telephony_Call_Call_MakeCall_0100
* @tc.name Make a call.
......
......@@ -137,27 +137,6 @@ export default function radioSecondJsunit() {
}
})
/**
* @tc.number Telephony_Radio_CdmaCellInformation_sid_0100
* @tc.name sid
* @tc.desc sid test
*/
it('Telephony_Radio_CdmaCellInformation_sid_0100', 0, async function (done) {
console.log("-----------------------Telephony_Radio_CdmaCellInformation_sid_0100 start-----------------------");
let cdmaCellInformation = {
baseId: 1,
latitude: 39,
longitude: 116,
nid: 101,
sid: 102
};
expect(101).assertEqual(cdmaCellInformation.nid);
expect(102).assertEqual(cdmaCellInformation.sid);
done();
console.log("-----------------------Telephony_Radio_CdmaCellInformation_sid_0100 end-----------------------");
})
/**
* @tc.number Telephony_NetworkSearch_getRadioTech_Async_0500
* @tc.name TestGetRadioTech_0500
......
......@@ -19,8 +19,8 @@
"mainAbility": ".MainAbility",
"srcPath":"",
"deviceType": [
"tablet",
"default",
"tablet",
"default",
"phone"
],
"distro": {
......@@ -66,52 +66,6 @@
"launchType": "standard"
}
],
"reqPermissions": [
{
"name": "ohos.permission.LOCATION",
"reason": "need use ohos.permission.LOCATION"
},
{
"name":"ohos.permission.SET_TELEPHONY_STATE",
"reason":"need use ohos.permission.SET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.GET_TELEPHONY_STATE",
"reason":"need use ohos.permission.GET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.PLACE_CALL",
"reason":"need use ohos.permission.PLACE_CALL"
},
{
"name":"ohos.permission.READ_CONTACTS",
"reason":"need use ohos.permission.READ_CONTACTS"
},
{
"name":"ohos.permission.WRITE_CONTACTS",
"reason":"need use ohos.permission.WRITE_CONTACTS"
},
{
"name":"ohos.permission.SEND_MESSAGES",
"reason":"need use ohos.permission.SEND_MESSAGES"
},
{
"name":"ohos.permission.RECEIVE_SMS",
"reason":"need use ohos.permission.RECEIVE_SMS"
},
{
"name":"ohos.permission.READ_CALL_LOG",
"reason":"need use ohos.permission.READ_CALL_LOG"
},
{
"name":"ohos.permission.GET_NETWORK_INFO",
"reason":"need use ohos.permission.GET_NETWORK_INFO"
},
{
"name":"ohos.permission.INTERNET",
"reason":"need use ohos.permission.INTERNET"
}
],
"js": [
{
"pages": [
......
......@@ -83,12 +83,6 @@ describe('SimManagerTest', function () {
expect(sim.SimState.SIM_STATE_NOT_READY !== env.INVALID_VALUE).assertTrue();
expect(sim.SimState.SIM_STATE_READY !== env.INVALID_VALUE).assertTrue();
expect(sim.SimState.SIM_STATE_LOADED !== env.INVALID_VALUE).assertTrue();
expect(sim.ContactType.GENERAL_CONTACT !== env.INVALID_VALUE).assertTrue();
expect(sim.ContactType.FIXED_DIALING !== env.INVALID_VALUE).assertTrue();
expect(sim.LockState.LOCK_OFF !== env.INVALID_VALUE).assertTrue();
expect(sim.LockState.LOCK_ON !== env.INVALID_VALUE).assertTrue();
expect(sim.PIN_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.FDN_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.UNKNOWN_CARD !== env.INVALID_VALUE).assertTrue();
expect(sim.SINGLE_MODE_SIM_CARD !== env.INVALID_VALUE).assertTrue();
expect(sim.SINGLE_MODE_USIM_CARD !== env.INVALID_VALUE).assertTrue();
......@@ -99,16 +93,6 @@ describe('SimManagerTest', function () {
expect(sim.DUAL_MODE_TELECOM_LTE_CARD !== env.INVALID_VALUE).assertTrue();
expect(sim.DUAL_MODE_UG_CARD !== env.INVALID_VALUE).assertTrue();
expect(sim.SINGLE_MODE_ISIM_CARD !== env.INVALID_VALUE).assertTrue();
expect(sim.PN_PIN_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.PN_PUK_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.PU_PIN_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.PU_PUK_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.PP_PIN_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.PP_PUK_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.PC_PIN_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.PC_PUK_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.SIM_PIN_LOCK !== env.INVALID_VALUE).assertTrue();
expect(sim.SIM_PUK_LOCK !== env.INVALID_VALUE).assertTrue();
console.info(`Telephony_Sim_constantValidate_0100 finish`);
done();
});
......
......@@ -19,8 +19,8 @@
"mainAbility": ".MainAbility",
"srcPath":"",
"deviceType": [
"tablet",
"default",
"tablet",
"default",
"phone"
],
"distro": {
......@@ -66,52 +66,6 @@
"launchType": "standard"
}
],
"reqPermissions": [
{
"name": "ohos.permission.LOCATION",
"reason": "need use ohos.permission.LOCATION"
},
{
"name":"ohos.permission.SET_TELEPHONY_STATE",
"reason":"need use ohos.permission.SET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.GET_TELEPHONY_STATE",
"reason":"need use ohos.permission.GET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.PLACE_CALL",
"reason":"need use ohos.permission.PLACE_CALL"
},
{
"name":"ohos.permission.READ_CONTACTS",
"reason":"need use ohos.permission.READ_CONTACTS"
},
{
"name":"ohos.permission.WRITE_CONTACTS",
"reason":"need use ohos.permission.WRITE_CONTACTS"
},
{
"name":"ohos.permission.SEND_MESSAGES",
"reason":"need use ohos.permission.SEND_MESSAGES"
},
{
"name":"ohos.permission.RECEIVE_SMS",
"reason":"need use ohos.permission.RECEIVE_SMS"
},
{
"name":"ohos.permission.READ_CALL_LOG",
"reason":"need use ohos.permission.READ_CALL_LOG"
},
{
"name":"ohos.permission.GET_NETWORK_INFO",
"reason":"need use ohos.permission.GET_NETWORK_INFO"
},
{
"name":"ohos.permission.INTERNET",
"reason":"need use ohos.permission.INTERNET"
}
],
"js": [
{
"pages": [
......
......@@ -17,20 +17,8 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
export default function SmsMmsErrorTest() {
describe('SmsMmsErrorTest', function () {
const FALSE_SLOT_ID = 9;
const CORRECT_SMS_PDU = '01000F9168683106019196F400080A00680065006C006C006F';
const ERROR_MESSAGE_PATH = '/data/telephony/deSrc/EorroMessagePath.mms';
const IDENTIFIER_MIN = 0;
const IDENTIFIER_MAX = 0xFFFF;
const RANTYPE_GSM = 1;
var rawArrayNull = [];
const SMS_SEND_DST_NUMBER = '';
const MAX_CHINESE_MESSAGE_LENTH = 63;
const MAX_MESSAGE_LENTH = 2401;
const TRUE_SLOT_ID = 0;
const RECEIVE_SMS_PDU = '240D91689141468496F600001270721142432302B319';
var rawArrayNull = [];
/*
* @tc.number Telephony_SmsMms_createMessage_Async_0200
......
......@@ -67,49 +67,9 @@
}
],
"reqPermissions": [
{
"name": "ohos.permission.LOCATION",
"reason": "need use ohos.permission.LOCATION"
},
{
"name":"ohos.permission.SET_TELEPHONY_STATE",
"reason":"need use ohos.permission.SET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.GET_TELEPHONY_STATE",
"reason":"need use ohos.permission.GET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.PLACE_CALL",
"reason":"need use ohos.permission.PLACE_CALL"
},
{
"name":"ohos.permission.READ_CONTACTS",
"reason":"need use ohos.permission.READ_CONTACTS"
},
{
"name":"ohos.permission.WRITE_CONTACTS",
"reason":"need use ohos.permission.WRITE_CONTACTS"
},
{
"name":"ohos.permission.SEND_MESSAGES",
"reason":"need use ohos.permission.SEND_MESSAGES"
},
{
"name":"ohos.permission.RECEIVE_SMS",
"reason":"need use ohos.permission.RECEIVE_SMS"
},
{
"name":"ohos.permission.READ_CALL_LOG",
"reason":"need use ohos.permission.READ_CALL_LOG"
},
{
{
"name":"ohos.permission.GET_NETWORK_INFO",
"reason":"need use ohos.permission.GET_NETWORK_INFO"
},
{
"name":"ohos.permission.INTERNET",
"reason":"need use ohos.permission.INTERNET"
}
],
"js": [
......
......@@ -117,25 +117,6 @@ export default function ActsBaseCallManagerTest() {
}
});
/**
* @tc.number Telephony_CallManager_startDTMF_Async_1000
* @tc.name CallId is 999, character is C, startDTMF() is called as a callback to startDTMF and capture err
* @tc.desc Function test
*/
it('Telephony_CallManager_startDTMF_Async_1000', 0, async function (done) {
call.startDTMF(ERROR_CALLID_999, 'C', (err) => {
if (err) {
console.log(`Telephony_CallManager_startDTMF_Async_1000 finish err = ${err.message}`);
done();
return;
}
expect().assertFail();
console.log('Telephony_CallManager_startDTMF_Async_1000 fail');
done();
});
});
/**
* @tc.number Telephony_CallManager_formatPhoneNumber_Async_0100
* @tc.name PhoneNumber is 100000000000. Call formatPhoneNumber() to format the number.
......
......@@ -66,11 +66,7 @@
"launchType": "standard"
}
],
"reqPermissions": [
{
"name": "ohos.permission.LOCATION",
"reason": "need use ohos.permission.LOCATION"
},
"reqPermissions":[
{
"name":"ohos.permission.SET_TELEPHONY_STATE",
"reason":"need use ohos.permission.SET_TELEPHONY_STATE"
......@@ -78,38 +74,6 @@
{
"name":"ohos.permission.GET_TELEPHONY_STATE",
"reason":"need use ohos.permission.GET_TELEPHONY_STATE"
},
{
"name":"ohos.permission.PLACE_CALL",
"reason":"need use ohos.permission.PLACE_CALL"
},
{
"name":"ohos.permission.READ_CONTACTS",
"reason":"need use ohos.permission.READ_CONTACTS"
},
{
"name":"ohos.permission.WRITE_CONTACTS",
"reason":"need use ohos.permission.WRITE_CONTACTS"
},
{
"name":"ohos.permission.SEND_MESSAGES",
"reason":"need use ohos.permission.SEND_MESSAGES"
},
{
"name":"ohos.permission.RECEIVE_SMS",
"reason":"need use ohos.permission.RECEIVE_SMS"
},
{
"name":"ohos.permission.READ_CALL_LOG",
"reason":"need use ohos.permission.READ_CALL_LOG"
},
{
"name":"ohos.permission.GET_NETWORK_INFO",
"reason":"need use ohos.permission.GET_NETWORK_INFO"
},
{
"name":"ohos.permission.INTERNET",
"reason":"need use ohos.permission.INTERNET"
}
],
"js": [
......
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Copyright (C) 2022 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册