diff --git a/communication/bluetooth_ble/src/main/js/test/BleGattManager.test.js b/communication/bluetooth_ble/src/main/js/test/BleGattManager.test.js index e802544959fba01980b2fe2498493193792a09c7..c18c9c4aa0cefd2de17907791de4e273c28ca3e2 100644 --- a/communication/bluetooth_ble/src/main/js/test/BleGattManager.test.js +++ b/communication/bluetooth_ble/src/main/js/test/BleGattManager.test.js @@ -388,7 +388,7 @@ describe('bluetoothBLETest', function() { let characteristic = {serviceUuid: '00001810-0000-1000-8000-00805F9B34FB', characteristicUuid: '00001820-0000-1000-8000-00805F9B34FB', characteristicValue: arrayBufferCCC, descriptors:descriptors}; - gattClient.readCharacteristicValue(characteristic).then((object) => { + await gattClient.readCharacteristicValue(characteristic).then((data) => { if (object != null) { expect(true).assertEqual(true); } else { diff --git a/communication/nfc_Controller/src/main/js/test/nfc.MifareUltralightTag.js b/communication/nfc_Controller/src/main/js/test/nfc.MifareUltralightTag.js index 645f3f4609928577306f6e9c7d36184384aa92cb..7e8f9e5eb2a288de527ae607d6a0be10ec4d62ac 100644 --- a/communication/nfc_Controller/src/main/js/test/nfc.MifareUltralightTag.js +++ b/communication/nfc_Controller/src/main/js/test/nfc.MifareUltralightTag.js @@ -115,9 +115,58 @@ export default function nfcMifareUltralightTag() { sleep(3000); done(); }) - + /** * @tc.number SUB_Communication_NFC_mifareUltralight_0300 + * @tc.name testwriteSinglePage + * @tc.desc Test writeSinglePage api by promise. + * @tc.size MEDIUM + * @ since 7 + * @tc.type Function + * @tc.level Level 2 + */ + it('SUB_Communication_NFC_mifareUltralight_0300', 0, async function (done) { + let pageIndex = 1; + let rawData = [0x01, 0x02]; + await MifareUltralightTag.writeSinglePage(pageIndex, rawData).then((data) => { + console.log("mifareUltralight writeSinglePages1 data: " + data + "json1:" + JSON.stringify(data)); + expect(true).assertTrue(data >= 0); + done(); + }).catch((err)=> { + console.log("mifareUltralight writeSinglePages1 err: " + err); + expect(true).assertEqual(true); + done(); + }); + sleep(3000); + }) + + /** + * @tc.number SUB_Communication_NFC_mifareUltralight_0400 + * @tc.name testwriteSinglePage + * @tc.desc Test writeSinglePage api by callback. + * @tc.size MEDIUM + * @ since 7 + * @tc.type Function + * @tc.level Level 2 + */ + it('SUB_Communication_NFC_mifareUltralight_0400', 0, async function (done) { + let pageIndex = 1; + let rawData = [0x01, 0x02]; + MifareUltralightTag.writeSinglePage(pageIndex, rawData, (err, data)=> { + if (err) { + console.log("mifareUltralight writeSinglePages2 err: " + err); + expect(true).assertEqual(true); + } else { + console.log("mifareUltralight writeSinglePages2 data: " + data + "json2:" + JSON.stringify(data)); + expect(true).assertTrue(data >= 0); + } + }); + sleep(3000); + done(); + }) + + /** + * @tc.number SUB_Communication_NFC_mifareUltralight_0500 * @tc.name testgetType * @tc.desc Gets the type of Mifare Ultralight label * @tc.size MEDIUM diff --git a/communication/nfc_Controller/src/main/js/test/nfc.TagABFV.js b/communication/nfc_Controller/src/main/js/test/nfc.TagABFV.js index 1f4d07805ea7540748b85949a3b9e8e472c61b52..a20618adeb25de12480c3f81f4b0d7413627f071 100644 --- a/communication/nfc_Controller/src/main/js/test/nfc.TagABFV.js +++ b/communication/nfc_Controller/src/main/js/test/nfc.TagABFV.js @@ -53,6 +53,7 @@ let aTag = { }, ], "tagRfDiscId": 1, + "supportedProfiles": 1, }; let bTag = { diff --git a/communication/wifi_standard/src/main/js/test/WifiStationFunctions.test.js b/communication/wifi_standard/src/main/js/test/WifiStationFunctions.test.js index 56ad8f26d691a79b4bd796101b51e45bde3da15e..286925257f7b6e365cae5e512f568e8808c07482 100644 --- a/communication/wifi_standard/src/main/js/test/WifiStationFunctions.test.js +++ b/communication/wifi_standard/src/main/js/test/WifiStationFunctions.test.js @@ -109,7 +109,7 @@ export default function actsWifiFunctionsTest() { "timestamp" + result[j].timestamp + "capabilities" + result[j].capabilities + "centerFrequency0: " + result[j].centerFrequency0 + "centerFrequency1: " + result[j].centerFrequency1 - + "infoElems: " + result[j].infoElems); + + "eid: " + result[j].infoElems.eid + "content: " + result[j].infoElems.content); } } resolve(); @@ -325,5 +325,3 @@ export default function actsWifiFunctionsTest() { }) } - -