From 1ed1e36128d49b426dcb297caacaabd9704485ac Mon Sep 17 00:00:00 2001 From: "zy123.yuan" Date: Mon, 26 Mar 2018 16:28:21 +0800 Subject: [PATCH] [common][nfc][DPTTIZEN-3003, fix tc issue] Change-Id: I9c8572b6c4ae55dcb22c160edff475eca080ae9a --- .../nfc/NFCAdapter_unregisterAID.html | 19 +++++++++++-------- .../nfc/NFCAdapter_unregisterAID_ESE.html | 19 ++++++++++++------- .../nfc/NFCAdapter_unregisterAID_OTHER.html | 19 ++++++++++++------- .../nfc/NFCAdapter_unregisterAID_UICC.html | 19 ++++++++++++------- 4 files changed, 47 insertions(+), 29 deletions(-) diff --git a/common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID.html b/common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID.html index f4b9c0839..fc2e52f2c 100755 --- a/common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID.html +++ b/common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID.html @@ -37,10 +37,16 @@ Authors: //==== TEST_CRITERIA MR MAST -var retValue, adapter, aids = "ABC0012345", isActiveHandler, isActiveCategory; +var t = async_test(document.title, {timeout: 90000}), i, retValue, adapter, aids = "ABC0012345", onSuccessCallback; -test(function () { +t.step(function () { adapter = tizen.nfc.getDefaultAdapter(); + onSuccessCallback = t.step_func(function (ids) { + for(i = 0; i < ids.length; i++){ + assert_not_equals(ids[i].aid, aids, "get wrong aids"); + } + t.done(); + }); try { adapter.registerAID("HCE", aids, "PAYMENT"); }catch(e){ @@ -52,12 +58,9 @@ test(function () { }catch(e){ assert_unreached("unregisterAID throw " + e.message); } - isActiveHandler = adapter.isActivatedHandlerForAID("HCE", aids); - assert_type(isActiveHandler, "boolean", "fail to get wrong type of isActiveHandler"); - isActiveCategory = adapter.isActivatedHandlerForCategory("HCE", "PAYMENT"); - assert_type(isActiveCategory, "boolean", "fail to get wrong type of isActiveCategory"); -}, document.title); + adapter.getAIDsForCategory("HCE", "PAYMENT", onSuccessCallback); +}); - \ No newline at end of file + diff --git a/common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID_ESE.html b/common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID_ESE.html index 8f24c9d3c..665f69f5c 100755 --- a/common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID_ESE.html +++ b/common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID_ESE.html @@ -34,13 +34,19 @@ Authors: //==== PRIORITY P1 //==== SPEC Tizen Web API:Communication:NFC:NFCAdapter:unregisterAID M //==== SPEC_URL TBD -//==== TEST_CRITERIA MR +//==== TEST_CRITERIA MR MAST -var retValue, adapter, aids = "ABC0012345"; +var t = async_test(document.title, {timeout: 90000}), i, retValue, adapter, aids = "ABC0012345", onSuccessCallback; -test(function () { +t.step(function () { adapter = tizen.nfc.getDefaultAdapter(); + onSuccessCallback = t.step_func(function (ids) { + for(i = 0; i < ids.length; i++){ + assert_not_equals(ids[i].aid, aids, "get wrong aids"); + } + t.done(); + }); try { adapter.registerAID("ESE", aids, "PAYMENT"); }catch(e){ @@ -52,10 +58,9 @@ test(function () { }catch(e){ assert_unreached("unregisterAID throw " + e.message); } - adapter.isActivatedHandlerForAID("ESE", aids); - adapter.isActivatedHandlerForCategory("ESE", "PAYMENT"); -}, document.title); + adapter.getAIDsForCategory("ESE", "PAYMENT", onSuccessCallback); +}); - \ No newline at end of file + diff --git a/common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID_OTHER.html b/common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID_OTHER.html index f9c1ac3e3..148525816 100755 --- a/common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID_OTHER.html +++ b/common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID_OTHER.html @@ -34,12 +34,18 @@ Authors: //==== PRIORITY P1 //==== SPEC Tizen Web API:Communication:NFC:NFCAdapter:unregisterAID M //==== SPEC_URL TBD -//==== TEST_CRITERIA MR +//==== TEST_CRITERIA MR MAST -var retValue, adapter, aids = "ABC0012345"; +var t = async_test(document.title, {timeout: 90000}), i, retValue, adapter, aids = "ABC0012345", onSuccessCallback; -test(function () { +t.step(function () { adapter = tizen.nfc.getDefaultAdapter(); + onSuccessCallback = t.step_func(function (ids) { + for(i = 0; i < ids.length; i++){ + assert_not_equals(ids[i].aid, aids, "get wrong aids"); + } + t.done(); + }); try { adapter.registerAID("HCE", aids, "OTHER"); }catch(e){ @@ -51,10 +57,9 @@ test(function () { }catch(e){ assert_unreached("unregisterAID throw " + e.message); } - adapter.isActivatedHandlerForAID("HCE", aids); - adapter.isActivatedHandlerForCategory("HCE", "OTHER"); -}, document.title); + adapter.getAIDsForCategory("HCE", "OTHER", onSuccessCallback); +}); - \ No newline at end of file + diff --git a/common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID_UICC.html b/common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID_UICC.html index 85578f0d5..937816853 100755 --- a/common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID_UICC.html +++ b/common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID_UICC.html @@ -34,13 +34,19 @@ Authors: //==== PRIORITY P1 //==== SPEC Tizen Web API:Communication:NFC:NFCAdapter:unregisterAID M //==== SPEC_URL TBD -//==== TEST_CRITERIA MR +//==== TEST_CRITERIA MR MAST -var retValue, adapter, aids = "ABC0012345"; +var t = async_test(document.title, {timeout: 90000}), i, retValue, adapter, aids = "ABC0012345", onSuccessCallback; -test(function () { +t.step(function () { adapter = tizen.nfc.getDefaultAdapter(); + onSuccessCallback = t.step_func(function (ids) { + for(i = 0; i < ids.length; i++){ + assert_not_equals(ids[i].aid, aids, "get wrong aids"); + } + t.done(); + }); try { adapter.registerAID("UICC", aids, "PAYMENT"); }catch(e){ @@ -52,10 +58,9 @@ test(function () { }catch(e){ assert_unreached("unregisterAID throw " + e.message); } - adapter.isActivatedHandlerForAID("UICC", aids); - adapter.isActivatedHandlerForCategory("UICC", "PAYMENT"); -}, document.title); + adapter.getAIDsForCategory("UICC", "PAYMENT", onSuccessCallback); +}); - \ No newline at end of file + -- 2.34.1