| 
									
										
										
										
											2015-05-29 14:33:54 -07:00
										 |  |  | import {verifyNoBrowserErrors} from 'angular2/src/test_lib/e2e_util'; | 
					
						
							| 
									
										
										
										
											2015-05-04 18:34:06 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-29 14:33:54 -07:00
										 |  |  | describe('md-progress-linear', function() { | 
					
						
							| 
									
										
										
										
											2015-05-04 18:34:06 -07:00
										 |  |  |   var url = 'examples/src/material/progress-linear/index.html'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   beforeEach(() => { browser.get(url); }); | 
					
						
							| 
									
										
										
										
											2015-05-29 14:33:54 -07:00
										 |  |  |   afterEach(verifyNoBrowserErrors); | 
					
						
							| 
									
										
										
										
											2015-05-04 18:34:06 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |   it('should increment and decrement progress', function() { | 
					
						
							|  |  |  |     var progressBar = element.all(by.css('md-progress-linear')).first(); | 
					
						
							|  |  |  |     var incrementButton = element(by.id('increment')); | 
					
						
							|  |  |  |     var decrementButton = element(by.id('decrement')); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     var initialValue = progressBar.getAttribute('aria-valuenow'); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     incrementButton.click(); | 
					
						
							|  |  |  |     expect(progressBar.getAttribute('aria-valuenow')).toBeGreaterThan(initialValue); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     decrementButton.click(); | 
					
						
							|  |  |  |     decrementButton.click(); | 
					
						
							|  |  |  |     expect(progressBar.getAttribute('aria-valuenow')).toBeLessThan(initialValue); | 
					
						
							|  |  |  |   }); | 
					
						
							|  |  |  | }); |