#{extends 'bhave-main.html' /}
#{set title:'Bhave: ' + testId + '. ' + testName /}

#{globalVars /}	
#{waitFunctions /}	
#{knockoutHandlers /}	
#{dictionary /}	
#{translate /}	
#{supportingFunctions /}	
#{testFunctions /}
	
<script>
	$(document).ready(function() {
		
		myDictionary = new Dictionary();
	    $.getJSON("@{Bhave.getDictionary()}", function(dictionary) {
	    	ko.mapping.fromJS(dictionary, {}, myDictionary);
	    }); 

	    bhaviour = new Bhaviour();
	    $.getJSON("@{Tests.get(testId)}", function(testData) {
	    	ko.mapping.fromJS(testData, {}, bhaviour);
		    $.getJSON("@{Bhave.getEnv()}", function(envData) {
		    	ko.mapping.fromJS(envData, {}, bhaviour);
				ko.applyBindings(bhaviour);
				applyTranslation();
		    });
	    }); 
	});
</script>

#{envView /}
#{screenshotView /}
#{resultView /}
#{testView /}