From 194f74f409a91ee1c2f45110dd2f557ad7d26887 Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Sat, 21 Nov 2020 06:24:37 -0500 Subject: [PATCH] fix(types): allow all elements (#169) --- projects/testing-library/src/lib/models.ts | 2 +- projects/testing-library/src/lib/testing-library.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/testing-library/src/lib/models.ts b/projects/testing-library/src/lib/models.ts index 1167925a..bfe01972 100644 --- a/projects/testing-library/src/lib/models.ts +++ b/projects/testing-library/src/lib/models.ts @@ -11,7 +11,7 @@ export interface RenderResult extend * The containing DOM node of your rendered Angular Component. * This is a regular DOM node, so you can call container.querySelector etc. to inspect the children. */ - container: HTMLElement; + container: Element; /** * @description * Prints out the component's DOM with syntax highlighting. diff --git a/projects/testing-library/src/lib/testing-library.ts b/projects/testing-library/src/lib/testing-library.ts index b347b1de..c5237fdb 100644 --- a/projects/testing-library/src/lib/testing-library.ts +++ b/projects/testing-library/src/lib/testing-library.ts @@ -273,7 +273,7 @@ async function waitForElementToBeRemovedWrapper( ): Promise { let cb; if (typeof callback !== 'function') { - const elements = (Array.isArray(callback) ? callback : [callback]) as HTMLElement[]; + const elements = (Array.isArray(callback) ? callback : [callback]) as Element[]; const getRemainingElements = elements.map((element) => { let parent = element.parentElement; while (parent.parentElement) {