mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 13:03:04 +00:00
62589: Added tests for more coverage
This commit is contained in:
@@ -101,4 +101,18 @@ describe('ItemSelectComponent', () => {
|
||||
expect(comp.confirm.emit).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe('when cancel is clicked', () => {
|
||||
let cancelButton: HTMLButtonElement;
|
||||
|
||||
beforeEach(() => {
|
||||
cancelButton = fixture.debugElement.query(By.css('button.collection-cancel')).nativeElement;
|
||||
spyOn(comp.cancel, 'emit').and.callThrough();
|
||||
});
|
||||
|
||||
it('should emit a cancel event',() => {
|
||||
cancelButton.click();
|
||||
expect(comp.cancel.emit).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user