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-radio-button', function() {
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-04 18:34:06 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  var url = 'examples/src/material/radio/index.html';
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  beforeEach(() => { browser.get(url); });
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-29 14:33:54 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  afterEach(verifyNoBrowserErrors);
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-04 18:34:06 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-12 08:54:47 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  it('should check one radio button and then check another', () => {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    var standaloneRadios = element.all(by.css('[name="element"]'));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    var firstRadio = standaloneRadios.first();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    var lastRadio = standaloneRadios.last();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    firstRadio.click();
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-29 14:33:54 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    expect(firstRadio.getAttribute('aria-checked')).toEqual('true');
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-12 08:54:47 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    lastRadio.click();
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-29 14:33:54 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    expect(firstRadio.getAttribute('aria-checked')).toEqual('false');
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    expect(lastRadio.getAttribute('aria-checked')).toEqual('true');
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-12 08:54:47 -07:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  });
							 | 
						
					
						
							
								
									
										
										
										
											2015-05-04 18:34:06 -07:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								});
							 |