Skip to content

Instantly share code, notes, and snippets.

@IAfanasov
Last active August 31, 2020 06:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IAfanasov/9d55b485391ff010e229e436637c8332 to your computer and use it in GitHub Desktop.
Save IAfanasov/9d55b485391ff010e229e436637c8332 to your computer and use it in GitHub Desktop.
non-atomic-test.ts
it('should use requested position', () => {
const fixture = createTestComponent(`<div ngbTooltip="Great tip!" placement="left"></div>`);
const directive = fixture.debugElement.query(By.directive(NgbTooltip));
triggerEvent(directive, 'mouseenter');
fixture.detectChanges();
const windowEl = getWindow(fixture.nativeElement);
expect(windowEl).toHaveCssClass('tooltip');
expect(windowEl).toHaveCssClass('bs-tooltip-left');
expect(windowEl.textContent.trim()).toBe('Great tip!');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment