| 
									
										
										
										
											2016-11-08 17:31:02 +00:00
										 |  |  | 'use strict'; // necessary for es6 output in node
 | 
					
						
							| 
									
										
										
										
											2016-10-06 23:25:52 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | import { browser, element, by } from 'protractor'; | 
					
						
							| 
									
										
										
										
											2016-11-10 14:58:14 +00:00
										 |  |  | import { setProtractorToHybridMode } from '../protractor-helpers'; | 
					
						
							| 
									
										
										
										
											2016-10-06 23:25:52 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-11 15:36:53 +03:00
										 |  |  | describe('Upgrade Tests', function () { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-10 14:58:14 +00:00
										 |  |  |   beforeAll(function () { | 
					
						
							| 
									
										
										
										
											2016-11-10 15:27:42 +00:00
										 |  |  |     setProtractorToHybridMode(); | 
					
						
							| 
									
										
										
										
											2016-11-10 14:58:14 +00:00
										 |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-26 15:24:10 +01:00
										 |  |  |   describe('AngularJS Auto-bootstrap', function() { | 
					
						
							| 
									
										
										
										
											2016-04-11 15:36:53 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  |     beforeAll(function () { | 
					
						
							|  |  |  |       browser.get('/index-ng-app.html'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     it('bootstraps as expected', function () { | 
					
						
							|  |  |  |       expect(element(by.css('#message')).getText()).toEqual('Hello world'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-26 15:24:10 +01:00
										 |  |  |   describe('AngularJS JavaScript Bootstrap', function() { | 
					
						
							| 
									
										
										
										
											2016-04-11 15:36:53 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  |     beforeAll(function () { | 
					
						
							|  |  |  |       browser.get('/index-bootstrap.html'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     it('bootstraps as expected', function () { | 
					
						
							|  |  |  |       expect(element(by.css('#message')).getText()).toEqual('Hello world'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-26 15:24:10 +01:00
										 |  |  |   describe('AngularJS-Angular Hybrid Bootstrap', function() { | 
					
						
							| 
									
										
										
										
											2016-04-11 15:36:53 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  |     beforeAll(function () { | 
					
						
							| 
									
										
										
										
											2017-01-26 15:24:10 +01:00
										 |  |  |       browser.get('/index-ajs-a-hybrid-bootstrap.html'); | 
					
						
							| 
									
										
										
										
											2016-04-11 15:36:53 +03:00
										 |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     it('bootstraps as expected', function () { | 
					
						
							|  |  |  |       expect(element(by.css('#message')).getText()).toEqual('Hello world'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   describe('Upgraded static component', function() { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     beforeAll(function () { | 
					
						
							|  |  |  |       browser.get('/index-upgrade-static.html'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     it('renders', function () { | 
					
						
							|  |  |  |       expect(element(by.css('h2')).getText()).toEqual('Windstorm details!'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   describe('Upgraded component with IO', function() { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     beforeAll(function () { | 
					
						
							|  |  |  |       browser.get('/index-upgrade-io.html'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     it('has inputs', function () { | 
					
						
							|  |  |  |       expect(element(by.css('h2')).getText()).toEqual('Windstorm details!'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     it('has outputs', function () { | 
					
						
							|  |  |  |       element(by.buttonText('Delete')).click(); | 
					
						
							|  |  |  |       expect(element(by.css('h2')).getText()).toEqual('Ex-Windstorm details!'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   describe('Downgraded static component', function() { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     beforeAll(function () { | 
					
						
							|  |  |  |       browser.get('/index-downgrade-static.html'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     it('renders', function () { | 
					
						
							|  |  |  |       expect(element(by.css('h2')).getText()).toEqual('Windstorm details!'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   describe('Downgraded component with IO', function() { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     beforeAll(function () { | 
					
						
							|  |  |  |       browser.get('/index-downgrade-io.html'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     it('has inputs', function () { | 
					
						
							|  |  |  |       expect(element.all(by.css('h2')).first().getText()).toEqual('Windstorm details!'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-15 01:05:55 +00:00
										 |  |  |     xit('has outputs', function () { | 
					
						
							| 
									
										
										
										
											2016-04-11 15:36:53 +03:00
										 |  |  |       element.all(by.buttonText('Delete')).first().click(); | 
					
						
							|  |  |  |       expect(element.all(by.css('h2')).first().getText()).toEqual('Ex-Windstorm details!'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     it('supports ng-repeat', function () { | 
					
						
							|  |  |  |       expect(element.all(by.css('hero-detail')).count()).toBe(3); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   describe('Downgraded component with content projection', function() { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     beforeAll(function () { | 
					
						
							| 
									
										
										
										
											2017-01-26 15:24:10 +01:00
										 |  |  |       browser.get('/index-ajs-to-a-projection.html'); | 
					
						
							| 
									
										
										
										
											2016-04-11 15:36:53 +03:00
										 |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     it('can be transcluded into', function () { | 
					
						
							|  |  |  |       expect(element(by.css('hero-detail')).getText()).toContain('Specific powers of controlling winds'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   describe('Upgraded component with transclusion', function() { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     beforeAll(function () { | 
					
						
							| 
									
										
										
										
											2017-01-26 15:24:10 +01:00
										 |  |  |       browser.get('/index-a-to-ajs-transclusion.html'); | 
					
						
							| 
									
										
										
										
											2016-04-11 15:36:53 +03:00
										 |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     it('can be projected into', function () { | 
					
						
							|  |  |  |       expect(element(by.css('hero-detail')).getText()).toContain('Specific powers of controlling winds'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-26 15:24:10 +01:00
										 |  |  |   describe('Upgrading AngularJS Providers', function() { | 
					
						
							| 
									
										
										
										
											2016-04-11 15:36:53 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  |     beforeAll(function () { | 
					
						
							| 
									
										
										
										
											2017-01-26 15:24:10 +01:00
										 |  |  |       browser.get('/index-ajs-to-a-providers.html'); | 
					
						
							| 
									
										
										
										
											2016-04-11 15:36:53 +03:00
										 |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     it('works', function () { | 
					
						
							|  |  |  |       expect(element(by.css('h2')).getText()).toBe('1: Windstorm'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-01-26 15:24:10 +01:00
										 |  |  |   describe('Downgrading Angular Providers', function() { | 
					
						
							| 
									
										
										
										
											2016-04-11 15:36:53 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  |     beforeAll(function () { | 
					
						
							| 
									
										
										
										
											2017-01-26 15:24:10 +01:00
										 |  |  |       browser.get('/index-a-to-ajs-providers.html'); | 
					
						
							| 
									
										
										
										
											2016-04-11 15:36:53 +03:00
										 |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     it('works', function () { | 
					
						
							|  |  |  |       expect(element(by.css('h2')).getText()).toBe('1: Windstorm'); | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | }); |