Skip to content

Commit

Permalink
mgr/dashboard: Fixes table suite test
Browse files Browse the repository at this point in the history
This tests sometimes fails if all suites are run, it seems like the
window events had been thrown away at a certain point in that
case. I'm not sure why and when this happens, as running the suite or
the test singly succeed. That said the window object is somehow kept
more globally than it should be in Jest.

Signed-off-by: Stephan Müller <smueller@suse.com>
  • Loading branch information
Stephan Müller committed Jun 18, 2019
1 parent 79b156a commit 598c12e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe('TableComponent', () => {
});

it('should prevent propagation of mouseenter event', (done) => {
fixture.detectChanges();
component.ngOnInit();
const mouseEvent = new MouseEvent('mouseenter');
mouseEvent.stopPropagation = () => done();
fixture.debugElement.nativeElement.dispatchEvent(mouseEvent);
Expand Down

0 comments on commit 598c12e

Please sign in to comment.