Created
August 5, 2020 07:33
-
-
Save IAfanasov/93b89a9b479b857665889c8d1f857145 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
describe('placement="left"', () => { | |
let windowEl; | |
beforeEach(() => { | |
const fixture = createTestComponent(`<div ngbTooltip="Great tip!" placement="left"></div>`); | |
const directive = fixture.debugElement.query(By.directive(NgbTooltip)); | |
triggerEvent(directive, 'mouseenter'); | |
fixture.detectChanges(); | |
windowEl = getWindow(fixture.nativeElement); | |
}); | |
it('should have tooltip css class', () => { | |
expect(windowEl).toHaveCssClass('tooltip'); | |
}); | |
it('should have bs-tooltip-left css class', () => { | |
expect(windowEl).toHaveCssClass('bs-tooltip-left'); | |
}); | |
it('should bind the tooltip text', () => { | |
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