提交 bd345f35 编写于 作者: Q quanli

quanli1@huawei.com

Signed-off-by: Nquanli <quanli1@huawei.com>
上级 8e413a0f
......@@ -64,6 +64,22 @@ describe('bluetoothhostTest2', function() {
console.info('afterAll called')
})
/**
* @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_Pair_0100
* @tc.name Test pairDevice of use invailded address
* @tc.desc Test pairDevice api
* @tc.size MEDIUM
* @ since 8
* @tc.type Function
* @tc.level Level 2
*/
it('SUB_COMMUNICATION_BLUETOOTH_BR_Pair_0100', 0, async function (done) {
let result = bluetooth.pairDevice("11:22:55:66:33:44");
console.info("[bluetooth_js] onStartpair001 -> " + JSON.stringify(result));
expect(result).assertFalse();
done()
})
/**
* @tc.number SUB_COMMUNICATION_BLUETOOTH_BR_Pair_0200
* @tc.name testStartpair
......
......@@ -122,10 +122,9 @@ describe('bluetoothhostTest_host_1', function () {
let a2dpSrc = bluetooth.getProfile(ProfileId.PROFILE_A2DP_SOURCE);
console.info('[bluetooth_js]a2dp get profile result:' + JSON.stringify(a2dpSrc));
a2dpSrc.on('connectionStateChange', StateChangeParam);
let conn = a2dpSrc.connect('11:22:33:44:55:77');
a2dpSrc.connect('11:22:33:44:55:77');
await sleep(6000);
console.info('[bluetooth_js]a2dp connect result:' + JSON.stringify(conn));
expect(conn).assertTrue();
a2dpSrc.off('connectionStateChange', StateChangeParam);
done();
})
......
......@@ -146,10 +146,8 @@ describe('bluetoothhostTest_host_3', function () {
}
let hfpSrc = bluetooth.getProfile(ProfileId.PROFILE_HANDS_FREE_AUDIO_GATEWAY);
hfpSrc.on('connectionStateChange', StateChangeParam);
let conn = hfpSrc.connect('11:22:33:44:55:66');
hfpSrc.connect('11:22:33:44:55:66');
await sleep(6000);
console.info('[bluetooth_js]hfp connect result:' + JSON.stringify(conn));
expect(conn).assertTrue();
hfpSrc.off('connectionStateChange', StateChangeParam);
done();
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册