comparison ape.js @ 665:88a5278b9332

Added postTest handling
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Fri, 10 Apr 2015 15:09:33 +0100
parents efeaf92d9906
children 2c25ca4d7ec6
comparison
equal deleted inserted replaced
664:efeaf92d9906 665:88a5278b9332
301 { 301 {
302 //Specific test pre-test 302 //Specific test pre-test
303 var testId = currentState.substr(11,currentState.length-10); 303 var testId = currentState.substr(11,currentState.length-10);
304 var preTest = testXMLSetups.find('PreTest')[testId]; 304 var preTest = testXMLSetups.find('PreTest')[testId];
305 this.value = preTestButtonClick(preTest,this.value); 305 this.value = preTestButtonClick(preTest,this.value);
306 } else if (currentState == 'postTest')
307 {
308 // At the end of the test, running global post test
309 var xmlTree = projectXML.find('setup');
310 var PostTest = xmlTree.find('PostTest')[0];
311 this.value = preTestButtonClick(PostTest,this.value);
306 } 312 }
307 } 313 }
308 314
309 function preTestButtonClick(preTest,index) 315 function preTestButtonClick(preTest,index)
310 { 316 {
414 // Yes we have another test to perform 420 // Yes we have another test to perform
415 currentState = 'testRun-'+Number(testId)+1; 421 currentState = 'testRun-'+Number(testId)+1;
416 loadTest(testId+1); 422 loadTest(testId+1);
417 } else { 423 } else {
418 console.log('Testing Completed!'); 424 console.log('Testing Completed!');
425 currentState = 'postTest';
419 // Check for any post tests 426 // Check for any post tests
420 var xmlSetup = projectXML.find('setup'); 427 var xmlSetup = projectXML.find('setup');
421 var postTest = xmlSetup.find('PostTest'); 428 var postTest = xmlSetup.find('PostTest')[0];
422 console.log(postTest); 429 showPopup();
430 preTestPopupStart(postTest);
423 } 431 }
424 } 432 }
425 console.log(currentState); 433 console.log(currentState);
426 } 434 }
427 435