diff --git a/src/lib/radio/radio.spec.ts b/src/lib/radio/radio.spec.ts
index 6fa1eb6642fe..24dd10130502 100644
--- a/src/lib/radio/radio.spec.ts
+++ b/src/lib/radio/radio.spec.ts
@@ -152,7 +152,7 @@ describe('MdRadio', () => {
expect(spies[1]).toHaveBeenCalledTimes(1);
});
- it(`should not emit a change event from the radio group when change group value
+ it(`should not emit a change event from the radio group when change group value
programmatically`, () => {
expect(groupInstance.value).toBeFalsy();
@@ -235,7 +235,7 @@ describe('MdRadio', () => {
}
}));
- it(`should update the group's selected radio to null when unchecking that radio
+ it(`should update the group's selected radio to null when unchecking that radio
programmatically`, () => {
let changeSpy = jasmine.createSpy('radio-group change listener');
groupInstance.change.subscribe(changeSpy);
@@ -485,6 +485,24 @@ describe('MdRadio', () => {
expect(fruitRadioNativeInputs[0].getAttribute('aria-labelledby')).toBe('uvw');
});
+
+ it('should add a ripple when the native input element is focused', () => {
+ let hostElement = seasonRadioInstances[0].getHostElement() as HTMLElement;
+ let input = hostElement.querySelector('input') as HTMLInputElement;
+ let label = hostElement.querySelector('label') as HTMLLabelElement;
+
+ expect(label.classList).not.toContain('md-ripple-focused');
+
+ dispatchEvent('focus', input);
+ fixture.detectChanges();
+
+ expect(label.classList).toContain('md-ripple-focused');
+
+ dispatchEvent('blur', input);
+ fixture.detectChanges();
+
+ expect(label.classList).not.toContain('md-ripple-focused');
+ });
});
});
@@ -514,11 +532,11 @@ class RadiosInsideRadioGroup {
Spring
Summer
Autumn
-
+
Spring
Summer
Autumn
-
+
Baby Banana