Skip to content
Permalink
Browse files

mgr/dashboard: Fixes table suite test

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...
Devp00l committed Jun 17, 2019
1 parent 79b156a commit 598c12e5fe33d8ca3887d3cbcb7cdb6774ec5b9a
@@ -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);

0 comments on commit 598c12e

Please sign in to comment.
You can’t perform that action at this time.