Disable unsupported test access and add unsupported label.
authorFan,Yugang <yugang.fan@intel.com>
Tue, 23 Jul 2013 06:02:28 +0000 (14:02 +0800)
committerFan,Yugang <yugang.fan@intel.com>
Tue, 23 Jul 2013 06:06:20 +0000 (14:06 +0800)
Change-Id: I2fb5b2da792d107df0789e4327ae98d6305decf7

css/main.css
js/main.js

index 95283a9..33b19f1 100644 (file)
@@ -35,6 +35,11 @@ Authors:
     white-space : normal;
 }
 
+.ui-li-count {
+    min-width: 30px;
+    text-align: center;
+}
+
 .ui-page .ui-content .ui-listview img {
     position:absolute;
     top:0;
index 1d1dfde..92e96da 100755 (executable)
@@ -34,11 +34,6 @@ var _appURL;
 var _resultXML;
 var Tests;
 var caps;
-var mandatorylist = new Array(
-            "usbHost",
-            "screenSizeNormal",
-            "inputKeyboard",
-            "multiTouchCount");
 //var accMarks = {}; //Re-enter popup
 var noSupport = {};
 var resultFile = "tct-behavior-tests_" + getCurrentTime() + ".result.xml";
@@ -112,7 +107,10 @@ function updateAppDecoration() {
                          $("#mylist > li :last").attr('data-theme', 'r');
                      }
                      if (noSupport[$(this).attr("id")]) {
+                        $("#mylist > li :last").find("a").attr('href', '');
                         $("#mylist > li :last").attr('data-theme', 'a');
+                        $("#mylist > li :last").find("a").append("<span class='ui-li-count' style='color:black;'>" +
+                             "UNSUPPORTED" + "</span>");
                      }
                 }
             );
@@ -140,22 +138,15 @@ function _resetResult() {
         function() {
             var testAppname = $(this).attr("id");
             var isCappresent = true;
-            var isCapmandatory = false;
             $(this).find("capability").each(function(){
                 isCappresent = isCapPresent($(this).attr("name"));
-                isCapmandatory = isCapMandatory($(this).attr("name"));
                 if (isCappresent === false)
                     return false;
             });
             if(isCappresent === false){
                 noSupport[testAppname] = true;
-                if (isCapmandatory === true)
-                    $(this).attr("result", "FAIL");
-                else
-                    $(this).attr("result", "PASS");
             }
-            else
-                $(this).attr("result", "non-executed");
+            $(this).attr("result", "N/A");
         }
     );
 }
@@ -285,10 +276,8 @@ function _mergeResult(tmpResult) {
             );
             var testAppname = $(this).attr("id");
             var isCappresent = true;
-            var isCapmandatory = false;
             $(this).find("capability").each(function(){
                 isCappresent = isCapPresent($(this).attr("name"));
-                isCapmandatory = isCapMandatory($(this).attr("name"));
                 if (isCappresent === false)
                     return false;
             });
@@ -346,20 +335,4 @@ function isCapPresent(name) {
         return false;
 }
 
-function isCapMandatory(name) {
-    for (var i = 0; i < mandatorylist.length; i++) {
-      if (mandatorylist[i] === name)
-        return true;
-    };
-    return false;
-}
-
-function isCapSupport(name) {
-    var isPresent = isCapPresent(name);
-    var isMandatory = isCapMandatory(name);
-    if ((isPresent == false) && (isMandatory == true))
-        return false;
-    return true;
-}
-
 window.addEventListener('load', initTests, false);