# HG changeset patch # User Nicholas Jillings # Date 1428674973 -3600 # Node ID 86d332f77174161bb3b244218494eb4acd10fad0 # Parent ee5ae5902574d7131a24851cb8eb0c6c77f32b4a Added postTest handling diff -r ee5ae5902574 -r 86d332f77174 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);