提交 fe909cb2 编写于 作者: Q quanli

quanli1@huawei.com

Signed-off-by: Nquanli <quanli1@huawei.com>
上级 ecd6cfe0
...@@ -388,7 +388,7 @@ describe('bluetoothBLETest', function() { ...@@ -388,7 +388,7 @@ describe('bluetoothBLETest', function() {
let characteristic = {serviceUuid: '00001810-0000-1000-8000-00805F9B34FB', let characteristic = {serviceUuid: '00001810-0000-1000-8000-00805F9B34FB',
characteristicUuid: '00001820-0000-1000-8000-00805F9B34FB', characteristicUuid: '00001820-0000-1000-8000-00805F9B34FB',
characteristicValue: arrayBufferCCC, descriptors:descriptors}; characteristicValue: arrayBufferCCC, descriptors:descriptors};
gattClient.readCharacteristicValue(characteristic).then((object) => { await gattClient.readCharacteristicValue(characteristic).then((data) => {
if (object != null) { if (object != null) {
expect(true).assertEqual(true); expect(true).assertEqual(true);
} else { } else {
......
...@@ -115,9 +115,58 @@ export default function nfcMifareUltralightTag() { ...@@ -115,9 +115,58 @@ export default function nfcMifareUltralightTag() {
sleep(3000); sleep(3000);
done(); done();
}) })
/** /**
* @tc.number SUB_Communication_NFC_mifareUltralight_0300 * @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.name testgetType
* @tc.desc Gets the type of Mifare Ultralight label * @tc.desc Gets the type of Mifare Ultralight label
* @tc.size MEDIUM * @tc.size MEDIUM
......
...@@ -53,6 +53,7 @@ let aTag = { ...@@ -53,6 +53,7 @@ let aTag = {
}, },
], ],
"tagRfDiscId": 1, "tagRfDiscId": 1,
"supportedProfiles": 1,
}; };
let bTag = { let bTag = {
......
...@@ -109,7 +109,7 @@ export default function actsWifiFunctionsTest() { ...@@ -109,7 +109,7 @@ export default function actsWifiFunctionsTest() {
"timestamp" + result[j].timestamp + "capabilities" + result[j].capabilities "timestamp" + result[j].timestamp + "capabilities" + result[j].capabilities
+ "centerFrequency0: " + result[j].centerFrequency0 + "centerFrequency0: " + result[j].centerFrequency0
+ "centerFrequency1: " + result[j].centerFrequency1 + "centerFrequency1: " + result[j].centerFrequency1
+ "infoElems: " + result[j].infoElems); + "eid: " + result[j].infoElems.eid + "content: " + result[j].infoElems.content);
} }
} }
resolve(); resolve();
...@@ -325,5 +325,3 @@ export default function actsWifiFunctionsTest() { ...@@ -325,5 +325,3 @@ export default function actsWifiFunctionsTest() {
}) })
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册