| 485 | let rippleDirective: MatRipple; |
| 486 | |
| 487 | function createTestComponent( |
| 488 | rippleConfig: RippleGlobalOptions, |
| 489 | testComponent: any = BasicRippleContainer, |
| 490 | extraProviders: Provider[] = [], |
| 491 | ) { |
| 492 | // Reset the previously configured testing module to be able set new providers. |
| 493 | // The testing module has been initialized in the root describe group for the ripples. |
| 494 | TestBed.resetTestingModule(); |
| 495 | TestBed.configureTestingModule({ |
| 496 | providers: [ |
| 497 | {provide: MAT_RIPPLE_GLOBAL_OPTIONS, useValue: rippleConfig}, |
| 498 | ...extraProviders, |
| 499 | ], |
| 500 | }); |
| 501 | |
| 502 | fixture = TestBed.createComponent(testComponent); |
| 503 | fixture.detectChanges(); |
| 504 | |
| 505 | rippleTarget = fixture.nativeElement.querySelector('.mat-ripple'); |
| 506 | rippleDirective = fixture.componentInstance.ripple; |
| 507 | } |
| 508 | |
| 509 | it('should work without having any binding set', () => { |
| 510 | createTestComponent({disabled: true}, RippleContainerWithoutBindings); |