[common][nfc][DPTTIZEN-3003, fix tc issue] 34/173834/3
authorzy123.yuan <zy123.yuan@samsung.com>
Mon, 26 Mar 2018 08:28:21 +0000 (16:28 +0800)
committerzy123.yuan <zy123.yuan@samsung.com>
Tue, 27 Mar 2018 00:56:42 +0000 (08:56 +0800)
Change-Id: I9c8572b6c4ae55dcb22c160edff475eca080ae9a

common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID.html
common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID_ESE.html
common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID_OTHER.html
common/tct-nfc-tizen-tests/nfc/NFCAdapter_unregisterAID_UICC.html

index f4b9c08390ffd9f61b293cc2bef0584ab3690f6d..fc2e52f2cb53aae1d23dcf6a746e656b1dc12518 100755 (executable)
@@ -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);
+});
 
 </script>
 </body>
-</html>
\ No newline at end of file
+</html>
index 8f24c9d3c682cbb0e78dac534b84716bcd0e16b0..665f69f5cc6bdf8140873b85acba6f035138a471 100755 (executable)
@@ -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);
+});
 
 </script>
 </body>
-</html>
\ No newline at end of file
+</html>
index f9c1ac3e37d3388575025d3bd4982b8d08b9d4b8..148525816b788b573429541b2b8187630a7cc660 100755 (executable)
@@ -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);
+});
 
 </script>
 </body>
-</html>
\ No newline at end of file
+</html>
index 85578f0d5c9b749315ff477d0ee923d8debd106d..937816853e6cb710e383b7ad2017f944c34b7325 100755 (executable)
@@ -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);
+});
 
 </script>
 </body>
-</html>
\ No newline at end of file
+</html>