onclick-menu-item.component.spec.ts (dspace-angular-dspace-7.0) | : | onclick-menu-item.component.spec.ts (dspace-angular-dspace-7.1) | ||
---|---|---|---|---|
skipping to change at line 47 | skipping to change at line 47 | |||
it('should contain the correct text', () => { | it('should contain the correct text', () => { | |||
expect(component).toBeTruthy(); | expect(component).toBeTruthy(); | |||
}); | }); | |||
it('should contain the text element', () => { | it('should contain the text element', () => { | |||
const textContent = debugElement.query(By.css('a')).nativeElement.textConten t; | const textContent = debugElement.query(By.css('a')).nativeElement.textConten t; | |||
expect(textContent).toEqual(text); | expect(textContent).toEqual(text); | |||
}); | }); | |||
it('should contain call the function on the item when clicked', () => { | it('should call the function on the item when clicked', () => { | |||
debugElement.query(By.css('a.nav-link')).triggerEventHandler('click', {}); | debugElement.query(By.css('a.nav-link')).triggerEventHandler('click', new Ev | |||
ent(('click'))); | ||||
expect(item.function).toHaveBeenCalled(); | expect(item.function).toHaveBeenCalled(); | |||
}); | }); | |||
}); | }); | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 3 lines changed or added |