Has the ripple loader create the host's ripple, then disables and re-enables the host.
()
| 18 | |
| 19 | /** Has the ripple loader create the host's ripple, then disables and re-enables the host. */ |
| 20 | function createReenabledRipple() { |
| 21 | const rippleLoader = TestBed.inject(MatRippleLoader); |
| 22 | rippleLoader.configureRipple(host, {className: 'test-ripple'}); |
| 23 | |
| 24 | // Hovering makes the ripple loader create the ripple before the host is disabled. |
| 25 | dispatchMouseEvent(host, 'mouseenter'); |
| 26 | |
| 27 | rippleLoader.setDisabled(host, true); |
| 28 | rippleLoader.setDisabled(host, false); |
| 29 | } |
| 30 | |
| 31 | it('should show a ripple when pressing a re-enabled host', () => { |
| 32 | createReenabledRipple(); |
no test coverage detected