| 
									
										
										
										
											2016-05-30 11:05:09 -07:00
										 |  |  | /// <reference path='../_protractor/e2e.d.ts' />
 | 
					
						
							| 
									
										
										
										
											2016-06-16 02:01:03 +01:00
										 |  |  | 'use strict'; | 
					
						
							| 
									
										
										
										
											2015-12-20 13:17:16 -08:00
										 |  |  | describe('Displaying Data Tests', function () { | 
					
						
							| 
									
										
										
										
											2016-05-30 11:05:09 -07:00
										 |  |  |   let _title = 'Tour of Heroes'; | 
					
						
							|  |  |  |   let _defaultHero = 'Windstorm'; | 
					
						
							| 
									
										
										
										
											2015-12-20 13:17:16 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  |   beforeAll(function () { | 
					
						
							|  |  |  |     browser.get(''); | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   it('should display correct title: ' + _title, function () { | 
					
						
							|  |  |  |     expect(element(by.css('h1')).getText()).toEqual(_title); | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   it('should have correct default hero:  ' + _defaultHero, function () { | 
					
						
							|  |  |  |     expect(element(by.css('h2')).getText()).toContain(_defaultHero); | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-14 10:36:38 -07:00
										 |  |  |  it('should have heroes', function () { | 
					
						
							| 
									
										
										
										
											2016-05-30 11:05:09 -07:00
										 |  |  |     let heroEls = element.all(by.css('li')); | 
					
						
							| 
									
										
										
										
											2016-04-14 10:36:38 -07:00
										 |  |  |     expect(heroEls.count()).not.toBe(0, 'should have heroes'); | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   it('should display "there are many heroes!"', function () { | 
					
						
							| 
									
										
										
										
											2015-12-20 13:17:16 -08:00
										 |  |  |     expect(element(by.css('ul ~ p')).getText()).toContain('There are many heroes!'); | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | }); |