未验证 提交 681a8b48 编写于 作者: O openharmony_ci 提交者: Gitee

!9851 新增xts用例覆盖 isLastPart

Merge pull request !9851 from 高曦/master
......@@ -23,34 +23,6 @@ describe('ActsNetworkSearchTest', function () {
const SLOT_0 = 0;
const SLOT_2 = -1;
function sleep(timeout) {
return new Promise((resolve, reject) => {
setTimeout(() => {
console.info(`Telephony_NetworkSearch_CellInformation sleep ${timeout}ms`);
resolve();
}, timeout);
})
}
async function turnOnRadio() {
let isOn = await radio.isRadioOn();
if (!isOn) {
await radio.turnOnRadio();
console.info('Telephony_NetworkSearch_CellInformation turnOnRadio success');
await sleep(5000);
}
}
beforeAll(async function () {
await radio.setPreferredNetwork(SLOT_0, radio.PREFERRED_NETWORK_MODE_AUTO);
await turnOnRadio();
})
afterAll(async function () {
await radio.setPreferredNetwork(SLOT_0, radio.PREFERRED_NETWORK_MODE_AUTO);
await turnOnRadio();
})
afterEach(async function () {
try {
expect(radio.RadioTechnology.RADIO_TECHNOLOGY_UNKNOWN === 0).assertTrue();
......
......@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import sms from '@ohos.telephony.sms';
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
export default function SmsMmsErrorTest() {
......@@ -126,6 +127,7 @@ describe('SmsMmsErrorTest', function () {
it('Telephony_SmsMms_sendMessage_Promise_0100', 0, async function (done) {
try {
let sendCallback = function (err, data) {
expect(data.isLastPart !== '').assertTrue();
console.log(`sendCallback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`);
}
let deliveryCallback = function (err, data) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册