| 
									
										
										
										
											2015-11-13 11:10:23 -08:00
										 |  |  | window.common = (function({ $, common = { init: [] }}) { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   common.displayTestResults = function displayTestResults(data = []) { | 
					
						
							| 
									
										
										
										
											2015-11-21 14:44:33 -08:00
										 |  |  |     $('#testSuite').children().remove(); | 
					
						
							| 
									
										
										
										
											2015-11-13 11:10:23 -08:00
										 |  |  |     data.forEach(({ err = false, text = '' }) => { | 
					
						
							|  |  |  |       var iconClass = err ? | 
					
						
							| 
									
										
										
										
											2015-11-21 14:44:33 -08:00
										 |  |  |         '"ion-close-circled big-error-icon"' : | 
					
						
							|  |  |  |         '"ion-checkmark-circled big-success-icon"'; | 
					
						
							| 
									
										
										
										
											2015-11-13 11:10:23 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  |       $('<div></div>').html(`
 | 
					
						
							|  |  |  |         <div class='row'> | 
					
						
							|  |  |  |           <div class='col-xs-2 text-center'> | 
					
						
							|  |  |  |             <i class=${iconClass}></i> | 
					
						
							|  |  |  |           </div> | 
					
						
							| 
									
										
										
										
											2015-12-01 22:53:05 +04:00
										 |  |  |           <div class='col-xs-10 test-output'> | 
					
						
							| 
									
										
										
										
											2015-11-13 11:10:23 -08:00
										 |  |  |             ${text.split('message: ').pop().replace(/\'\);/g, '')} | 
					
						
							|  |  |  |           </div> | 
					
						
							|  |  |  |           <div class='ten-pixel-break'/> | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |       `)
 | 
					
						
							|  |  |  |         .appendTo($('#testSuite')); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return data; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return common; | 
					
						
							|  |  |  | }(window)); |