2015-05-29 17:33:54 -04:00
|
|
|
import {verifyNoBrowserErrors} from 'angular2/src/test_lib/e2e_util';
|
2015-05-04 21:34:06 -04:00
|
|
|
|
2015-05-29 17:33:54 -04:00
|
|
|
describe('md-radio-button', function() {
|
2015-05-04 21:34:06 -04:00
|
|
|
var url = 'examples/src/material/radio/index.html';
|
|
|
|
|
|
|
|
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
|
|
|
});
|