2015-10-13 03:29:13 -04:00
|
|
|
import {verifyNoBrowserErrors} from 'angular2/src/testing/e2e_util';
|
2015-05-04 21:34:06 -04:00
|
|
|
|
2015-05-29 17:33:54 -04:00
|
|
|
describe('md-radio-button', function() {
|
2015-10-09 18:25:17 -04:00
|
|
|
var url = 'playground/src/material/radio/index.html';
|
2015-05-04 21:34:06 -04:00
|
|
|
|
|
|
|
beforeEach(() => { browser.get(url); });
|
2015-05-29 17:33:54 -04:00
|
|
|
afterEach(verifyNoBrowserErrors);
|
2015-05-04 21:34:06 -04:00
|
|
|
|
2015-05-12 11:54:47 -04: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 17:33:54 -04:00
|
|
|
expect(firstRadio.getAttribute('aria-checked')).toEqual('true');
|
2015-05-12 11:54:47 -04:00
|
|
|
|
|
|
|
lastRadio.click();
|
2015-05-29 17:33:54 -04:00
|
|
|
expect(firstRadio.getAttribute('aria-checked')).toEqual('false');
|
|
|
|
expect(lastRadio.getAttribute('aria-checked')).toEqual('true');
|
2015-05-12 11:54:47 -04:00
|
|
|
});
|
2015-05-04 21:34:06 -04:00
|
|
|
});
|