# HG changeset patch # User Nicholas Jillings # Date 1428674973 -3600 # Node ID 88a5278b93323e51c6f3b0f0b1053cef906d91b6 # Parent efeaf92d9906679c9d1c1e74c4302285fd9108a1 Added postTest handling diff -r efeaf92d9906 -r 88a5278b9332 ape.js --- a/ape.js Fri Apr 10 15:04:53 2015 +0100 +++ b/ape.js Fri Apr 10 15:09:33 2015 +0100 @@ -303,6 +303,12 @@ var testId = currentState.substr(11,currentState.length-10); var preTest = testXMLSetups.find('PreTest')[testId]; this.value = preTestButtonClick(preTest,this.value); + } else if (currentState == 'postTest') + { + // At the end of the test, running global post test + var xmlTree = projectXML.find('setup'); + var PostTest = xmlTree.find('PostTest')[0]; + this.value = preTestButtonClick(PostTest,this.value); } } @@ -416,10 +422,12 @@ loadTest(testId+1); } else { console.log('Testing Completed!'); + currentState = 'postTest'; // Check for any post tests var xmlSetup = projectXML.find('setup'); - var postTest = xmlSetup.find('PostTest'); - console.log(postTest); + var postTest = xmlSetup.find('PostTest')[0]; + showPopup(); + preTestPopupStart(postTest); } } console.log(currentState);