cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmocny <...@git.apache.org>
Subject [GitHub] cordova-plugin-test-framework pull request: CB-7459 Add header to ...
Date Wed, 14 Jan 2015 20:49:36 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message