| 
									
										
										
										
											2017-04-21 17:21:45 -07:00
										 |  |  | 'use strict'; // necessary for es6 output in node
 | 
					
						
							| 
									
										
										
										
											2017-02-22 18:13:21 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | import { browser, element, by, ElementFinder } from 'protractor'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | describe('Set Document Title', function () { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     beforeAll(function () { | 
					
						
							|  |  |  |         browser.get(''); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     it('should set the document title', function () { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       let titles = [ | 
					
						
							|  |  |  |         'Good morning!', | 
					
						
							|  |  |  |         'Good afternoon!', | 
					
						
							|  |  |  |         'Good evening!' | 
					
						
							|  |  |  |       ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       element.all( by.css( 'ul li a' ) ).each( | 
					
						
							|  |  |  |         function iterator( element: ElementFinder, i: number ) { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |           element.click(); | 
					
						
							|  |  |  |           expect( browser.getTitle() ).toEqual( titles[ i ] ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |       ); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | }); |