diff --git a/communication/bluetooth_profile/src/main/js/default/test/BluetoothHid.test.js b/communication/bluetooth_profile/src/main/js/default/test/BluetoothHid.test.js index e092f48bf74f7f7ca0ba33e67f31c54c197ab89e..dad671196465d91582e049f15dca4c63870d2dfd 100644 --- a/communication/bluetooth_profile/src/main/js/default/test/BluetoothHid.test.js +++ b/communication/bluetooth_profile/src/main/js/default/test/BluetoothHid.test.js @@ -16,7 +16,7 @@ import bluetooth from '@ohos.bluetooth'; import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' -let hidHostProfile = bluetooth.getProfile(6); +let hidHostProfile = bluetooth.getProfileInst(6); function on(ON_VALUE_TEST_ELEMENT) { return new Promise((resolve, reject) => { @@ -108,7 +108,7 @@ describe('bluetoothhostTest_host_2', function () { it('SUB_COMMUNACATION_bluetooth_DEVICE_JS_GET_PROFILE_LOOP_0001', 0, async function (done) { console.info('[bluetooth_js] loop get profile start'); await tryToEnableBt(); - let proFile = bluetooth.getProfile(6); + let proFile = bluetooth.getProfileInst(6); console.info('[bluetooth_js] loop get profile result:' + JSON.stringify(proFile)); expect(proFile != null).assertEqual(true); done(); @@ -234,7 +234,7 @@ describe('bluetoothhostTest_host_2', function () { it('SUB_COMMUNACATION_bluetoothble_PANProfile_Tethering_0001', 0, async function (done) { await tryToEnableBt(); console.info('[bluetooth_js] tethering test start'); - let panProfile = bluetooth.getProfile(bluetooth.ProfileId.PROFILE_PAN_NETWORK); + let panProfile = bluetooth.getProfileInst(bluetooth.ProfileId.PROFILE_PAN_NETWORK); let ret = panProfile.setTethering(false); console.info("[bluetooth_js] setTethering false result "+JSON.stringify(ret)); let result = panProfile.isTetheringOn();