templates/assets/js/navigation.js
function (buttonState) {
            var scenarios = document.querySelectorAll('.scenario'),
                hasClass,
                self = this;
            for (var i = 0; i < scenarios.length; i++) {
                hasClass = scenarios[i].classList.contains(buttonState);
                if (hasClass === true) {
                    if (scenarios[i].parentNode.style.display === 'none') {
                        scenarios[i].parentNode.style.display = 'block';
                    }
                } else {
                    scenarios[i].parentNode.style.display = 'none';
                }
            }

            if (buttonState === 'failed') {
                self.currentView = 'failed';
                this.hideFeatureContainer('passed');
            } else {
                self.currentView = 'passed';
                this.hideFeatureContainer('failed');
            }
        }
function (buttonState) {
            var scenarios = document.querySelectorAll('.scenario'),
                hasClass,
                self = this;
            for (var i = 0; i < scenarios.length; i++) {
                hasClass = scenarios[i].classList.contains(buttonState);
                if (hasClass === true) {
                    if (scenarios[i].parentNode.style.display === 'none') {
                        scenarios[i].parentNode.style.display = 'block';
                    }
                } else {
                    scenarios[i].parentNode.style.display = 'none';
                }
            }

            if (buttonState === 'failed') {
                self.currentView = 'failed';
                this.hideFeatureContainer('passed');
            } else {
                self.currentView = 'passed';
                this.hideFeatureContainer('failed');
            }
        }
function ( buttonState ) { var scenarios = document . querySelectorAll ( '.scenario' ) , hasClass , self = this ; for ( var i = 0 ; i < scenarios . length ; i ++ ) { hasClass = scenarios [ i ] . classList . contains ( buttonState ) ; if ( hasClass === true ) { if ( scenarios [ i ] . parentNode . style . display === 'none' ) { scenarios [ i ] . parentNode . style . display = 'block' ; } } else { scenarios [ i ] . parentNode . style . display = 'none' ; } } if ( buttonState === 'failed' ) { self . currentView = 'failed' ; this . hideFeatureContainer ( 'passed' ) ; } else { self . currentView = 'passed' ; this . hideFeatureContainer ( 'failed' ) ; } }
Filtering passed and failed scenarios by clicking the passed or failed button respectively

@param buttonState indicates the clicked button
Filtering passed and failed scenarios by clicking the passed or failed button respectively