From b636cc09d671d884d258c9921cc6332c6c2cc23c Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Tue, 23 Oct 2018 21:53:50 +0200 Subject: [PATCH] chore: fix compilation error in bottom sheet tests (#13775) Fixes a compilation error that got in through a PR that was opened before we updated to TS 3.1. --- src/lib/bottom-sheet/bottom-sheet.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/bottom-sheet/bottom-sheet.spec.ts b/src/lib/bottom-sheet/bottom-sheet.spec.ts index f473a329858..0d2bda257de 100644 --- a/src/lib/bottom-sheet/bottom-sheet.spec.ts +++ b/src/lib/bottom-sheet/bottom-sheet.spec.ts @@ -582,18 +582,18 @@ describe('MatBottomSheet', () => { viewContainerFixture.detectChanges(); flushMicrotasks(); - expect(document.activeElement.id) + expect(document.activeElement!.id) .not.toBe('bottom-sheet-trigger', 'Expected the focus to change when sheet was opened.'); bottomSheetRef.dismiss(); - expect(document.activeElement.id).not.toBe('bottom-sheet-trigger', + expect(document.activeElement!.id).not.toBe('bottom-sheet-trigger', 'Expcted the focus not to have changed before the animation finishes.'); flushMicrotasks(); viewContainerFixture.detectChanges(); tick(500); - expect(document.activeElement.id).not.toBe('bottom-sheet-trigger', + expect(document.activeElement!.id).not.toBe('bottom-sheet-trigger', 'Expected the trigger not to be refocused on close.'); document.body.removeChild(button);