diff --git a/src/lib/button/button.html b/src/lib/button/button.html index 4e3df0e22666..a1636be45494 100644 --- a/src/lib/button/button.html +++ b/src/lib/button/button.html @@ -1 +1,6 @@
diff --git a/src/lib/button/button.spec.ts b/src/lib/button/button.spec.ts index 85c0f7575a0b..e2bec8b31473 100644 --- a/src/lib/button/button.spec.ts +++ b/src/lib/button/button.spec.ts @@ -120,7 +120,22 @@ describe('MdButton', () => { fixture.detectChanges(); expect(buttonDebugElement.nativeElement.getAttribute('aria-disabled')).toBe('true'); }); + }); + + // Ripple tests. + describe('button ripples', () => { + it('should remove ripple if md-ripple-disabled input is set', () => { + let fixture = TestBed.createComponent(TestApp); + let testComponent = fixture.debugElement.componentInstance; + let buttonDebugElement = fixture.debugElement.query(By.css('button')); + fixture.detectChanges(); + expect(buttonDebugElement.nativeElement.querySelectorAll('[md-ripple]').length).toBe(1); + + testComponent.rippleDisabled = true; + fixture.detectChanges(); + expect(buttonDebugElement.nativeElement.querySelectorAll('[md-ripple]').length).toBe(0); + }); }); }); +