File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ await expect.element(page.getByText('Vitest')).toBeInViewport({ ratio: 1 })
324324## toContainElement
325325
326326` ` ` ts
327- function toContainElement(element: HTMLElement | SVGElement | null): Promise<void>
327+ function toContainElement(element: HTMLElement | SVGElement | Locator | null): Promise<void>
328328` ` `
329329
330330This allows you to assert whether an element contains another element as a descendant or not .
Original file line number Diff line number Diff line change 11// Disable automatic exports.
22
33import { ARIARole } from './aria-role.ts'
4- import { ScreenshotComparatorRegistry , ScreenshotMatcherOptions } from './context.js'
4+ import { Locator , ScreenshotComparatorRegistry , ScreenshotMatcherOptions } from './context.js'
55
66export interface TestingLibraryMatchers < E , R > {
77 /**
@@ -207,7 +207,7 @@ export interface TestingLibraryMatchers<E, R> {
207207 * await expect.element(ancestor).not.toContainElement(nonExistentElement)
208208 * @see https://vitest.dev/guide/browser/assertion-api#tocontainelement
209209 */
210- toContainElement ( element : HTMLElement | SVGElement | null ) : R
210+ toContainElement ( element : HTMLElement | SVGElement | Locator | null ) : R
211211 /**
212212 * @description
213213 * Assert whether a string representing a HTML element is contained in another element.
You can’t perform that action at this time.
0 commit comments