Github user mmocny commented on a diff in the pull request:

    
https://github.com/apache/cordova-plugin-test-framework/pull/6#discussion_r22968690
  
    --- Diff: www/main.js ---
    @@ -225,6 +253,43 @@ function createEnablerList() {
     
     
/******************************************************************************/
     
    +function updateTotalTestCount(totalCount) {
    +  var label = document.getElementById('test-total-count');
    +  
    +  label.setAttribute('count', totalCount);
    +  label.innerText = totalCount;
    +}
    +
    
+/******************************************************************************/
    +
    +function updateEnabledTestCount(enabledCount) {
    +
    +  var enabledLabel = document.getElementById('test-enabled-count');
    +  
    +  if (!enabledCount) {
    +    // Determine how many tests are currently enabled
    +    var cdvtests = 
cordova.require('org.apache.cordova.test-framework.cdvtests');
    +    var enabled = 0;
    +    iterateAutoTests(cdvtests, function(api, testModule) {
    +      if (testModule.getEnabled()) {
    +        enabled++;
    +      }
    +    });
    +    enabledCount = enabled;
    +  }
    +  
    +  // Compare enabled count vs the total to show if all tests are to be run
    +  var totalCount = 
document.getElementById('test-total-count').getAttribute('count');
    --- End diff --
    
    Why use an attribute on the tag and not just a javascript variable?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to