Created
December 23, 2019 12:54
-
-
Save lcoenen/55072090bacf4f000dafeb4d56c8ea9e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it.only('should pass extend and remove from more-option component', () => { | |
spyOn(component.extend, 'emit'); | |
const suppressed = generateMockSuppressed(); | |
const moreOptions = fixture.debugElement.query(By.directive(DSAMoreOptionsComponent)); | |
// moreOptions doens't return anything | |
moreOptions.triggerEventHandler('remove', {element: suppressed}); | |
expect(suppressed.expect.emit).toHaveBeenCalledWith({element: suppressed}); | |
moreOptions.triggerEventHandler('extend', {delay: 48, element: suppressed}); | |
expect(suppressed.expect.emit).toHaveBeenCalledWith({delay: 48, element: suppressed}); | |
}) | |
// But it exists in the table | |
<ng-container matColumnDef="moreOptions"> | |
<th mat-header-cell *matHeaderCellDef></th> | |
<td mat-cell *matCellDef="let element" class="right-align"> | |
<taas-dsa-more-options | |
[element]="element" | |
(extend)="onExtend($event)" | |
(remove)="onRemove($event)" | |
></taas-dsa-more-options> | |
</td> | |
</ng-container> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment