templates/assets/js/chart.js
function () {
            var scenarioPassed = document.querySelectorAll('.scenario.passed').length,
                scenarioFailed = document.querySelectorAll('.scenario.failed').length,
                scenariosAmount = document.querySelectorAll('.scenario').length,
                passed = (scenarioPassed / scenariosAmount) * 100,
                failed = (scenarioFailed / scenariosAmount) * 100,
                statistics;

            statistics = {
                scenariosAmount: scenariosAmount,
                passed: Math.round(Math.floor(passed)),
                failed: Math.round(Math.ceil(failed))
            };

            return statistics;
        }
function () {
            var scenarioPassed = document.querySelectorAll('.scenario.passed').length,
                scenarioFailed = document.querySelectorAll('.scenario.failed').length,
                scenariosAmount = document.querySelectorAll('.scenario').length,
                passed = (scenarioPassed / scenariosAmount) * 100,
                failed = (scenarioFailed / scenariosAmount) * 100,
                statistics;

            statistics = {
                scenariosAmount: scenariosAmount,
                passed: Math.round(Math.floor(passed)),
                failed: Math.round(Math.ceil(failed))
            };

            return statistics;
        }
function ( ) { var scenarioPassed = document . querySelectorAll ( '.scenario.passed' ) . length , scenarioFailed = document . querySelectorAll ( '.scenario.failed' ) . length , scenariosAmount = document . querySelectorAll ( '.scenario' ) . length , passed = ( scenarioPassed / scenariosAmount ) * 100 , failed = ( scenarioFailed / scenariosAmount ) * 100 , statistics ; statistics = { scenariosAmount : scenariosAmount , passed : Math . round ( Math . floor ( passed ) ) , failed : Math . round ( Math . ceil ( failed ) ) } ; return statistics ; }
Passed and failed percentage
Passed and failed percentage