shadow-dom-testing-library
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -1,12 +0,12 @@ | ||
import {queryAllByRole as $hgUW1$queryAllByRole, buildQueries as $hgUW1$buildQueries, queryAllByLabelText as $hgUW1$queryAllByLabelText, queryAllByPlaceholderText as $hgUW1$queryAllByPlaceholderText, queryAllByText as $hgUW1$queryAllByText, queryAllByDisplayValue as $hgUW1$queryAllByDisplayValue, queryAllByAltText as $hgUW1$queryAllByAltText, queryAllByTitle as $hgUW1$queryAllByTitle, queryAllByTestId as $hgUW1$queryAllByTestId, screen as $hgUW1$screen} from "@testing-library/dom"; | ||
import {queryAllByRole as $aDvLi$queryAllByRole, buildQueries as $aDvLi$buildQueries, queryAllByLabelText as $aDvLi$queryAllByLabelText, queryAllByPlaceholderText as $aDvLi$queryAllByPlaceholderText, queryAllByText as $aDvLi$queryAllByText, queryAllByDisplayValue as $aDvLi$queryAllByDisplayValue, queryAllByAltText as $aDvLi$queryAllByAltText, queryAllByTitle as $aDvLi$queryAllByTitle, queryAllByTestId as $aDvLi$queryAllByTestId, screen as $aDvLi$screen} from "@testing-library/dom"; | ||
function $149c1bd638913645$export$9affc318b3ed2333(container, selectors, options = { | ||
function $e11b67f8ae1787e9$export$9affc318b3ed2333(container, selectors, options = { | ||
shallow: false | ||
}, elements = []) { | ||
const els = $149c1bd638913645$export$695a56d6fdc5c385(container, selectors, options, elements); | ||
const els = $e11b67f8ae1787e9$export$695a56d6fdc5c385(container, selectors, options, elements); | ||
if (Array.isArray(els) && els.length > 0) return els[0]; | ||
return null; | ||
} | ||
function $149c1bd638913645$export$695a56d6fdc5c385(container, selectors, options = { | ||
function $e11b67f8ae1787e9$export$695a56d6fdc5c385(container, selectors, options = { | ||
shallow: false | ||
@@ -28,169 +28,297 @@ }, elements = []) { | ||
} | ||
$149c1bd638913645$export$695a56d6fdc5c385(el1.shadowRoot, selectors, options, elements); | ||
$e11b67f8ae1787e9$export$695a56d6fdc5c385(el1.shadowRoot, selectors, options, elements); | ||
}); | ||
return elements; | ||
} | ||
// Prevent duplicate elements by using ":scope *" | ||
const $e11b67f8ae1787e9$var$scopeQuery = ":scope *"; | ||
// Role | ||
function $149c1bd638913645$export$b61bde353ca2813a(container, role, options) { | ||
const elements = $149c1bd638913645$export$695a56d6fdc5c385(container, "*"); | ||
// @ts-expect-error | ||
return elements.map((el)=>(0, $hgUW1$queryAllByRole)(el, role, options)).flat(Infinity); | ||
function $e11b67f8ae1787e9$export$b61bde353ca2813a(...args) { | ||
const [container, role, options] = args; | ||
return $e11b67f8ae1787e9$export$695a56d6fdc5c385(container, $e11b67f8ae1787e9$var$scopeQuery, options).map((el)=>(0, $aDvLi$queryAllByRole)(el, role, options)).flat(Infinity); | ||
} | ||
const $149c1bd638913645$var$getMultipleRoleError = (_c, role)=>`Found multiple elements with the role of: ${role}`; | ||
const $149c1bd638913645$var$getMissingRoleError = (_c, role)=>`Unable to find an element with the role of: ${role}`; | ||
const [$149c1bd638913645$export$34c8004a0c4ceb6b, $149c1bd638913645$export$a26a8972db96574e, $149c1bd638913645$export$6438e2a5f49a149a, $149c1bd638913645$export$9085c4a83e902646, $149c1bd638913645$export$f066aa57ffd8bd14, ] = (0, $hgUW1$buildQueries)($149c1bd638913645$export$b61bde353ca2813a, $149c1bd638913645$var$getMultipleRoleError, $149c1bd638913645$var$getMissingRoleError); | ||
// Label Text | ||
function $149c1bd638913645$export$9539f07c658e2632(container, id, options) { | ||
const elements = $149c1bd638913645$export$695a56d6fdc5c385(container, "*"); | ||
const $e11b67f8ae1787e9$var$getMultipleRoleError = (_c, role)=>`Found multiple elements with the role of: ${role}`; | ||
const $e11b67f8ae1787e9$var$getMissingRoleError = (_c, role)=>`Unable to find an element with the role of: ${role}`; | ||
const [$e11b67f8ae1787e9$var$_queryByShadowRole, $e11b67f8ae1787e9$var$_getAllByShadowRole, $e11b67f8ae1787e9$var$_getByShadowRole, $e11b67f8ae1787e9$var$_findAllByShadowRole, $e11b67f8ae1787e9$var$_findByShadowRole, ] = (0, $aDvLi$buildQueries)($e11b67f8ae1787e9$export$b61bde353ca2813a, $e11b67f8ae1787e9$var$getMultipleRoleError, $e11b67f8ae1787e9$var$getMissingRoleError); | ||
const $e11b67f8ae1787e9$export$34c8004a0c4ceb6b = (...args)=>{ | ||
// @ts-expect-error | ||
return elements.map((el)=>(0, $hgUW1$queryAllByLabelText)(el, id, options)).flat(Infinity); | ||
} | ||
const $149c1bd638913645$var$getMultipleLabelTextError = (_c, id)=>`Found multiple elements with the label text of: ${id}`; | ||
const $149c1bd638913645$var$getMissingLabelTextError = (_c, id)=>`Unable to find an element with the label text of: ${id}`; | ||
const [$149c1bd638913645$export$48f70537bb987ad5, $149c1bd638913645$export$c926d59a37843e31, $149c1bd638913645$export$39e3867794e8e969, $149c1bd638913645$export$c2a88a1cfa8544d4, $149c1bd638913645$export$7cb90c9029dc223c, ] = (0, $hgUW1$buildQueries)($149c1bd638913645$export$9539f07c658e2632, $149c1bd638913645$var$getMultipleLabelTextError, $149c1bd638913645$var$getMissingLabelTextError); | ||
// Placeholder Text | ||
function $149c1bd638913645$export$17d3ae740d068aac(container, id, options) { | ||
const elements = $149c1bd638913645$export$695a56d6fdc5c385(container, "*"); | ||
return $e11b67f8ae1787e9$var$_queryByShadowRole(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$6438e2a5f49a149a = (...args)=>{ | ||
// @ts-expect-error | ||
return elements.map((el)=>(0, $hgUW1$queryAllByPlaceholderText)(el, id, options)).flat(Infinity); | ||
} | ||
const $149c1bd638913645$var$getMultiplePlaceholderTextError = (_c, id)=>`Found multiple elements with the placeholder text of: ${id}`; | ||
const $149c1bd638913645$var$getMissingPlaceholderTextError = (_c, id)=>`Unable to find an element with the placeholder text of: ${id}`; | ||
const [$149c1bd638913645$export$a906371ebc563f68, $149c1bd638913645$export$6af1965f38911021, $149c1bd638913645$export$c3ec15608c0f628d, $149c1bd638913645$export$9df4ad6ff429e8b9, $149c1bd638913645$export$80874eb82587f9d, ] = (0, $hgUW1$buildQueries)($149c1bd638913645$export$17d3ae740d068aac, $149c1bd638913645$var$getMultiplePlaceholderTextError, $149c1bd638913645$var$getMissingPlaceholderTextError); | ||
// Text | ||
function $149c1bd638913645$export$9b459e18daee0ed3(container, id, options) { | ||
const elements = $149c1bd638913645$export$695a56d6fdc5c385(container, "*"); | ||
return $e11b67f8ae1787e9$var$_getByShadowRole(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$a26a8972db96574e = (...args)=>{ | ||
// @ts-expect-error | ||
return elements.map((el)=>(0, $hgUW1$queryAllByText)(el, id, options)).flat(Infinity); | ||
} | ||
const $149c1bd638913645$var$getMultipleTextError = (_c, id)=>`Found multiple elements with the text of: ${id}`; | ||
const $149c1bd638913645$var$getMissingTextError = (_c, id)=>`Unable to find an element with the text of: ${id}`; | ||
const [$149c1bd638913645$export$38ca11b88d790d5b, $149c1bd638913645$export$604567137d8103c, $149c1bd638913645$export$ae7e0f944bfae409, $149c1bd638913645$export$be3d18a5d64dd38c, $149c1bd638913645$export$3f3af20e601e46f5, ] = (0, $hgUW1$buildQueries)($149c1bd638913645$export$9b459e18daee0ed3, $149c1bd638913645$var$getMultipleTextError, $149c1bd638913645$var$getMissingTextError); | ||
// Display Value | ||
function $149c1bd638913645$export$a627642bfc7c59c9(container, id, options) { | ||
const elements = $149c1bd638913645$export$695a56d6fdc5c385(container, "*"); | ||
return $e11b67f8ae1787e9$var$_getAllByShadowRole(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$f066aa57ffd8bd14 = (...args)=>{ | ||
// @ts-expect-error | ||
return elements.map((el)=>(0, $hgUW1$queryAllByDisplayValue)(el, id, options)).flat(Infinity); | ||
} | ||
const $149c1bd638913645$var$getMultipleDisplayValueError = (_c, id)=>`Found multiple elements with the display value of: ${id}`; | ||
const $149c1bd638913645$var$getMissingDisplayValueError = (_c, id)=>`Unable to find an element with the display value of: ${id}`; | ||
const [$149c1bd638913645$export$2001286d327d4bea, $149c1bd638913645$export$873426746130c2d9, $149c1bd638913645$export$192e1af966f1b30, $149c1bd638913645$export$b16402da795b1079, $149c1bd638913645$export$d320204a2dfb1360, ] = (0, $hgUW1$buildQueries)($149c1bd638913645$export$a627642bfc7c59c9, $149c1bd638913645$var$getMultipleDisplayValueError, $149c1bd638913645$var$getMissingDisplayValueError); | ||
// Alt Text | ||
function $149c1bd638913645$export$b316f2f4f93a4484(container, id, options) { | ||
const elements = $149c1bd638913645$export$695a56d6fdc5c385(container, "*"); | ||
return $e11b67f8ae1787e9$var$_findByShadowRole(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$9085c4a83e902646 = (...args)=>{ | ||
// @ts-expect-error | ||
return elements.map((el)=>(0, $hgUW1$queryAllByAltText)(el, id, options)).flat(Infinity); | ||
return $e11b67f8ae1787e9$var$_findAllByShadowRole(...args); | ||
}; | ||
// Label Text | ||
function $e11b67f8ae1787e9$export$9539f07c658e2632(...args) { | ||
const [container, id, options] = args; | ||
const elements = $e11b67f8ae1787e9$export$695a56d6fdc5c385(container, ":scope *"); | ||
return elements.map((el)=>(0, $aDvLi$queryAllByLabelText)(el, id, options)).flat(Infinity); | ||
} | ||
const $149c1bd638913645$var$getMultipleAltTextError = (_c, id)=>`Found multiple elements with the alt text of: ${id}`; | ||
const $149c1bd638913645$var$getMissingAltTextError = (_c, id)=>`Unable to find an element with the alt text of: ${id}`; | ||
const [$149c1bd638913645$export$48244bccd355daa4, $149c1bd638913645$export$ddb81738fca525b, $149c1bd638913645$export$6ab7f9c4148d8c7e, $149c1bd638913645$export$691a451253055b6a, $149c1bd638913645$export$96c742c61aad226a, ] = (0, $hgUW1$buildQueries)($149c1bd638913645$export$b316f2f4f93a4484, $149c1bd638913645$var$getMultipleAltTextError, $149c1bd638913645$var$getMissingAltTextError); | ||
// Title | ||
function $149c1bd638913645$export$81149a365d046c59(container, id, options) { | ||
const elements = $149c1bd638913645$export$695a56d6fdc5c385(container, "*"); | ||
const $e11b67f8ae1787e9$var$getMultipleLabelTextError = (_c, id)=>`Found multiple elements with the label text of: ${id}`; | ||
const $e11b67f8ae1787e9$var$getMissingLabelTextError = (_c, id)=>`Unable to find an element with the label text of: ${id}`; | ||
const [$e11b67f8ae1787e9$var$_queryByShadowLabelText, $e11b67f8ae1787e9$var$_getAllByShadowLabelText, $e11b67f8ae1787e9$var$_getByShadowLabelText, $e11b67f8ae1787e9$var$_findAllByShadowLabelText, $e11b67f8ae1787e9$var$_findByShadowLabelText, ] = (0, $aDvLi$buildQueries)($e11b67f8ae1787e9$export$9539f07c658e2632, $e11b67f8ae1787e9$var$getMultipleLabelTextError, $e11b67f8ae1787e9$var$getMissingLabelTextError); | ||
const $e11b67f8ae1787e9$export$48f70537bb987ad5 = (...args)=>{ | ||
// @ts-expect-error | ||
return elements.map((el)=>(0, $hgUW1$queryAllByTitle)(el, id, options)).flat(Infinity); | ||
return $e11b67f8ae1787e9$var$_queryByShadowLabelText(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$39e3867794e8e969 = (...args)=>{ | ||
// @ts-expect-error | ||
return $e11b67f8ae1787e9$var$_getByShadowLabelText(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$c926d59a37843e31 = (...args)=>{ | ||
// @ts-expect-error | ||
return $e11b67f8ae1787e9$var$_getAllByShadowLabelText(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$7cb90c9029dc223c = (...args)=>{ | ||
// @ts-expect-error | ||
return $e11b67f8ae1787e9$var$_findByShadowLabelText(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$c2a88a1cfa8544d4 = (...args)=>{ | ||
// @ts-expect-error | ||
return $e11b67f8ae1787e9$var$_findAllByShadowLabelText(...args); | ||
}; | ||
// Placeholder Text | ||
function $e11b67f8ae1787e9$export$17d3ae740d068aac(...args) { | ||
const [container, id, options] = args; | ||
return $e11b67f8ae1787e9$export$695a56d6fdc5c385(container, $e11b67f8ae1787e9$var$scopeQuery, options).map((el)=>(0, $aDvLi$queryAllByPlaceholderText)(el, id, options)).flat(Infinity); | ||
} | ||
const $149c1bd638913645$var$getMultipleTitleError = (_c, id)=>`Found multiple elements with the title of: ${id}`; | ||
const $149c1bd638913645$var$getMissingTitleError = (_c, id)=>`Unable to find an element with the title of: ${id}`; | ||
const [$149c1bd638913645$export$2d37e9704af35df7, $149c1bd638913645$export$91768458228357a9, $149c1bd638913645$export$2e82d9fafa94a92a, $149c1bd638913645$export$8bf9a77379937c70, $149c1bd638913645$export$ab97c9f0a38ef203, ] = (0, $hgUW1$buildQueries)($149c1bd638913645$export$81149a365d046c59, $149c1bd638913645$var$getMultipleTitleError, $149c1bd638913645$var$getMissingTitleError); | ||
// Test Id | ||
function $149c1bd638913645$export$5a4a9cc7db92e4b7(container, id, options) { | ||
const elements = $149c1bd638913645$export$695a56d6fdc5c385(container, "*"); | ||
const $e11b67f8ae1787e9$var$getMultiplePlaceholderTextError = (_c, id)=>`Found multiple elements with the placeholder text of: ${id}`; | ||
const $e11b67f8ae1787e9$var$getMissingPlaceholderTextError = (_c, id)=>`Unable to find an element with the placeholder text of: ${id}`; | ||
const [$e11b67f8ae1787e9$var$_queryByShadowPlaceholderText, $e11b67f8ae1787e9$var$_getAllByShadowPlaceholderText, $e11b67f8ae1787e9$var$_getByShadowPlaceholderText, $e11b67f8ae1787e9$var$_findAllByShadowPlaceholderText, $e11b67f8ae1787e9$var$_findByShadowPlaceholderText, ] = (0, $aDvLi$buildQueries)($e11b67f8ae1787e9$export$17d3ae740d068aac, $e11b67f8ae1787e9$var$getMultiplePlaceholderTextError, $e11b67f8ae1787e9$var$getMissingPlaceholderTextError); | ||
const $e11b67f8ae1787e9$export$a906371ebc563f68 = (...args)=>{ | ||
// @ts-expect-error | ||
return elements.map((el)=>(0, $hgUW1$queryAllByTestId)(el, id, options)).flat(Infinity); | ||
return $e11b67f8ae1787e9$var$_queryByShadowPlaceholderText(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$c3ec15608c0f628d = (...args)=>{ | ||
// @ts-expect-error | ||
return $e11b67f8ae1787e9$var$_getByShadowPlaceholderText(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$6af1965f38911021 = (...args)=>{ | ||
// @ts-expect-error | ||
return $e11b67f8ae1787e9$var$_getAllByShadowPlaceholderText(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$80874eb82587f9d = (...args)=>{ | ||
// @ts-expect-error | ||
return $e11b67f8ae1787e9$var$_findByShadowPlaceholderText(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$9df4ad6ff429e8b9 = (...args)=>{ | ||
// @ts-expect-error | ||
return $e11b67f8ae1787e9$var$_findAllByShadowPlaceholderText(...args); | ||
}; | ||
// Text | ||
function $e11b67f8ae1787e9$export$9b459e18daee0ed3(...args) { | ||
const [container, id, options] = args; | ||
return $e11b67f8ae1787e9$export$695a56d6fdc5c385(container, $e11b67f8ae1787e9$var$scopeQuery, options).map((el)=>(0, $aDvLi$queryAllByText)(el, id, options)).flat(Infinity); | ||
} | ||
const $149c1bd638913645$var$getMultipleTestIdError = (_c, id)=>`Found multiple elements with the test id of: ${id}`; | ||
const $149c1bd638913645$var$getMissingTestIdError = (_c, id)=>`Unable to find an element with the test id of: ${id}`; | ||
const [$149c1bd638913645$export$2c9e0a3740cc548d, $149c1bd638913645$export$ba52add18bb42206, $149c1bd638913645$export$5f09a28aecd87364, $149c1bd638913645$export$891fcb3557097cc3, $149c1bd638913645$export$a6a97556df2f65d6, ] = (0, $hgUW1$buildQueries)($149c1bd638913645$export$5a4a9cc7db92e4b7, $149c1bd638913645$var$getMultipleTestIdError, $149c1bd638913645$var$getMissingTestIdError); | ||
// Shadows the following: https://testing-library.com/docs/queries/about/#priority | ||
let $149c1bd638913645$export$be623a1d3e871e62 = { | ||
...(0, $hgUW1$screen), | ||
// Role | ||
queryAllByShadowRole: (role, options)=>$149c1bd638913645$export$b61bde353ca2813a(document.documentElement, role, options), | ||
// Pretty sure this is a typing issue with the buildQueries generator. | ||
const $e11b67f8ae1787e9$var$getMultipleTextError = (_c, id)=>`Found multiple elements with the text of: ${id}`; | ||
const $e11b67f8ae1787e9$var$getMissingTextError = (_c, id)=>`Unable to find an element with the text of: ${id}`; | ||
const [$e11b67f8ae1787e9$var$_queryByShadowText, $e11b67f8ae1787e9$var$_getAllByShadowText, $e11b67f8ae1787e9$var$_getByShadowText, $e11b67f8ae1787e9$var$_findAllByShadowText, $e11b67f8ae1787e9$var$_findByShadowText, ] = (0, $aDvLi$buildQueries)($e11b67f8ae1787e9$export$9b459e18daee0ed3, $e11b67f8ae1787e9$var$getMultipleTextError, $e11b67f8ae1787e9$var$getMissingTextError); | ||
const $e11b67f8ae1787e9$export$38ca11b88d790d5b = (...args)=>{ | ||
// @ts-expect-error | ||
queryByShadowRole: (role, options)=>$149c1bd638913645$export$34c8004a0c4ceb6b(document.documentElement, role, options), | ||
return $e11b67f8ae1787e9$var$_queryByShadowText(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$ae7e0f944bfae409 = (...args)=>{ | ||
// @ts-expect-error | ||
getAllByShadowRole: (role, options)=>$149c1bd638913645$export$a26a8972db96574e(document.documentElement, role, options), | ||
return $e11b67f8ae1787e9$var$_getByShadowText(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$604567137d8103c = (...args)=>{ | ||
// @ts-expect-error | ||
getByShadowRole: (role, options)=>$149c1bd638913645$export$6438e2a5f49a149a(document.documentElement, role, options), | ||
// TS expects "role" to be a "string" and not a roleMatcher. | ||
return $e11b67f8ae1787e9$var$_getAllByShadowText(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$3f3af20e601e46f5 = (...args)=>{ | ||
// @ts-expect-error | ||
findAllByShadowRole: (role, ...args)=>$149c1bd638913645$export$9085c4a83e902646(document.documentElement, role, ...args), | ||
return $e11b67f8ae1787e9$var$_findByShadowText(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$be3d18a5d64dd38c = (...args)=>{ | ||
// @ts-expect-error | ||
findByShadowRole: (role, ...args)=>$149c1bd638913645$export$f066aa57ffd8bd14(document.documentElement, role, ...args), | ||
// Label Text | ||
queryAllByShadowLabelText: (id, options)=>$149c1bd638913645$export$9539f07c658e2632(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_findAllByShadowText(...args); | ||
}; | ||
// Display Value | ||
function $e11b67f8ae1787e9$export$a627642bfc7c59c9(...args) { | ||
const [container, id, options] = args; | ||
// @ts-expect-error | ||
queryByShadowLabelText: (id, options)=>$149c1bd638913645$export$48f70537bb987ad5(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$export$695a56d6fdc5c385(container, $e11b67f8ae1787e9$var$scopeQuery, options).map((el)=>(0, $aDvLi$queryAllByDisplayValue)(el, id, options)).flat(Infinity); | ||
} | ||
const $e11b67f8ae1787e9$var$getMultipleDisplayValueError = (_c, id)=>`Found multiple elements with the display value of: ${id}`; | ||
const $e11b67f8ae1787e9$var$getMissingDisplayValueError = (_c, id)=>`Unable to find an element with the display value of: ${id}`; | ||
const [$e11b67f8ae1787e9$var$_queryByShadowDisplayValue, $e11b67f8ae1787e9$var$_getAllByShadowDisplayValue, $e11b67f8ae1787e9$var$_getByShadowDisplayValue, $e11b67f8ae1787e9$var$_findAllByShadowDisplayValue, $e11b67f8ae1787e9$var$_findByShadowDisplayValue, ] = (0, $aDvLi$buildQueries)($e11b67f8ae1787e9$export$a627642bfc7c59c9, $e11b67f8ae1787e9$var$getMultipleDisplayValueError, $e11b67f8ae1787e9$var$getMissingDisplayValueError); | ||
const $e11b67f8ae1787e9$export$2001286d327d4bea = (...args)=>{ | ||
// @ts-expect-error | ||
getAllByShadowLabelText: (id, options)=>$149c1bd638913645$export$c926d59a37843e31(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_queryByShadowDisplayValue(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$192e1af966f1b30 = (...args)=>{ | ||
// @ts-expect-error | ||
getByShadowLabelText: (id, options)=>$149c1bd638913645$export$39e3867794e8e969(document.documentElement, id, options), | ||
findAllByShadowLabelText: (id, ...args)=>$149c1bd638913645$export$c2a88a1cfa8544d4(document.documentElement, id, ...args), | ||
findByShadowLabelText: (id, ...args)=>$149c1bd638913645$export$7cb90c9029dc223c(document.documentElement, id, ...args), | ||
// Placeholder Text | ||
queryAllByShadowPlaceholderText: (id, options)=>$149c1bd638913645$export$17d3ae740d068aac(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_getByShadowDisplayValue(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$873426746130c2d9 = (...args)=>{ | ||
// @ts-expect-error | ||
queryByShadowPlaceholderText: (id, options)=>$149c1bd638913645$export$a906371ebc563f68(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_getAllByShadowDisplayValue(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$d320204a2dfb1360 = (...args)=>{ | ||
// @ts-expect-error | ||
getAllByShadowPlaceholderText: (id, options)=>$149c1bd638913645$export$6af1965f38911021(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_findByShadowDisplayValue(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$b16402da795b1079 = (...args)=>{ | ||
// @ts-expect-error | ||
getByShadowPlaceholderText: (id, options)=>$149c1bd638913645$export$c3ec15608c0f628d(document.documentElement, id, options), | ||
findAllByShadowPlaceholderText: (id, ...args)=>$149c1bd638913645$export$9df4ad6ff429e8b9(document.documentElement, id, ...args), | ||
findByShadowPlaceholderText: (id, ...args)=>$149c1bd638913645$export$80874eb82587f9d(document.documentElement, id, ...args), | ||
// Text | ||
queryAllByShadowText: (id, options)=>$149c1bd638913645$export$9b459e18daee0ed3(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_findAllByShadowDisplayValue(...args); | ||
}; | ||
// Alt Text | ||
function $e11b67f8ae1787e9$export$b316f2f4f93a4484(...args) { | ||
const [container, id, options] = args; | ||
return $e11b67f8ae1787e9$export$695a56d6fdc5c385(container, $e11b67f8ae1787e9$var$scopeQuery, options).map((el)=>(0, $aDvLi$queryAllByAltText)(el, id, options)).flat(Infinity); | ||
} | ||
const $e11b67f8ae1787e9$var$getMultipleAltTextError = (_c, id)=>`Found multiple elements with the alt text of: ${id}`; | ||
const $e11b67f8ae1787e9$var$getMissingAltTextError = (_c, id)=>`Unable to find an element with the alt text of: ${id}`; | ||
const [$e11b67f8ae1787e9$var$_queryByShadowAltText, $e11b67f8ae1787e9$var$_getAllByShadowAltText, $e11b67f8ae1787e9$var$_getByShadowAltText, $e11b67f8ae1787e9$var$_findAllByShadowAltText, $e11b67f8ae1787e9$var$_findByShadowAltText, ] = (0, $aDvLi$buildQueries)($e11b67f8ae1787e9$export$b316f2f4f93a4484, $e11b67f8ae1787e9$var$getMultipleAltTextError, $e11b67f8ae1787e9$var$getMissingAltTextError); | ||
const $e11b67f8ae1787e9$export$48244bccd355daa4 = (...args)=>{ | ||
// @ts-expect-error | ||
queryByShadowText: (id, options)=>$149c1bd638913645$export$38ca11b88d790d5b(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_queryByShadowAltText(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$6ab7f9c4148d8c7e = (...args)=>{ | ||
// @ts-expect-error | ||
getAllByShadowText: (id, options)=>$149c1bd638913645$export$604567137d8103c(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_getByShadowAltText(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$ddb81738fca525b = (...args)=>{ | ||
// @ts-expect-error | ||
getByShadowText: (id, options)=>$149c1bd638913645$export$ae7e0f944bfae409(document.documentElement, id, options), | ||
findAllByShadowText: (id, ...args)=>$149c1bd638913645$export$be3d18a5d64dd38c(document.documentElement, id, ...args), | ||
findByShadowText: (id, ...args)=>$149c1bd638913645$export$3f3af20e601e46f5(document.documentElement, id, ...args), | ||
// Display Value | ||
queryAllByShadowDisplayValue: (id, options)=>$149c1bd638913645$export$a627642bfc7c59c9(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_getAllByShadowAltText(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$96c742c61aad226a = (...args)=>{ | ||
// @ts-expect-error | ||
queryByShadowDisplayValue: (id, options)=>$149c1bd638913645$export$2001286d327d4bea(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_findByShadowAltText(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$691a451253055b6a = (...args)=>{ | ||
// @ts-expect-error | ||
getAllByShadowDisplayValue: (id, options)=>$149c1bd638913645$export$873426746130c2d9(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_findAllByShadowAltText(...args); | ||
}; | ||
// Title | ||
function $e11b67f8ae1787e9$export$81149a365d046c59(...args) { | ||
const [container, id, options] = args; | ||
return $e11b67f8ae1787e9$export$695a56d6fdc5c385(container, $e11b67f8ae1787e9$var$scopeQuery, options).map((el)=>(0, $aDvLi$queryAllByTitle)(el, id, options)).flat(Infinity); | ||
} | ||
const $e11b67f8ae1787e9$var$getMultipleTitleError = (_c, id)=>`Found multiple elements with the title of: ${id}`; | ||
const $e11b67f8ae1787e9$var$getMissingTitleError = (_c, id)=>`Unable to find an element with the title of: ${id}`; | ||
const [$e11b67f8ae1787e9$var$_queryByShadowTitle, $e11b67f8ae1787e9$var$_getAllByShadowTitle, $e11b67f8ae1787e9$var$_getByShadowTitle, $e11b67f8ae1787e9$var$_findAllByShadowTitle, $e11b67f8ae1787e9$var$_findByShadowTitle, ] = (0, $aDvLi$buildQueries)($e11b67f8ae1787e9$export$81149a365d046c59, $e11b67f8ae1787e9$var$getMultipleTitleError, $e11b67f8ae1787e9$var$getMissingTitleError); | ||
const $e11b67f8ae1787e9$export$2d37e9704af35df7 = (...args)=>{ | ||
// @ts-expect-error | ||
getByShadowDisplayValue: (id, options)=>$149c1bd638913645$export$192e1af966f1b30(document.documentElement, id, options), | ||
findAllByShadowDisplayValue: (id, ...args)=>$149c1bd638913645$export$b16402da795b1079(document.documentElement, id, ...args), | ||
findByShadowDisplayValue: (id, ...args)=>$149c1bd638913645$export$d320204a2dfb1360(document.documentElement, id, ...args), | ||
// Alt Text | ||
queryAllByShadowAltText: (id, options)=>$149c1bd638913645$export$b316f2f4f93a4484(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_queryByShadowTitle(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$2e82d9fafa94a92a = (...args)=>{ | ||
// @ts-expect-error | ||
queryByShadowAltText: (id, options)=>$149c1bd638913645$export$48244bccd355daa4(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_getByShadowTitle(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$91768458228357a9 = (...args)=>{ | ||
// @ts-expect-error | ||
getAllByShadowAltText: (id, options)=>$149c1bd638913645$export$ddb81738fca525b(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_getAllByShadowTitle(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$ab97c9f0a38ef203 = (...args)=>{ | ||
// @ts-expect-error | ||
getByShadowAltText: (id, options)=>$149c1bd638913645$export$6ab7f9c4148d8c7e(document.documentElement, id, options), | ||
findAllByShadowAltText: (id, ...args)=>$149c1bd638913645$export$691a451253055b6a(document.documentElement, id, ...args), | ||
findByShadowAltText: (id, ...args)=>$149c1bd638913645$export$96c742c61aad226a(document.documentElement, id, ...args), | ||
// Title | ||
queryAllByShadowTitle: (id, options)=>$149c1bd638913645$export$81149a365d046c59(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_findByShadowTitle(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$8bf9a77379937c70 = (...args)=>{ | ||
// @ts-expect-error | ||
queryByShadowTitle: (id, options)=>$149c1bd638913645$export$2d37e9704af35df7(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_findAllByShadowTitle(...args); | ||
}; | ||
// Test Id | ||
function $e11b67f8ae1787e9$export$5a4a9cc7db92e4b7(...args) { | ||
const [container, id, options] = args; | ||
return $e11b67f8ae1787e9$export$695a56d6fdc5c385(container, $e11b67f8ae1787e9$var$scopeQuery, options).map((el)=>(0, $aDvLi$queryAllByTestId)(el, id, options)).flat(Infinity); | ||
} | ||
const $e11b67f8ae1787e9$var$getMultipleTestIdError = (_c, id)=>`Found multiple elements with the test id of: ${id}`; | ||
const $e11b67f8ae1787e9$var$getMissingTestIdError = (_c, id)=>`Unable to find an element with the test id of: ${id}`; | ||
const [$e11b67f8ae1787e9$var$_queryByShadowTestId, $e11b67f8ae1787e9$var$_getAllByShadowTestId, $e11b67f8ae1787e9$var$_getByShadowTestId, $e11b67f8ae1787e9$var$_findAllByShadowTestId, $e11b67f8ae1787e9$var$_findByShadowTestId, ] = (0, $aDvLi$buildQueries)($e11b67f8ae1787e9$export$5a4a9cc7db92e4b7, $e11b67f8ae1787e9$var$getMultipleTestIdError, $e11b67f8ae1787e9$var$getMissingTestIdError); | ||
const $e11b67f8ae1787e9$export$2c9e0a3740cc548d = (...args)=>{ | ||
// @ts-expect-error | ||
getAllByShadowTitle: (id, options)=>$149c1bd638913645$export$91768458228357a9(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_queryByShadowTestId(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$5f09a28aecd87364 = (...args)=>{ | ||
// @ts-expect-error | ||
getByShadowTitle: (id, options)=>$149c1bd638913645$export$2e82d9fafa94a92a(document.documentElement, id, options), | ||
findAllByShadowTitle: (id, ...args)=>$149c1bd638913645$export$8bf9a77379937c70(document.documentElement, id, ...args), | ||
findByShadowTitle: (id, ...args)=>$149c1bd638913645$export$ab97c9f0a38ef203(document.documentElement, id, ...args), | ||
// Test Id | ||
queryAllByShadowTestId: (id, options)=>$149c1bd638913645$export$5a4a9cc7db92e4b7(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_getByShadowTestId(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$ba52add18bb42206 = (...args)=>{ | ||
// @ts-expect-error | ||
queryByShadowTestId: (id, options)=>$149c1bd638913645$export$2c9e0a3740cc548d(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_getAllByShadowTestId(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$a6a97556df2f65d6 = (...args)=>{ | ||
// @ts-expect-error | ||
getAllByShadowTestId: (id, options)=>$149c1bd638913645$export$ba52add18bb42206(document.documentElement, id, options), | ||
return $e11b67f8ae1787e9$var$_findByShadowTestId(...args); | ||
}; | ||
const $e11b67f8ae1787e9$export$891fcb3557097cc3 = (...args)=>{ | ||
// @ts-expect-error | ||
getByShadowTestId: (id, options)=>$149c1bd638913645$export$5f09a28aecd87364(document.documentElement, id, options), | ||
findAllByShadowTestId: (id, ...args)=>$149c1bd638913645$export$891fcb3557097cc3(document.documentElement, id, ...args), | ||
findByShadowTestId: (id, ...args)=>$149c1bd638913645$export$a6a97556df2f65d6(document.documentElement, id, ...args) | ||
return $e11b67f8ae1787e9$var$_findAllByShadowTestId(...args); | ||
}; | ||
// Shadows the following: https://testing-library.com/docs/queries/about/#priority | ||
let $e11b67f8ae1787e9$export$be623a1d3e871e62 = { | ||
...(0, $aDvLi$screen), | ||
// Role | ||
queryAllByShadowRole: (...args)=>$e11b67f8ae1787e9$export$b61bde353ca2813a(document.documentElement, args[0], args[1]), | ||
queryByShadowRole: (...args)=>$e11b67f8ae1787e9$export$34c8004a0c4ceb6b(document.documentElement, args[0], args[1]), | ||
getAllByShadowRole: (...args)=>$e11b67f8ae1787e9$export$a26a8972db96574e(document.documentElement, args[0], args[1]), | ||
getByShadowRole: (...args)=>$e11b67f8ae1787e9$export$6438e2a5f49a149a(document.documentElement, args[0], args[1]), | ||
findAllByShadowRole: (...args)=>$e11b67f8ae1787e9$export$9085c4a83e902646(document.documentElement, args[0], args[1], args[2]), | ||
findByShadowRole: (...args)=>$e11b67f8ae1787e9$export$f066aa57ffd8bd14(document.documentElement, args[0], args[1], args[2]), | ||
// Label Text | ||
queryAllByShadowLabelText: (...args)=>$e11b67f8ae1787e9$export$9539f07c658e2632(document.documentElement, args[0], args[1]), | ||
queryByShadowLabelText: (...args)=>$e11b67f8ae1787e9$export$48f70537bb987ad5(document.documentElement, args[0], args[1]), | ||
getAllByShadowLabelText: (...args)=>$e11b67f8ae1787e9$export$c926d59a37843e31(document.documentElement, args[0], args[1]), | ||
getByShadowLabelText: (...args)=>$e11b67f8ae1787e9$export$39e3867794e8e969(document.documentElement, args[0], args[1]), | ||
findAllByShadowLabelText: (...args)=>$e11b67f8ae1787e9$export$c2a88a1cfa8544d4(document.documentElement, args[0], args[1], args[2]), | ||
findByShadowLabelText: (...args)=>$e11b67f8ae1787e9$export$7cb90c9029dc223c(document.documentElement, args[0], args[1], args[2]), | ||
// Placeholder Text | ||
queryAllByShadowPlaceholderText: (...args)=>$e11b67f8ae1787e9$export$17d3ae740d068aac(document.documentElement, args[0], args[1]), | ||
queryByShadowPlaceholderText: (...args)=>$e11b67f8ae1787e9$export$a906371ebc563f68(document.documentElement, args[0], args[1]), | ||
getAllByShadowPlaceholderText: (...args)=>$e11b67f8ae1787e9$export$6af1965f38911021(document.documentElement, args[0], args[1]), | ||
getByShadowPlaceholderText: (...args)=>$e11b67f8ae1787e9$export$c3ec15608c0f628d(document.documentElement, args[0], args[1]), | ||
findAllByShadowPlaceholderText: (...args)=>$e11b67f8ae1787e9$export$9df4ad6ff429e8b9(document.documentElement, args[0], args[1], args[2]), | ||
findByShadowPlaceholderText: (...args)=>$e11b67f8ae1787e9$export$80874eb82587f9d(document.documentElement, args[0], args[1], args[2]), | ||
// Text | ||
queryAllByShadowText: (...args)=>$e11b67f8ae1787e9$export$9b459e18daee0ed3(document.documentElement, args[0], args[1]), | ||
queryByShadowText: (...args)=>$e11b67f8ae1787e9$export$38ca11b88d790d5b(document.documentElement, args[0], args[1]), | ||
getAllByShadowText: (...args)=>$e11b67f8ae1787e9$export$604567137d8103c(document.documentElement, args[0], args[1]), | ||
getByShadowText: (...args)=>$e11b67f8ae1787e9$export$ae7e0f944bfae409(document.documentElement, args[0], args[1]), | ||
findAllByShadowText: (...args)=>$e11b67f8ae1787e9$export$be3d18a5d64dd38c(document.documentElement, args[0], args[1], args[2]), | ||
findByShadowText: (...args)=>$e11b67f8ae1787e9$export$3f3af20e601e46f5(document.documentElement, args[0], args[1], args[2]), | ||
// Display Value | ||
queryAllByShadowDisplayValue: (...args)=>$e11b67f8ae1787e9$export$a627642bfc7c59c9(document.documentElement, args[0], args[1]), | ||
queryByShadowDisplayValue: (...args)=>$e11b67f8ae1787e9$export$2001286d327d4bea(document.documentElement, args[0], args[1]), | ||
getAllByShadowDisplayValue: (...args)=>$e11b67f8ae1787e9$export$873426746130c2d9(document.documentElement, args[0], args[1]), | ||
getByShadowDisplayValue: (...args)=>$e11b67f8ae1787e9$export$192e1af966f1b30(document.documentElement, args[0], args[1]), | ||
findAllByShadowDisplayValue: (...args)=>$e11b67f8ae1787e9$export$b16402da795b1079(document.documentElement, args[0], args[1], args[2]), | ||
findByShadowDisplayValue: (...args)=>$e11b67f8ae1787e9$export$d320204a2dfb1360(document.documentElement, args[0], args[1], args[2]), | ||
// Alt Text | ||
queryAllByShadowAltText: (...args)=>$e11b67f8ae1787e9$export$b316f2f4f93a4484(document.documentElement, args[0], args[1]), | ||
queryByShadowAltText: (...args)=>$e11b67f8ae1787e9$export$48244bccd355daa4(document.documentElement, args[0], args[1]), | ||
getAllByShadowAltText: (...args)=>$e11b67f8ae1787e9$export$ddb81738fca525b(document.documentElement, args[0], args[1]), | ||
getByShadowAltText: (...args)=>$e11b67f8ae1787e9$export$6ab7f9c4148d8c7e(document.documentElement, args[0], args[1]), | ||
findAllByShadowAltText: (...args)=>$e11b67f8ae1787e9$export$691a451253055b6a(document.documentElement, args[0], args[1], args[2]), | ||
findByShadowAltText: (...args)=>$e11b67f8ae1787e9$export$96c742c61aad226a(document.documentElement, args[0], args[1], args[2]), | ||
// Title | ||
queryAllByShadowTitle: (...args)=>$e11b67f8ae1787e9$export$81149a365d046c59(document.documentElement, args[0], args[1]), | ||
queryByShadowTitle: (...args)=>$e11b67f8ae1787e9$export$2d37e9704af35df7(document.documentElement, args[0], args[1]), | ||
getAllByShadowTitle: (...args)=>$e11b67f8ae1787e9$export$91768458228357a9(document.documentElement, args[0], args[1]), | ||
getByShadowTitle: (...args)=>$e11b67f8ae1787e9$export$2e82d9fafa94a92a(document.documentElement, args[0], args[1]), | ||
findAllByShadowTitle: (...args)=>$e11b67f8ae1787e9$export$8bf9a77379937c70(document.documentElement, args[0], args[1], args[2]), | ||
findByShadowTitle: (...args)=>$e11b67f8ae1787e9$export$ab97c9f0a38ef203(document.documentElement, args[0], args[1], args[2]), | ||
// Test Id | ||
queryAllByShadowTestId: (...args)=>$e11b67f8ae1787e9$export$5a4a9cc7db92e4b7(document.documentElement, args[0], args[1]), | ||
queryByShadowTestId: (...args)=>$e11b67f8ae1787e9$export$2c9e0a3740cc548d(document.documentElement, args[0], args[1]), | ||
getAllByShadowTestId: (...args)=>$e11b67f8ae1787e9$export$ba52add18bb42206(document.documentElement, args[0], args[1]), | ||
getByShadowTestId: (...args)=>$e11b67f8ae1787e9$export$5f09a28aecd87364(document.documentElement, args[0], args[1]), | ||
findAllByShadowTestId: (...args)=>$e11b67f8ae1787e9$export$891fcb3557097cc3(document.documentElement, args[0], args[1], args[2]), | ||
findByShadowTestId: (...args)=>$e11b67f8ae1787e9$export$a6a97556df2f65d6(document.documentElement, args[0], args[1], args[2]) | ||
}; | ||
export {$149c1bd638913645$export$9affc318b3ed2333 as deepQuerySelector, $149c1bd638913645$export$695a56d6fdc5c385 as deepQuerySelectorAll, $149c1bd638913645$export$b61bde353ca2813a as queryAllByShadowRole, $149c1bd638913645$export$34c8004a0c4ceb6b as queryByShadowRole, $149c1bd638913645$export$a26a8972db96574e as getAllByShadowRole, $149c1bd638913645$export$6438e2a5f49a149a as getByShadowRole, $149c1bd638913645$export$9085c4a83e902646 as findAllByShadowRole, $149c1bd638913645$export$f066aa57ffd8bd14 as findByShadowRole, $149c1bd638913645$export$9539f07c658e2632 as queryAllByShadowLabelText, $149c1bd638913645$export$48f70537bb987ad5 as queryByShadowLabelText, $149c1bd638913645$export$c926d59a37843e31 as getAllByShadowLabelText, $149c1bd638913645$export$39e3867794e8e969 as getByShadowLabelText, $149c1bd638913645$export$c2a88a1cfa8544d4 as findAllByShadowLabelText, $149c1bd638913645$export$7cb90c9029dc223c as findByShadowLabelText, $149c1bd638913645$export$17d3ae740d068aac as queryAllByShadowPlaceholderText, $149c1bd638913645$export$a906371ebc563f68 as queryByShadowPlaceholderText, $149c1bd638913645$export$6af1965f38911021 as getAllByShadowPlaceholderText, $149c1bd638913645$export$c3ec15608c0f628d as getByShadowPlaceholderText, $149c1bd638913645$export$9df4ad6ff429e8b9 as findAllByShadowPlaceholderText, $149c1bd638913645$export$80874eb82587f9d as findByShadowPlaceholderText, $149c1bd638913645$export$9b459e18daee0ed3 as queryAllByShadowText, $149c1bd638913645$export$38ca11b88d790d5b as queryByShadowText, $149c1bd638913645$export$604567137d8103c as getAllByShadowText, $149c1bd638913645$export$ae7e0f944bfae409 as getByShadowText, $149c1bd638913645$export$be3d18a5d64dd38c as findAllByShadowText, $149c1bd638913645$export$3f3af20e601e46f5 as findByShadowText, $149c1bd638913645$export$a627642bfc7c59c9 as queryAllByShadowDisplayValue, $149c1bd638913645$export$2001286d327d4bea as queryByShadowDisplayValue, $149c1bd638913645$export$873426746130c2d9 as getAllByShadowDisplayValue, $149c1bd638913645$export$192e1af966f1b30 as getByShadowDisplayValue, $149c1bd638913645$export$b16402da795b1079 as findAllByShadowDisplayValue, $149c1bd638913645$export$d320204a2dfb1360 as findByShadowDisplayValue, $149c1bd638913645$export$b316f2f4f93a4484 as queryAllByShadowAltText, $149c1bd638913645$export$48244bccd355daa4 as queryByShadowAltText, $149c1bd638913645$export$ddb81738fca525b as getAllByShadowAltText, $149c1bd638913645$export$6ab7f9c4148d8c7e as getByShadowAltText, $149c1bd638913645$export$691a451253055b6a as findAllByShadowAltText, $149c1bd638913645$export$96c742c61aad226a as findByShadowAltText, $149c1bd638913645$export$81149a365d046c59 as queryAllByShadowTitle, $149c1bd638913645$export$2d37e9704af35df7 as queryByShadowTitle, $149c1bd638913645$export$91768458228357a9 as getAllByShadowTitle, $149c1bd638913645$export$2e82d9fafa94a92a as getByShadowTitle, $149c1bd638913645$export$8bf9a77379937c70 as findAllByShadowTitle, $149c1bd638913645$export$ab97c9f0a38ef203 as findByShadowTitle, $149c1bd638913645$export$5a4a9cc7db92e4b7 as queryAllByShadowTestId, $149c1bd638913645$export$2c9e0a3740cc548d as queryByShadowTestId, $149c1bd638913645$export$ba52add18bb42206 as getAllByShadowTestId, $149c1bd638913645$export$5f09a28aecd87364 as getByShadowTestId, $149c1bd638913645$export$891fcb3557097cc3 as findAllByShadowTestId, $149c1bd638913645$export$a6a97556df2f65d6 as findByShadowTestId, $149c1bd638913645$export$be623a1d3e871e62 as screen}; | ||
export {$e11b67f8ae1787e9$export$9affc318b3ed2333 as deepQuerySelector, $e11b67f8ae1787e9$export$695a56d6fdc5c385 as deepQuerySelectorAll, $e11b67f8ae1787e9$export$b61bde353ca2813a as queryAllByShadowRole, $e11b67f8ae1787e9$export$34c8004a0c4ceb6b as queryByShadowRole, $e11b67f8ae1787e9$export$6438e2a5f49a149a as getByShadowRole, $e11b67f8ae1787e9$export$a26a8972db96574e as getAllByShadowRole, $e11b67f8ae1787e9$export$f066aa57ffd8bd14 as findByShadowRole, $e11b67f8ae1787e9$export$9085c4a83e902646 as findAllByShadowRole, $e11b67f8ae1787e9$export$9539f07c658e2632 as queryAllByShadowLabelText, $e11b67f8ae1787e9$export$48f70537bb987ad5 as queryByShadowLabelText, $e11b67f8ae1787e9$export$39e3867794e8e969 as getByShadowLabelText, $e11b67f8ae1787e9$export$c926d59a37843e31 as getAllByShadowLabelText, $e11b67f8ae1787e9$export$7cb90c9029dc223c as findByShadowLabelText, $e11b67f8ae1787e9$export$c2a88a1cfa8544d4 as findAllByShadowLabelText, $e11b67f8ae1787e9$export$17d3ae740d068aac as queryAllByShadowPlaceholderText, $e11b67f8ae1787e9$export$a906371ebc563f68 as queryByShadowPlaceholderText, $e11b67f8ae1787e9$export$c3ec15608c0f628d as getByShadowPlaceholderText, $e11b67f8ae1787e9$export$6af1965f38911021 as getAllByShadowPlaceholderText, $e11b67f8ae1787e9$export$80874eb82587f9d as findByShadowPlaceholderText, $e11b67f8ae1787e9$export$9df4ad6ff429e8b9 as findAllByShadowPlaceholderText, $e11b67f8ae1787e9$export$9b459e18daee0ed3 as queryAllByShadowText, $e11b67f8ae1787e9$export$38ca11b88d790d5b as queryByShadowText, $e11b67f8ae1787e9$export$ae7e0f944bfae409 as getByShadowText, $e11b67f8ae1787e9$export$604567137d8103c as getAllByShadowText, $e11b67f8ae1787e9$export$3f3af20e601e46f5 as findByShadowText, $e11b67f8ae1787e9$export$be3d18a5d64dd38c as findAllByShadowText, $e11b67f8ae1787e9$export$a627642bfc7c59c9 as queryAllByShadowDisplayValue, $e11b67f8ae1787e9$export$2001286d327d4bea as queryByShadowDisplayValue, $e11b67f8ae1787e9$export$192e1af966f1b30 as getByShadowDisplayValue, $e11b67f8ae1787e9$export$873426746130c2d9 as getAllByShadowDisplayValue, $e11b67f8ae1787e9$export$d320204a2dfb1360 as findByShadowDisplayValue, $e11b67f8ae1787e9$export$b16402da795b1079 as findAllByShadowDisplayValue, $e11b67f8ae1787e9$export$b316f2f4f93a4484 as queryAllByShadowAltText, $e11b67f8ae1787e9$export$48244bccd355daa4 as queryByShadowAltText, $e11b67f8ae1787e9$export$6ab7f9c4148d8c7e as getByShadowAltText, $e11b67f8ae1787e9$export$ddb81738fca525b as getAllByShadowAltText, $e11b67f8ae1787e9$export$96c742c61aad226a as findByShadowAltText, $e11b67f8ae1787e9$export$691a451253055b6a as findAllByShadowAltText, $e11b67f8ae1787e9$export$81149a365d046c59 as queryAllByShadowTitle, $e11b67f8ae1787e9$export$2d37e9704af35df7 as queryByShadowTitle, $e11b67f8ae1787e9$export$2e82d9fafa94a92a as getByShadowTitle, $e11b67f8ae1787e9$export$91768458228357a9 as getAllByShadowTitle, $e11b67f8ae1787e9$export$ab97c9f0a38ef203 as findByShadowTitle, $e11b67f8ae1787e9$export$8bf9a77379937c70 as findAllByShadowTitle, $e11b67f8ae1787e9$export$5a4a9cc7db92e4b7 as queryAllByShadowTestId, $e11b67f8ae1787e9$export$2c9e0a3740cc548d as queryByShadowTestId, $e11b67f8ae1787e9$export$5f09a28aecd87364 as getByShadowTestId, $e11b67f8ae1787e9$export$ba52add18bb42206 as getAllByShadowTestId, $e11b67f8ae1787e9$export$a6a97556df2f65d6 as findByShadowTestId, $e11b67f8ae1787e9$export$891fcb3557097cc3 as findAllByShadowTestId, $e11b67f8ae1787e9$export$be623a1d3e871e62 as screen}; | ||
//# sourceMappingURL=shadow-dom-testing-library.js.map |
@@ -1,5 +0,5 @@ | ||
import { ByRoleMatcher, ByRoleOptions, SelectorMatcherOptions, Matcher, MatcherOptions } from "@testing-library/dom"; | ||
import { waitForOptions, ByRoleMatcher, ByRoleOptions, SelectorMatcherOptions, Matcher, MatcherOptions } from "@testing-library/dom"; | ||
export type Container = HTMLElement | Document | ShadowRoot; | ||
export type ShadowOptions = { | ||
shallow: boolean; | ||
shallow?: boolean; | ||
}; | ||
@@ -9,27 +9,71 @@ export type ShadowByRoleOptions = ByRoleOptions & ShadowOptions; | ||
export type ShadowSelectorMatcherOptions = SelectorMatcherOptions & ShadowOptions; | ||
export type ShadowRoleMatcherParams = [container: HTMLElement, ...args: ScreenShadowRoleMatcherParams]; | ||
export type ShadowSelectorMatcherParams = [container: HTMLElement, ...args: ScreenShadowSelectorMatcherParams]; | ||
export type ShadowMatcherParams = [container: HTMLElement, ...args: ScreenShadowMatcherParams]; | ||
export type ScreenShadowRoleMatcherParams = [role: ByRoleMatcher, options?: ShadowByRoleOptions | undefined]; | ||
export type ScreenShadowSelectorMatcherParams = [id: Matcher, options?: ShadowSelectorMatcherOptions | undefined]; | ||
export type ScreenShadowMatcherParams = [id: Matcher, options?: ShadowMatcherOptions | undefined]; | ||
export type AsyncShadowRoleMatcherParams = [container: HTMLElement, ...args: AsyncScreenShadowRoleMatcherParams]; | ||
export type AsyncShadowSelectorMatcherParams = [container: HTMLElement, ...args: AsyncScreenShadowSelectorMatcherParams]; | ||
export type AsyncShadowMatcherParams = [container: HTMLElement, ...args: AsyncScreenShadowMatcherParams]; | ||
export type AsyncScreenShadowRoleMatcherParams = [role: ByRoleMatcher, options?: ShadowByRoleOptions | undefined, waitForOptions?: waitForOptions | undefined]; | ||
export type AsyncScreenShadowSelectorMatcherParams = [id: Matcher, options?: ShadowSelectorMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined]; | ||
export type AsyncScreenShadowMatcherParams = [id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined]; | ||
export function deepQuerySelector(container: Container, selectors: string, options?: ShadowOptions, elements?: (Element | ShadowRoot)[]): Element | ShadowRoot | null; | ||
export function deepQuerySelectorAll(container: Container, selectors: string, options?: ShadowOptions, elements?: (Element | ShadowRoot)[]): (Element | ShadowRoot)[]; | ||
export function queryAllByShadowRole<T extends HTMLElement = HTMLElement>(container: HTMLElement, role: ByRoleMatcher, options?: ShadowByRoleOptions | undefined): T[]; | ||
export const queryByShadowRole: import("@testing-library/dom").QueryBy<[role: string]>, getAllByShadowRole: import("@testing-library/dom").GetAllBy<[role: string]>, getByShadowRole: import("@testing-library/dom").GetBy<[role: string]>, findAllByShadowRole: import("@testing-library/dom").FindAllBy<[role: string]>, findByShadowRole: import("@testing-library/dom").FindBy<[role: string]>; | ||
export function queryAllByShadowLabelText<T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined): T[]; | ||
export const queryByShadowLabelText: import("@testing-library/dom").QueryBy<[id: Matcher]>, getAllByShadowLabelText: import("@testing-library/dom").GetAllBy<[id: Matcher]>, getByShadowLabelText: import("@testing-library/dom").GetBy<[id: Matcher]>, findAllByShadowLabelText: import("@testing-library/dom").FindAllBy<[id: Matcher]>, findByShadowLabelText: import("@testing-library/dom").FindBy<[id: Matcher]>; | ||
export function queryAllByShadowPlaceholderText<T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined): T[]; | ||
export const queryByShadowPlaceholderText: import("@testing-library/dom").QueryBy<[id: Matcher]>, getAllByShadowPlaceholderText: import("@testing-library/dom").GetAllBy<[id: Matcher]>, getByShadowPlaceholderText: import("@testing-library/dom").GetBy<[id: Matcher]>, findAllByShadowPlaceholderText: import("@testing-library/dom").FindAllBy<[id: Matcher]>, findByShadowPlaceholderText: import("@testing-library/dom").FindBy<[id: Matcher]>; | ||
export function queryAllByShadowText<T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined): T[]; | ||
export const queryByShadowText: import("@testing-library/dom").QueryBy<[id: Matcher]>, getAllByShadowText: import("@testing-library/dom").GetAllBy<[id: Matcher]>, getByShadowText: import("@testing-library/dom").GetBy<[id: Matcher]>, findAllByShadowText: import("@testing-library/dom").FindAllBy<[id: Matcher]>, findByShadowText: import("@testing-library/dom").FindBy<[id: Matcher]>; | ||
export function queryAllByShadowDisplayValue<T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined): T[]; | ||
export const queryByShadowDisplayValue: import("@testing-library/dom").QueryBy<[id: Matcher]>, getAllByShadowDisplayValue: import("@testing-library/dom").GetAllBy<[id: Matcher]>, getByShadowDisplayValue: import("@testing-library/dom").GetBy<[id: Matcher]>, findAllByShadowDisplayValue: import("@testing-library/dom").FindAllBy<[id: Matcher]>, findByShadowDisplayValue: import("@testing-library/dom").FindBy<[id: Matcher]>; | ||
export function queryAllByShadowAltText<T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined): T[]; | ||
export const queryByShadowAltText: import("@testing-library/dom").QueryBy<[id: Matcher]>, getAllByShadowAltText: import("@testing-library/dom").GetAllBy<[id: Matcher]>, getByShadowAltText: import("@testing-library/dom").GetBy<[id: Matcher]>, findAllByShadowAltText: import("@testing-library/dom").FindAllBy<[id: Matcher]>, findByShadowAltText: import("@testing-library/dom").FindBy<[id: Matcher]>; | ||
export function queryAllByShadowTitle<T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined): T[]; | ||
export const queryByShadowTitle: import("@testing-library/dom").QueryBy<[id: Matcher]>, getAllByShadowTitle: import("@testing-library/dom").GetAllBy<[id: Matcher]>, getByShadowTitle: import("@testing-library/dom").GetBy<[id: Matcher]>, findAllByShadowTitle: import("@testing-library/dom").FindAllBy<[id: Matcher]>, findByShadowTitle: import("@testing-library/dom").FindBy<[id: Matcher]>; | ||
export function queryAllByShadowTestId<T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined): T[]; | ||
export const queryByShadowTestId: import("@testing-library/dom").QueryBy<[id: Matcher]>, getAllByShadowTestId: import("@testing-library/dom").GetAllBy<[id: Matcher]>, getByShadowTestId: import("@testing-library/dom").GetBy<[id: Matcher]>, findAllByShadowTestId: import("@testing-library/dom").FindAllBy<[id: Matcher]>, findByShadowTestId: import("@testing-library/dom").FindBy<[id: Matcher]>; | ||
export function queryAllByShadowRole<T extends HTMLElement = HTMLElement>(...args: ShadowRoleMatcherParams): T[]; | ||
export const queryByShadowRole: <T extends HTMLElement = HTMLElement>(container: HTMLElement, role: ByRoleMatcher, options?: ShadowByRoleOptions | undefined) => T | null; | ||
export const getByShadowRole: <T extends HTMLElement = HTMLElement>(container: HTMLElement, role: ByRoleMatcher, options?: ShadowByRoleOptions | undefined) => T; | ||
export const getAllByShadowRole: <T extends HTMLElement = HTMLElement>(container: HTMLElement, role: ByRoleMatcher, options?: ShadowByRoleOptions | undefined) => T[]; | ||
export const findByShadowRole: <T extends HTMLElement = HTMLElement>(container: HTMLElement, role: ByRoleMatcher, options?: ShadowByRoleOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<T>; | ||
export const findAllByShadowRole: <T extends HTMLElement = HTMLElement>(container: HTMLElement, role: ByRoleMatcher, options?: ShadowByRoleOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<T[]>; | ||
export function queryAllByShadowLabelText<T extends HTMLElement = HTMLElement>(...args: ShadowSelectorMatcherParams): T[]; | ||
export const queryByShadowLabelText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => T | null; | ||
export const getByShadowLabelText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => T; | ||
export const getAllByShadowLabelText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => T[]; | ||
export const findByShadowLabelText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<T>; | ||
export const findAllByShadowLabelText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<T[]>; | ||
export function queryAllByShadowPlaceholderText<T extends HTMLElement = HTMLElement>(...args: ShadowMatcherParams): T[]; | ||
export const queryByShadowPlaceholderText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined) => T | null; | ||
export const getByShadowPlaceholderText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined) => T; | ||
export const getAllByShadowPlaceholderText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined) => T[]; | ||
export const findByShadowPlaceholderText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<T>; | ||
export const findAllByShadowPlaceholderText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<T[]>; | ||
export function queryAllByShadowText<T extends HTMLElement = HTMLElement>(...args: ShadowSelectorMatcherParams): T[]; | ||
export const queryByShadowText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => T | null; | ||
export const getByShadowText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => T; | ||
export const getAllByShadowText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => T[]; | ||
export const findByShadowText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<T>; | ||
export const findAllByShadowText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<T[]>; | ||
export function queryAllByShadowDisplayValue<T extends HTMLElement = HTMLElement>(...args: ShadowSelectorMatcherParams): T[]; | ||
export const queryByShadowDisplayValue: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => T | null; | ||
export const getByShadowDisplayValue: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => T; | ||
export const getAllByShadowDisplayValue: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => T[]; | ||
export const findByShadowDisplayValue: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<T>; | ||
export const findAllByShadowDisplayValue: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<T[]>; | ||
export function queryAllByShadowAltText<T extends HTMLElement = HTMLElement>(...args: ShadowMatcherParams): T[]; | ||
export const queryByShadowAltText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined) => T | null; | ||
export const getByShadowAltText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined) => T; | ||
export const getAllByShadowAltText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined) => T[]; | ||
export const findByShadowAltText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<T>; | ||
export const findAllByShadowAltText: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<T[]>; | ||
export function queryAllByShadowTitle<T extends HTMLElement = HTMLElement>(...args: ShadowMatcherParams): T[]; | ||
export const queryByShadowTitle: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined) => T | null; | ||
export const getByShadowTitle: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined) => T; | ||
export const getAllByShadowTitle: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined) => T[]; | ||
export const findByShadowTitle: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<T>; | ||
export const findAllByShadowTitle: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<T[]>; | ||
export function queryAllByShadowTestId<T extends HTMLElement = HTMLElement>(...args: ShadowMatcherParams): T[]; | ||
export const queryByShadowTestId: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined) => T | null; | ||
export const getByShadowTestId: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined) => T; | ||
export const getAllByShadowTestId: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined) => T[]; | ||
export const findByShadowTestId: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<T>; | ||
export const findAllByShadowTestId: <T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<T[]>; | ||
export let screen: { | ||
queryAllByShadowRole: (role: ByRoleMatcher, options?: ShadowMatcherOptions | undefined) => HTMLElement[]; | ||
queryByShadowRole: (role: ByRoleMatcher, options?: ShadowMatcherOptions | undefined) => HTMLElement | null; | ||
getAllByShadowRole: (role: ByRoleMatcher, options?: ShadowMatcherOptions | undefined) => HTMLElement[]; | ||
getByShadowRole: (role: ByRoleMatcher, options?: ShadowMatcherOptions | undefined) => HTMLElement; | ||
findAllByShadowRole: (role: ByRoleMatcher, ...args: any[]) => Promise<HTMLElement[]>; | ||
findByShadowRole: (role: ByRoleMatcher, ...args: any[]) => Promise<HTMLElement>; | ||
queryAllByShadowRole: (role: ByRoleMatcher, options?: ShadowByRoleOptions | undefined) => HTMLElement[]; | ||
queryByShadowRole: (role: ByRoleMatcher, options?: ShadowByRoleOptions | undefined) => HTMLElement | null; | ||
getAllByShadowRole: (role: ByRoleMatcher, options?: ShadowByRoleOptions | undefined) => HTMLElement[]; | ||
getByShadowRole: (role: ByRoleMatcher, options?: ShadowByRoleOptions | undefined) => HTMLElement; | ||
findAllByShadowRole: (role: ByRoleMatcher, options?: ShadowByRoleOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<HTMLElement[]>; | ||
findByShadowRole: (role: ByRoleMatcher, options?: ShadowByRoleOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<HTMLElement>; | ||
queryAllByShadowLabelText: (id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => HTMLElement[]; | ||
@@ -39,4 +83,4 @@ queryByShadowLabelText: (id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => HTMLElement | null; | ||
getByShadowLabelText: (id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => HTMLElement; | ||
findAllByShadowLabelText: (id: Matcher, ...args: any[]) => Promise<HTMLElement[]>; | ||
findByShadowLabelText: (id: Matcher, ...args: any[]) => Promise<HTMLElement>; | ||
findAllByShadowLabelText: (id: Matcher, options?: ShadowSelectorMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<HTMLElement[]>; | ||
findByShadowLabelText: (id: Matcher, options?: ShadowSelectorMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<HTMLElement>; | ||
queryAllByShadowPlaceholderText: (id: Matcher, options?: ShadowMatcherOptions | undefined) => HTMLElement[]; | ||
@@ -46,4 +90,4 @@ queryByShadowPlaceholderText: (id: Matcher, options?: ShadowMatcherOptions | undefined) => HTMLElement | null; | ||
getByShadowPlaceholderText: (id: Matcher, options?: ShadowMatcherOptions | undefined) => HTMLElement; | ||
findAllByShadowPlaceholderText: (id: Matcher, ...args: any[]) => Promise<HTMLElement[]>; | ||
findByShadowPlaceholderText: (id: Matcher, ...args: any[]) => Promise<HTMLElement>; | ||
findAllByShadowPlaceholderText: (id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<HTMLElement[]>; | ||
findByShadowPlaceholderText: (id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<HTMLElement>; | ||
queryAllByShadowText: (id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => HTMLElement[]; | ||
@@ -53,4 +97,4 @@ queryByShadowText: (id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => HTMLElement | null; | ||
getByShadowText: (id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => HTMLElement; | ||
findAllByShadowText: (id: Matcher, ...args: any[]) => Promise<HTMLElement[]>; | ||
findByShadowText: (id: Matcher, ...args: any[]) => Promise<HTMLElement>; | ||
findAllByShadowText: (id: Matcher, options?: ShadowSelectorMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<HTMLElement[]>; | ||
findByShadowText: (id: Matcher, options?: ShadowSelectorMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<HTMLElement>; | ||
queryAllByShadowDisplayValue: (id: Matcher, options?: ShadowMatcherOptions | undefined) => HTMLElement[]; | ||
@@ -60,4 +104,4 @@ queryByShadowDisplayValue: (id: Matcher, options?: ShadowMatcherOptions | undefined) => HTMLElement | null; | ||
getByShadowDisplayValue: (id: Matcher, options?: ShadowMatcherOptions | undefined) => HTMLElement; | ||
findAllByShadowDisplayValue: (id: Matcher, ...args: any[]) => Promise<HTMLElement[]>; | ||
findByShadowDisplayValue: (id: Matcher, ...args: any[]) => Promise<HTMLElement>; | ||
findAllByShadowDisplayValue: (id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<HTMLElement[]>; | ||
findByShadowDisplayValue: (id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<HTMLElement>; | ||
queryAllByShadowAltText: (id: Matcher, options?: ShadowMatcherOptions | undefined) => HTMLElement[]; | ||
@@ -67,4 +111,4 @@ queryByShadowAltText: (id: Matcher, options?: ShadowMatcherOptions | undefined) => HTMLElement | null; | ||
getByShadowAltText: (id: Matcher, options?: ShadowMatcherOptions | undefined) => HTMLElement; | ||
findAllByShadowAltText: (id: Matcher, ...args: any[]) => Promise<HTMLElement[]>; | ||
findByShadowAltText: (id: Matcher, ...args: any[]) => Promise<HTMLElement>; | ||
findAllByShadowAltText: (id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<HTMLElement[]>; | ||
findByShadowAltText: (id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<HTMLElement>; | ||
queryAllByShadowTitle: (id: Matcher, options?: ShadowMatcherOptions | undefined) => HTMLElement[]; | ||
@@ -74,4 +118,4 @@ queryByShadowTitle: (id: Matcher, options?: ShadowMatcherOptions | undefined) => HTMLElement | null; | ||
getByShadowTitle: (id: Matcher, options?: ShadowMatcherOptions | undefined) => HTMLElement; | ||
findAllByShadowTitle: (id: Matcher, ...args: any[]) => Promise<HTMLElement[]>; | ||
findByShadowTitle: (id: Matcher, ...args: any[]) => Promise<HTMLElement>; | ||
findAllByShadowTitle: (id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<HTMLElement[]>; | ||
findByShadowTitle: (id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<HTMLElement>; | ||
queryAllByShadowTestId: (id: Matcher, options?: ShadowMatcherOptions | undefined) => HTMLElement[]; | ||
@@ -81,4 +125,4 @@ queryByShadowTestId: (id: Matcher, options?: ShadowMatcherOptions | undefined) => HTMLElement | null; | ||
getByShadowTestId: (id: Matcher, options?: ShadowMatcherOptions | undefined) => HTMLElement; | ||
findAllByShadowTestId: (id: Matcher, ...args: any[]) => Promise<HTMLElement[]>; | ||
findByShadowTestId: (id: Matcher, ...args: any[]) => Promise<HTMLElement>; | ||
findAllByShadowTestId: (id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<HTMLElement[]>; | ||
findByShadowTestId: (id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined) => Promise<HTMLElement>; | ||
getByLabelText: (<T extends HTMLElement = HTMLElement>(id: Matcher, options?: SelectorMatcherOptions | undefined) => T) & ((id: Matcher, options?: SelectorMatcherOptions | undefined) => HTMLElement); | ||
@@ -88,4 +132,4 @@ getAllByLabelText: (<T_1 extends HTMLElement = HTMLElement>(id: Matcher, options?: SelectorMatcherOptions | undefined) => T_1[]) & ((id: Matcher, options?: SelectorMatcherOptions | undefined) => HTMLElement[]); | ||
queryAllByLabelText: (<T_3 extends HTMLElement = HTMLElement>(id: Matcher, options?: SelectorMatcherOptions | undefined) => T_3[]) & ((id: Matcher, options?: SelectorMatcherOptions | undefined) => HTMLElement[]); | ||
findByLabelText: (<T_4 extends HTMLElement = HTMLElement>(id: Matcher, options?: SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<T_4>) & ((id: Matcher, options?: SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>); | ||
findAllByLabelText: (<T_5 extends HTMLElement = HTMLElement>(id: Matcher, options?: SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<T_5[]>) & ((id: Matcher, options?: SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>); | ||
findByLabelText: (<T_4 extends HTMLElement = HTMLElement>(id: Matcher, options?: SelectorMatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<T_4>) & ((id: Matcher, options?: SelectorMatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<HTMLElement>); | ||
findAllByLabelText: (<T_5 extends HTMLElement = HTMLElement>(id: Matcher, options?: SelectorMatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<T_5[]>) & ((id: Matcher, options?: SelectorMatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<HTMLElement[]>); | ||
getByPlaceholderText: (<T_6 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined) => T_6) & ((id: Matcher, options?: MatcherOptions | undefined) => HTMLElement); | ||
@@ -95,4 +139,4 @@ getAllByPlaceholderText: (<T_7 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined) => T_7[]) & ((id: Matcher, options?: MatcherOptions | undefined) => HTMLElement[]); | ||
queryAllByPlaceholderText: (<T_9 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined) => T_9[]) & ((id: Matcher, options?: MatcherOptions | undefined) => HTMLElement[]); | ||
findByPlaceholderText: (<T_10 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<T_10>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>); | ||
findAllByPlaceholderText: (<T_11 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<T_11[]>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>); | ||
findByPlaceholderText: (<T_10 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<T_10>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<HTMLElement>); | ||
findAllByPlaceholderText: (<T_11 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<T_11[]>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<HTMLElement[]>); | ||
getByText: (<T_12 extends HTMLElement = HTMLElement>(id: Matcher, options?: SelectorMatcherOptions | undefined) => T_12) & ((id: Matcher, options?: SelectorMatcherOptions | undefined) => HTMLElement); | ||
@@ -102,4 +146,4 @@ getAllByText: (<T_13 extends HTMLElement = HTMLElement>(id: Matcher, options?: SelectorMatcherOptions | undefined) => T_13[]) & ((id: Matcher, options?: SelectorMatcherOptions | undefined) => HTMLElement[]); | ||
queryAllByText: (<T_15 extends HTMLElement = HTMLElement>(id: Matcher, options?: SelectorMatcherOptions | undefined) => T_15[]) & ((id: Matcher, options?: SelectorMatcherOptions | undefined) => HTMLElement[]); | ||
findByText: (<T_16 extends HTMLElement = HTMLElement>(id: Matcher, options?: SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<T_16>) & ((id: Matcher, options?: SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>); | ||
findAllByText: (<T_17 extends HTMLElement = HTMLElement>(id: Matcher, options?: SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<T_17[]>) & ((id: Matcher, options?: SelectorMatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>); | ||
findByText: (<T_16 extends HTMLElement = HTMLElement>(id: Matcher, options?: SelectorMatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<T_16>) & ((id: Matcher, options?: SelectorMatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<HTMLElement>); | ||
findAllByText: (<T_17 extends HTMLElement = HTMLElement>(id: Matcher, options?: SelectorMatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<T_17[]>) & ((id: Matcher, options?: SelectorMatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<HTMLElement[]>); | ||
getByAltText: (<T_18 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined) => T_18) & ((id: Matcher, options?: MatcherOptions | undefined) => HTMLElement); | ||
@@ -109,4 +153,4 @@ getAllByAltText: (<T_19 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined) => T_19[]) & ((id: Matcher, options?: MatcherOptions | undefined) => HTMLElement[]); | ||
queryAllByAltText: (<T_21 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined) => T_21[]) & ((id: Matcher, options?: MatcherOptions | undefined) => HTMLElement[]); | ||
findByAltText: (<T_22 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<T_22>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>); | ||
findAllByAltText: (<T_23 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<T_23[]>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>); | ||
findByAltText: (<T_22 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<T_22>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<HTMLElement>); | ||
findAllByAltText: (<T_23 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<T_23[]>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<HTMLElement[]>); | ||
getByTitle: (<T_24 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined) => T_24) & ((id: Matcher, options?: MatcherOptions | undefined) => HTMLElement); | ||
@@ -116,4 +160,4 @@ getAllByTitle: (<T_25 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined) => T_25[]) & ((id: Matcher, options?: MatcherOptions | undefined) => HTMLElement[]); | ||
queryAllByTitle: (<T_27 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined) => T_27[]) & ((id: Matcher, options?: MatcherOptions | undefined) => HTMLElement[]); | ||
findByTitle: (<T_28 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<T_28>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>); | ||
findAllByTitle: (<T_29 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<T_29[]>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>); | ||
findByTitle: (<T_28 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<T_28>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<HTMLElement>); | ||
findAllByTitle: (<T_29 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<T_29[]>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<HTMLElement[]>); | ||
getByDisplayValue: (<T_30 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined) => T_30) & ((id: Matcher, options?: MatcherOptions | undefined) => HTMLElement); | ||
@@ -123,4 +167,4 @@ getAllByDisplayValue: (<T_31 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined) => T_31[]) & ((id: Matcher, options?: MatcherOptions | undefined) => HTMLElement[]); | ||
queryAllByDisplayValue: (<T_33 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined) => T_33[]) & ((id: Matcher, options?: MatcherOptions | undefined) => HTMLElement[]); | ||
findByDisplayValue: (<T_34 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<T_34>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>); | ||
findAllByDisplayValue: (<T_35 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<T_35[]>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>); | ||
findByDisplayValue: (<T_34 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<T_34>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<HTMLElement>); | ||
findAllByDisplayValue: (<T_35 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<T_35[]>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<HTMLElement[]>); | ||
getByRole: (<T_36 extends HTMLElement = HTMLElement>(role: ByRoleMatcher, options?: ByRoleOptions | undefined) => T_36) & ((role: ByRoleMatcher, options?: ByRoleOptions | undefined) => HTMLElement); | ||
@@ -130,4 +174,4 @@ getAllByRole: (<T_37 extends HTMLElement = HTMLElement>(role: ByRoleMatcher, options?: ByRoleOptions | undefined) => T_37[]) & ((role: ByRoleMatcher, options?: ByRoleOptions | undefined) => HTMLElement[]); | ||
queryAllByRole: (<T_39 extends HTMLElement = HTMLElement>(role: ByRoleMatcher, options?: ByRoleOptions | undefined) => T_39[]) & ((role: ByRoleMatcher, options?: ByRoleOptions | undefined) => HTMLElement[]); | ||
findByRole: (<T_40 extends HTMLElement = HTMLElement>(role: ByRoleMatcher, options?: ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<T_40>) & ((role: ByRoleMatcher, options?: ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>); | ||
findAllByRole: (<T_41 extends HTMLElement = HTMLElement>(role: ByRoleMatcher, options?: ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<T_41[]>) & ((role: ByRoleMatcher, options?: ByRoleOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>); | ||
findByRole: (<T_40 extends HTMLElement = HTMLElement>(role: ByRoleMatcher, options?: ByRoleOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<T_40>) & ((role: ByRoleMatcher, options?: ByRoleOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<HTMLElement>); | ||
findAllByRole: (<T_41 extends HTMLElement = HTMLElement>(role: ByRoleMatcher, options?: ByRoleOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<T_41[]>) & ((role: ByRoleMatcher, options?: ByRoleOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<HTMLElement[]>); | ||
getByTestId: (<T_42 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined) => T_42) & ((id: Matcher, options?: MatcherOptions | undefined) => HTMLElement); | ||
@@ -137,4 +181,4 @@ getAllByTestId: (<T_43 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined) => T_43[]) & ((id: Matcher, options?: MatcherOptions | undefined) => HTMLElement[]); | ||
queryAllByTestId: (<T_45 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined) => T_45[]) & ((id: Matcher, options?: MatcherOptions | undefined) => HTMLElement[]); | ||
findByTestId: (<T_46 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<T_46>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement>); | ||
findAllByTestId: (<T_47 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<T_47[]>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: import("@testing-library/dom").waitForOptions | undefined) => Promise<HTMLElement[]>); | ||
findByTestId: (<T_46 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<T_46>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<HTMLElement>); | ||
findAllByTestId: (<T_47 extends HTMLElement = HTMLElement>(id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<T_47[]>) & ((id: Matcher, options?: MatcherOptions | undefined, waitForElementOptions?: waitForOptions | undefined) => Promise<HTMLElement[]>); | ||
debug: (element?: Element | HTMLDocument | (Element | HTMLDocument)[] | undefined, maxLength?: number | undefined, options?: import("pretty-format").PrettyFormatOptions | undefined) => void; | ||
@@ -141,0 +185,0 @@ logTestingPlaygroundURL: (element?: Element | HTMLDocument | undefined) => void; |
{ | ||
"name": "shadow-dom-testing-library", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "An extension of DOM-testing-library to provide hooks into the shadow dom", | ||
@@ -10,12 +10,18 @@ "type": "module", | ||
"types": "dist/types.d.ts", | ||
"engines": { | ||
"node": ">= 14", | ||
"npm": ">= 7" | ||
}, | ||
"scripts": { | ||
"test": "echo 'What are tests?'", | ||
"test": "jest", | ||
"vitest": "vitest", | ||
"jest-preview": "jest-preview", | ||
"start": "npm run clean && parcel", | ||
"build": "npm run clean && parcel build", | ||
"clean": "rm -rf dist", | ||
"deploy": "npm build && standard-version --release-as", | ||
"deploy:beta": "npm build && standard-version --prerelease beta", | ||
"deploy:patch": "npm build && standard-version --release-as patch", | ||
"deploy:minor": "npm build && standard-version --release-as minor", | ||
"deploy:major": "npm build && standard-version --release-as major", | ||
"deploy": "npm run build && standard-version --release-as", | ||
"deploy:beta": "npm run build && standard-version --prerelease beta", | ||
"deploy:patch": "npm run build && standard-version --release-as patch", | ||
"deploy:minor": "npm run build && standard-version --release-as minor", | ||
"deploy:major": "npm run build && standard-version --release-as major", | ||
"push": "git push --follow-tags origin main && npm publish" | ||
@@ -43,7 +49,23 @@ }, | ||
"@parcel/transformer-typescript-types": "^2.6.2", | ||
"@shoelace-style/shoelace": "^2.0.0-beta.77", | ||
"@testing-library/jest-dom": "^5.16.4", | ||
"@testing-library/react": "^13.3.0", | ||
"@types/jest": "^28.1.4", | ||
"@types/node": "^18.0.3", | ||
"@types/react": "^18.0.15", | ||
"@types/react-dom": "^18.0.6", | ||
"@vitejs/plugin-react": "^1.3.2", | ||
"identity-obj-proxy": "^3.0.0", | ||
"jest": "^28.1.2", | ||
"jest-environment-jsdom": "^28.1.2", | ||
"jest-preview": "^0.2.6", | ||
"parcel": "^2.6.2", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"standard-version": "^9.5.0", | ||
"ts-jest": "^28.0.5", | ||
"tslib": "^2.4.0", | ||
"typescript": "^4.7.4" | ||
"typescript": "^4.7.4", | ||
"vitest": "^0.17.1" | ||
} | ||
} |
@@ -34,6 +34,6 @@ # Why? | ||
```js | ||
// my-button | ||
// my-button.jsx | ||
export default () => <sl-button>I get wrapped by a button in the shadowRoot!</sl-button> | ||
// my-button.test.tsx | ||
// my-button.test.jsx | ||
import { render } from "@testing-library/react" | ||
@@ -44,2 +44,3 @@ import { screen } from "shadow-dom-testing-library" | ||
test("Find the button in the shadow root", async () => { | ||
render(<Button />) | ||
const btn = await screen.findByShadowRole("button") | ||
@@ -63,7 +64,7 @@ expect(btn).toBeInTheDocument() | ||
test("Find the button", () => { | ||
const { baseElement } = render(<Button />) | ||
const { container } = render(<Button />) | ||
getByShadowRole(baseElement, "button") | ||
await findByShadowLabelText(baseElement, /Car Manufacturer/i) | ||
queryAllByShadowTitle(baseElement, "delete") | ||
getByShadowRole(container, "button") | ||
await findByShadowLabelText(container, /Car Manufacturer/i) | ||
queryAllByShadowTitle(container, "delete") | ||
}) | ||
@@ -137,1 +138,25 @@ ``` | ||
than a regular `querySelector` call. | ||
## Known Issues | ||
### Types | ||
The types generated for the queries do not have an optional | ||
3rd argument due to how the queries are generated. An issue | ||
has been filed with DOM-testing-library. | ||
<https://github.com/testing-library/dom-testing-library/issues/1145> | ||
To work around this, a `// @ts-expect-error` is needed. | ||
Example: | ||
```ts | ||
test('byShadowLabelText', async () => { | ||
const { container } = render(<TextArea />) | ||
// Types shipped by DOM-testing-library with buildQueries don't have options attached to them. | ||
// @ts-expect-error | ||
expect(await findByShadowLabelText(container, /omments/, {exact: false})).toBeInTheDocument() | ||
}) | ||
``` |
491
src/index.ts
@@ -1,5 +0,8 @@ | ||
import {buildQueries, screen, ByRoleMatcher, ByRoleOptions, queryAllByRole, SelectorMatcherOptions, queryAllByLabelText, Matcher, queryAllByPlaceholderText, MatcherOptions, queryAllByText, queryAllByDisplayValue, queryAllByAltText, queryAllByTitle, queryAllByTestId} from '@testing-library/dom' | ||
import {waitForOptions, buildQueries, screen, ByRoleMatcher, ByRoleOptions, queryAllByRole, SelectorMatcherOptions, queryAllByLabelText, Matcher, queryAllByPlaceholderText, MatcherOptions, queryAllByText, queryAllByDisplayValue, queryAllByAltText, queryAllByTitle, queryAllByTestId} from '@testing-library/dom' | ||
export type Container = HTMLElement | Document | ShadowRoot | ||
export type ShadowOptions = { shallow: boolean } | ||
export type ShadowOptions = { shallow?: boolean } | ||
// Allow shallow queries to be appended to the default options of DOM testing library | ||
export type ShadowByRoleOptions = ByRoleOptions & ShadowOptions | ||
@@ -9,2 +12,20 @@ export type ShadowMatcherOptions = MatcherOptions & ShadowOptions | ||
// For queryBy / getBy queries | ||
export type ShadowRoleMatcherParams = [container: HTMLElement, ...args: ScreenShadowRoleMatcherParams] | ||
export type ShadowSelectorMatcherParams = [container: HTMLElement, ...args: ScreenShadowSelectorMatcherParams] | ||
export type ShadowMatcherParams = [container: HTMLElement, ...args: ScreenShadowMatcherParams] | ||
export type ScreenShadowRoleMatcherParams = [role: ByRoleMatcher, options?: ShadowByRoleOptions | undefined] | ||
export type ScreenShadowSelectorMatcherParams = [id: Matcher, options?: ShadowSelectorMatcherOptions | undefined] | ||
export type ScreenShadowMatcherParams = [id: Matcher, options?: ShadowMatcherOptions | undefined] | ||
// For findBy queries | ||
export type AsyncShadowRoleMatcherParams = [container: HTMLElement, ...args: AsyncScreenShadowRoleMatcherParams] | ||
export type AsyncShadowSelectorMatcherParams = [container: HTMLElement, ...args: AsyncScreenShadowSelectorMatcherParams] | ||
export type AsyncShadowMatcherParams = [container: HTMLElement, ...args: AsyncScreenShadowMatcherParams] | ||
export type AsyncScreenShadowRoleMatcherParams = [role: ByRoleMatcher, options?: ShadowByRoleOptions | undefined, waitForOptions?: waitForOptions | undefined] | ||
export type AsyncScreenShadowSelectorMatcherParams = [id: Matcher, options?: ShadowSelectorMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined] | ||
export type AsyncScreenShadowMatcherParams = [id: Matcher, options?: ShadowMatcherOptions | undefined, waitForOptions?: waitForOptions | undefined] | ||
export function deepQuerySelector (container: Container, selectors: string, options: ShadowOptions = { shallow: false }, elements: (Element | ShadowRoot)[] = []) { | ||
@@ -47,8 +68,10 @@ const els = deepQuerySelectorAll(container, selectors, options, elements) | ||
// Prevent duplicate elements by using ":scope *" | ||
const scopeQuery = ":scope *" | ||
// Role | ||
function queryAllByShadowRole<T extends HTMLElement = HTMLElement>(container: HTMLElement, role: ByRoleMatcher, options?: ShadowByRoleOptions | undefined): T[] { | ||
const elements = deepQuerySelectorAll(container, "*") | ||
function queryAllByShadowRole<T extends HTMLElement = HTMLElement>(...args: ShadowRoleMatcherParams): T[] { | ||
const [container, role, options] = args | ||
// @ts-expect-error | ||
return elements.map((el) => queryAllByRole(el, role, options)).flat(Infinity) as T[] | ||
return deepQuerySelectorAll(container, scopeQuery, options).map((el) => queryAllByRole(el as HTMLElement, role, options)).flat(Infinity) as T[] | ||
} | ||
@@ -62,19 +85,45 @@ | ||
const [ | ||
queryByShadowRole, | ||
getAllByShadowRole, | ||
getByShadowRole, | ||
findAllByShadowRole, | ||
findByShadowRole, | ||
_queryByShadowRole, | ||
_getAllByShadowRole, | ||
_getByShadowRole, | ||
_findAllByShadowRole, | ||
_findByShadowRole, | ||
] = buildQueries(queryAllByShadowRole, getMultipleRoleError, getMissingRoleError) | ||
const queryByShadowRole = <T extends HTMLElement = HTMLElement> (...args: ShadowRoleMatcherParams): T | null => { | ||
// @ts-expect-error | ||
return _queryByShadowRole(...args) as T | ||
} | ||
const getByShadowRole = <T extends HTMLElement = HTMLElement> (...args: ShadowRoleMatcherParams): T => { | ||
// @ts-expect-error | ||
return _getByShadowRole(...args) as T | ||
} | ||
// Label Text | ||
function queryAllByShadowLabelText<T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined): T[] { | ||
const elements = deepQuerySelectorAll(container, "*") | ||
const getAllByShadowRole = <T extends HTMLElement = HTMLElement> (...args: ShadowRoleMatcherParams): T[] => { | ||
// @ts-expect-error | ||
return _getAllByShadowRole(...args) as T[] | ||
} | ||
const findByShadowRole = <T extends HTMLElement = HTMLElement> (...args: AsyncShadowRoleMatcherParams): Promise<T> => { | ||
// @ts-expect-error | ||
return elements.map((el) => queryAllByLabelText(el, id, options)).flat(Infinity) as T[] | ||
return _findByShadowRole(...args) as Promise<T> | ||
} | ||
const findAllByShadowRole = <T extends HTMLElement = HTMLElement> (...args: AsyncShadowRoleMatcherParams): Promise<T[]> => { | ||
// @ts-expect-error | ||
return _findAllByShadowRole(...args) as Promise<T[]> | ||
} | ||
// Label Text | ||
function queryAllByShadowLabelText<T extends HTMLElement = HTMLElement>(...args: ShadowSelectorMatcherParams): T[] { | ||
const [container, id, options] = args | ||
const elements = deepQuerySelectorAll(container, ":scope *") | ||
return elements.map((el) => queryAllByLabelText(el as HTMLElement, id, options)).flat(Infinity) as T[] | ||
} | ||
const getMultipleLabelTextError = (_c: Element | null, id: Matcher) => | ||
@@ -86,19 +135,42 @@ `Found multiple elements with the label text of: ${id}` | ||
const [ | ||
queryByShadowLabelText, | ||
getAllByShadowLabelText, | ||
getByShadowLabelText, | ||
findAllByShadowLabelText, | ||
findByShadowLabelText, | ||
_queryByShadowLabelText, | ||
_getAllByShadowLabelText, | ||
_getByShadowLabelText, | ||
_findAllByShadowLabelText, | ||
_findByShadowLabelText, | ||
] = buildQueries(queryAllByShadowLabelText, getMultipleLabelTextError, getMissingLabelTextError) | ||
const queryByShadowLabelText = <T extends HTMLElement = HTMLElement> (...args: ShadowSelectorMatcherParams): T | null => { | ||
// @ts-expect-error | ||
return _queryByShadowLabelText(...args) as T | ||
} | ||
const getByShadowLabelText = <T extends HTMLElement = HTMLElement> (...args: ShadowSelectorMatcherParams): T => { | ||
// @ts-expect-error | ||
return _getByShadowLabelText(...args) as T | ||
} | ||
// Placeholder Text | ||
function queryAllByShadowPlaceholderText<T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined): T[] { | ||
const elements = deepQuerySelectorAll(container, "*") | ||
const getAllByShadowLabelText = <T extends HTMLElement = HTMLElement> (...args: ShadowSelectorMatcherParams): T[] => { | ||
// @ts-expect-error | ||
return _getAllByShadowLabelText(...args) as T[] | ||
} | ||
const findByShadowLabelText = <T extends HTMLElement = HTMLElement> (...args: AsyncShadowSelectorMatcherParams): Promise<T> => { | ||
// @ts-expect-error | ||
return elements.map((el) => queryAllByPlaceholderText(el, id, options)).flat(Infinity) as T[] | ||
return _findByShadowLabelText(...args) as Promise<T> | ||
} | ||
const findAllByShadowLabelText = <T extends HTMLElement = HTMLElement> (...args: AsyncShadowSelectorMatcherParams): Promise<T[]> => { | ||
// @ts-expect-error | ||
return _findAllByShadowLabelText(...args) as Promise<T[]> | ||
} | ||
// Placeholder Text | ||
function queryAllByShadowPlaceholderText<T extends HTMLElement = HTMLElement>(...args: ShadowMatcherParams): T[] { | ||
const [container, id, options] = args | ||
return deepQuerySelectorAll(container, scopeQuery, options).map((el) => queryAllByPlaceholderText(el as HTMLElement, id, options)).flat(Infinity) as T[] | ||
} | ||
const getMultiplePlaceholderTextError = (_c: Element | null, id: Matcher) => | ||
@@ -110,19 +182,43 @@ `Found multiple elements with the placeholder text of: ${id}` | ||
const [ | ||
queryByShadowPlaceholderText, | ||
getAllByShadowPlaceholderText, | ||
getByShadowPlaceholderText, | ||
findAllByShadowPlaceholderText, | ||
findByShadowPlaceholderText, | ||
_queryByShadowPlaceholderText, | ||
_getAllByShadowPlaceholderText, | ||
_getByShadowPlaceholderText, | ||
_findAllByShadowPlaceholderText, | ||
_findByShadowPlaceholderText, | ||
] = buildQueries(queryAllByShadowPlaceholderText, getMultiplePlaceholderTextError, getMissingPlaceholderTextError) | ||
const queryByShadowPlaceholderText = <T extends HTMLElement = HTMLElement> (...args: ShadowMatcherParams): T | null => { | ||
// @ts-expect-error | ||
return _queryByShadowPlaceholderText(...args) as T | ||
} | ||
// Text | ||
function queryAllByShadowText<T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowSelectorMatcherOptions | undefined): T[] { | ||
const elements = deepQuerySelectorAll(container, "*") | ||
const getByShadowPlaceholderText = <T extends HTMLElement = HTMLElement> (...args: ShadowMatcherParams): T => { | ||
// @ts-expect-error | ||
return _getByShadowPlaceholderText(...args) as T | ||
} | ||
const getAllByShadowPlaceholderText = <T extends HTMLElement = HTMLElement> (...args: ShadowMatcherParams): T[] => { | ||
// @ts-expect-error | ||
return elements.map((el) => queryAllByText(el, id, options)).flat(Infinity) as T[] | ||
return _getAllByShadowPlaceholderText(...args) as T[] | ||
} | ||
const findByShadowPlaceholderText = <T extends HTMLElement = HTMLElement> (...args: AsyncShadowMatcherParams): Promise<T> => { | ||
// @ts-expect-error | ||
return _findByShadowPlaceholderText(...args) as Promise<T> | ||
} | ||
const findAllByShadowPlaceholderText = <T extends HTMLElement = HTMLElement> (...args: AsyncShadowMatcherParams): Promise<T[]> => { | ||
// @ts-expect-error | ||
return _findAllByShadowPlaceholderText(...args) as Promise<T[]> | ||
} | ||
// Text | ||
function queryAllByShadowText<T extends HTMLElement = HTMLElement>(...args: ShadowSelectorMatcherParams): T[] { | ||
const [container, id, options] = args | ||
return deepQuerySelectorAll(container, scopeQuery, options).map((el) => queryAllByText(el as HTMLElement, id, options)).flat(Infinity) as T[] | ||
} | ||
const getMultipleTextError = (_c: Element | null, id: Matcher) => | ||
@@ -134,17 +230,42 @@ `Found multiple elements with the text of: ${id}` | ||
const [ | ||
queryByShadowText, | ||
getAllByShadowText, | ||
getByShadowText, | ||
findAllByShadowText, | ||
findByShadowText, | ||
_queryByShadowText, | ||
_getAllByShadowText, | ||
_getByShadowText, | ||
_findAllByShadowText, | ||
_findByShadowText, | ||
] = buildQueries(queryAllByShadowText, getMultipleTextError, getMissingTextError) | ||
const queryByShadowText = <T extends HTMLElement = HTMLElement> (...args: ShadowSelectorMatcherParams): T | null => { | ||
// @ts-expect-error | ||
return _queryByShadowText(...args) as T | ||
} | ||
const getByShadowText = <T extends HTMLElement = HTMLElement> (...args: ShadowSelectorMatcherParams): T => { | ||
// @ts-expect-error | ||
return _getByShadowText(...args) as T | ||
} | ||
const getAllByShadowText = <T extends HTMLElement = HTMLElement> (...args: ShadowSelectorMatcherParams): T[] => { | ||
// @ts-expect-error | ||
return _getAllByShadowText(...args) as T[] | ||
} | ||
const findByShadowText = <T extends HTMLElement = HTMLElement> (...args: AsyncShadowSelectorMatcherParams): Promise<T> => { | ||
// @ts-expect-error | ||
return _findByShadowText(...args) as Promise<T> | ||
} | ||
const findAllByShadowText = <T extends HTMLElement = HTMLElement> (...args: AsyncShadowSelectorMatcherParams): Promise<T[]> => { | ||
// @ts-expect-error | ||
return _findAllByShadowText(...args) as Promise<T[]> | ||
} | ||
// Display Value | ||
function queryAllByShadowDisplayValue<T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined): T[] { | ||
const elements = deepQuerySelectorAll(container, "*") | ||
function queryAllByShadowDisplayValue<T extends HTMLElement = HTMLElement>(...args: ShadowSelectorMatcherParams): T[] { | ||
const [container, id, options] = args | ||
// @ts-expect-error | ||
return elements.map((el) => queryAllByDisplayValue(el, id, options)).flat(Infinity) as T[] | ||
return deepQuerySelectorAll(container, scopeQuery, options).map((el) => queryAllByDisplayValue(el, id, options)).flat(Infinity) as T[] | ||
} | ||
@@ -158,19 +279,42 @@ | ||
const [ | ||
queryByShadowDisplayValue, | ||
getAllByShadowDisplayValue, | ||
getByShadowDisplayValue, | ||
findAllByShadowDisplayValue, | ||
findByShadowDisplayValue, | ||
_queryByShadowDisplayValue, | ||
_getAllByShadowDisplayValue, | ||
_getByShadowDisplayValue, | ||
_findAllByShadowDisplayValue, | ||
_findByShadowDisplayValue, | ||
] = buildQueries(queryAllByShadowDisplayValue, getMultipleDisplayValueError, getMissingDisplayValueError) | ||
const queryByShadowDisplayValue = <T extends HTMLElement = HTMLElement> (...args: ShadowSelectorMatcherParams): T | null => { | ||
// @ts-expect-error | ||
return _queryByShadowDisplayValue(...args) as T | ||
} | ||
// Alt Text | ||
function queryAllByShadowAltText<T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined): T[] { | ||
const elements = deepQuerySelectorAll(container, "*") | ||
const getByShadowDisplayValue = <T extends HTMLElement = HTMLElement> (...args: ShadowSelectorMatcherParams): T => { | ||
// @ts-expect-error | ||
return _getByShadowDisplayValue(...args) as T | ||
} | ||
const getAllByShadowDisplayValue = <T extends HTMLElement = HTMLElement> (...args: ShadowSelectorMatcherParams): T[] => { | ||
// @ts-expect-error | ||
return elements.map((el) => queryAllByAltText(el, id, options)).flat(Infinity) as T[] | ||
return _getAllByShadowDisplayValue(...args) as T[] | ||
} | ||
const findByShadowDisplayValue = <T extends HTMLElement = HTMLElement> (...args: AsyncShadowSelectorMatcherParams): Promise<T> => { | ||
// @ts-expect-error | ||
return _findByShadowDisplayValue(...args) as Promise<T> | ||
} | ||
const findAllByShadowDisplayValue = <T extends HTMLElement = HTMLElement> (...args: AsyncShadowSelectorMatcherParams): Promise<T[]> => { | ||
// @ts-expect-error | ||
return _findAllByShadowDisplayValue(...args) as Promise<T[]> | ||
} | ||
// Alt Text | ||
function queryAllByShadowAltText<T extends HTMLElement = HTMLElement>(...args: ShadowMatcherParams): T[] { | ||
const [container, id, options] = args | ||
return deepQuerySelectorAll(container, scopeQuery, options).map((el) => queryAllByAltText(el as HTMLElement, id, options)).flat(Infinity) as T[] | ||
} | ||
const getMultipleAltTextError = (_c: Element | null, id: Matcher) => | ||
@@ -182,18 +326,42 @@ `Found multiple elements with the alt text of: ${id}` | ||
const [ | ||
queryByShadowAltText, | ||
getAllByShadowAltText, | ||
getByShadowAltText, | ||
findAllByShadowAltText, | ||
findByShadowAltText, | ||
_queryByShadowAltText, | ||
_getAllByShadowAltText, | ||
_getByShadowAltText, | ||
_findAllByShadowAltText, | ||
_findByShadowAltText, | ||
] = buildQueries(queryAllByShadowAltText, getMultipleAltTextError, getMissingAltTextError) | ||
const queryByShadowAltText = <T extends HTMLElement = HTMLElement> (...args: ShadowMatcherParams): T | null => { | ||
// @ts-expect-error | ||
return _queryByShadowAltText(...args) as T | ||
} | ||
// Title | ||
function queryAllByShadowTitle<T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined): T[] { | ||
const elements = deepQuerySelectorAll(container, "*") | ||
const getByShadowAltText = <T extends HTMLElement = HTMLElement> (...args: ShadowMatcherParams): T => { | ||
// @ts-expect-error | ||
return _getByShadowAltText(...args) as T | ||
} | ||
const getAllByShadowAltText = <T extends HTMLElement = HTMLElement> (...args: ShadowMatcherParams): T[] => { | ||
// @ts-expect-error | ||
return elements.map((el) => queryAllByTitle(el, id, options)).flat(Infinity) as T[] | ||
return _getAllByShadowAltText(...args) as T[] | ||
} | ||
const findByShadowAltText = <T extends HTMLElement = HTMLElement> (...args: AsyncShadowMatcherParams): Promise<T> => { | ||
// @ts-expect-error | ||
return _findByShadowAltText(...args) as Promise<T> | ||
} | ||
const findAllByShadowAltText = <T extends HTMLElement = HTMLElement> (...args: AsyncShadowMatcherParams): Promise<T[]> => { | ||
// @ts-expect-error | ||
return _findAllByShadowAltText(...args) as Promise<T[]> | ||
} | ||
// Title | ||
function queryAllByShadowTitle<T extends HTMLElement = HTMLElement>(...args: ShadowMatcherParams): T[] { | ||
const [container, id, options] = args | ||
return deepQuerySelectorAll(container, scopeQuery, options).map((el) => queryAllByTitle(el as HTMLElement, id, options)).flat(Infinity) as T[] | ||
} | ||
const getMultipleTitleError = (_c: Element | null, id: Matcher) => | ||
@@ -205,17 +373,43 @@ `Found multiple elements with the title of: ${id}` | ||
const [ | ||
queryByShadowTitle, | ||
getAllByShadowTitle, | ||
getByShadowTitle, | ||
findAllByShadowTitle, | ||
findByShadowTitle, | ||
_queryByShadowTitle, | ||
_getAllByShadowTitle, | ||
_getByShadowTitle, | ||
_findAllByShadowTitle, | ||
_findByShadowTitle, | ||
] = buildQueries(queryAllByShadowTitle, getMultipleTitleError, getMissingTitleError) | ||
// Test Id | ||
function queryAllByShadowTestId<T extends HTMLElement = HTMLElement>(container: HTMLElement, id: Matcher, options?: ShadowMatcherOptions | undefined): T[] { | ||
const elements = deepQuerySelectorAll(container, "*") | ||
const queryByShadowTitle = <T extends HTMLElement = HTMLElement> (...args: ShadowMatcherParams): T | null => { | ||
// @ts-expect-error | ||
return _queryByShadowTitle(...args) as T | ||
} | ||
const getByShadowTitle = <T extends HTMLElement = HTMLElement> (...args: ShadowMatcherParams): T => { | ||
// @ts-expect-error | ||
return elements.map((el) => queryAllByTestId(el, id, options)).flat(Infinity) as T[] | ||
return _getByShadowTitle(...args) as T | ||
} | ||
const getAllByShadowTitle = <T extends HTMLElement = HTMLElement> (...args: ShadowMatcherParams): T[] => { | ||
// @ts-expect-error | ||
return _getAllByShadowTitle(...args) as T[] | ||
} | ||
const findByShadowTitle = <T extends HTMLElement = HTMLElement> (...args: AsyncShadowMatcherParams): Promise<T> => { | ||
// @ts-expect-error | ||
return _findByShadowTitle(...args) as Promise<T> | ||
} | ||
const findAllByShadowTitle = <T extends HTMLElement = HTMLElement> (...args: AsyncShadowMatcherParams): Promise<T[]> => { | ||
// @ts-expect-error | ||
return _findAllByShadowTitle(...args) as Promise<T[]> | ||
} | ||
// Test Id | ||
function queryAllByShadowTestId<T extends HTMLElement = HTMLElement>(...args: ShadowMatcherParams): T[] { | ||
const [container, id, options] = args | ||
return deepQuerySelectorAll(container, scopeQuery, options).map((el) => queryAllByTestId(el as HTMLElement, id, options)).flat(Infinity) as T[] | ||
} | ||
const getMultipleTestIdError = (_c: Element | null, id: Matcher) => | ||
@@ -227,105 +421,102 @@ `Found multiple elements with the test id of: ${id}` | ||
const [ | ||
queryByShadowTestId, | ||
getAllByShadowTestId, | ||
getByShadowTestId, | ||
findAllByShadowTestId, | ||
findByShadowTestId, | ||
_queryByShadowTestId, | ||
_getAllByShadowTestId, | ||
_getByShadowTestId, | ||
_findAllByShadowTestId, | ||
_findByShadowTestId, | ||
] = buildQueries(queryAllByShadowTestId, getMultipleTestIdError, getMissingTestIdError) | ||
// Shadows the following: https://testing-library.com/docs/queries/about/#priority | ||
let myScreen = { | ||
...screen, | ||
// Role | ||
queryAllByShadowRole: (role: ByRoleMatcher, options?: ShadowMatcherOptions | undefined) => queryAllByShadowRole(document.documentElement, role, options), | ||
const queryByShadowTestId = <T extends HTMLElement = HTMLElement> (...args: ShadowMatcherParams): T | null => { | ||
// @ts-expect-error | ||
return _queryByShadowTestId(...args) as T | ||
} | ||
// Pretty sure this is a typing issue with the buildQueries generator. | ||
const getByShadowTestId = <T extends HTMLElement = HTMLElement> (...args: ShadowMatcherParams): T => { | ||
// @ts-expect-error | ||
return _getByShadowTestId(...args) as T | ||
} | ||
const getAllByShadowTestId = <T extends HTMLElement = HTMLElement> (...args: ShadowMatcherParams): T[] => { | ||
// @ts-expect-error | ||
queryByShadowRole: (role: ByRoleMatcher, options?: ShadowMatcherOptions | undefined) => queryByShadowRole(document.documentElement, role, options), | ||
return _getAllByShadowTestId(...args) as T[] | ||
} | ||
const findByShadowTestId = <T extends HTMLElement = HTMLElement> (...args: AsyncShadowMatcherParams): Promise<T> => { | ||
// @ts-expect-error | ||
getAllByShadowRole: (role: ByRoleMatcher, options?: ShadowMatcherOptions | undefined) => getAllByShadowRole(document.documentElement, role, options), | ||
return _findByShadowTestId(...args) as Promise<T> | ||
} | ||
const findAllByShadowTestId = <T extends HTMLElement = HTMLElement> (...args: AsyncShadowMatcherParams): Promise<T[]> => { | ||
// @ts-expect-error | ||
getByShadowRole: (role: ByRoleMatcher, options?: ShadowMatcherOptions | undefined) => getByShadowRole(document.documentElement, role, options), | ||
// TS expects "role" to be a "string" and not a roleMatcher. | ||
// @ts-expect-error | ||
findAllByShadowRole: (role: ByRoleMatcher, ...args: any[]) => findAllByShadowRole(document.documentElement, role, ...args), | ||
// @ts-expect-error | ||
findByShadowRole: (role: ByRoleMatcher, ...args: any[]) => findByShadowRole(document.documentElement, role, ...args), | ||
return _findAllByShadowTestId(...args) as Promise<T[]> | ||
} | ||
// Shadows the following: https://testing-library.com/docs/queries/about/#priority | ||
let myScreen = { | ||
...screen, | ||
// Role | ||
queryAllByShadowRole: (...args: ScreenShadowRoleMatcherParams) => queryAllByShadowRole(document.documentElement, args[0], args[1]), | ||
queryByShadowRole: (...args: ScreenShadowRoleMatcherParams) => queryByShadowRole(document.documentElement, args[0], args[1]), | ||
getAllByShadowRole: (...args: ScreenShadowRoleMatcherParams) => getAllByShadowRole(document.documentElement, args[0], args[1]), | ||
getByShadowRole: (...args: ScreenShadowRoleMatcherParams) => getByShadowRole(document.documentElement, args[0], args[1]), | ||
findAllByShadowRole: (...args: AsyncScreenShadowRoleMatcherParams) => findAllByShadowRole(document.documentElement, args[0], args[1], args[2]), | ||
findByShadowRole: (...args: AsyncScreenShadowRoleMatcherParams) => findByShadowRole(document.documentElement, args[0], args[1], args[2]), | ||
// Label Text | ||
queryAllByShadowLabelText: (id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => queryAllByShadowLabelText(document.documentElement, id, options), | ||
// @ts-expect-error | ||
queryByShadowLabelText: (id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => queryByShadowLabelText(document.documentElement, id, options), | ||
// @ts-expect-error | ||
getAllByShadowLabelText: (id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => getAllByShadowLabelText(document.documentElement, id, options), | ||
// @ts-expect-error | ||
getByShadowLabelText: (id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => getByShadowLabelText(document.documentElement, id, options), | ||
findAllByShadowLabelText: (id: Matcher, ...args: any[]) => findAllByShadowLabelText(document.documentElement, id, ...args), | ||
findByShadowLabelText: (id: Matcher, ...args: any[]) => findByShadowLabelText(document.documentElement, id, ...args), | ||
queryAllByShadowLabelText: (...args: ScreenShadowSelectorMatcherParams) => queryAllByShadowLabelText(document.documentElement, args[0], args[1]), | ||
queryByShadowLabelText: (...args: ScreenShadowSelectorMatcherParams) => queryByShadowLabelText(document.documentElement, args[0], args[1]), | ||
getAllByShadowLabelText: (...args: ScreenShadowSelectorMatcherParams) => getAllByShadowLabelText(document.documentElement, args[0], args[1]), | ||
getByShadowLabelText: (...args: ScreenShadowSelectorMatcherParams) => getByShadowLabelText(document.documentElement, args[0], args[1]), | ||
findAllByShadowLabelText: (...args: AsyncScreenShadowSelectorMatcherParams) => findAllByShadowLabelText(document.documentElement, args[0], args[1], args[2]), | ||
findByShadowLabelText: (...args: AsyncScreenShadowSelectorMatcherParams) => findByShadowLabelText(document.documentElement, args[0], args[1], args[2]), | ||
// Placeholder Text | ||
queryAllByShadowPlaceholderText: (id: Matcher, options?: ShadowMatcherOptions | undefined) => queryAllByShadowPlaceholderText(document.documentElement, id, options), | ||
// @ts-expect-error | ||
queryByShadowPlaceholderText: (id: Matcher, options?: ShadowMatcherOptions | undefined) => queryByShadowPlaceholderText(document.documentElement, id, options), | ||
// @ts-expect-error | ||
getAllByShadowPlaceholderText: (id: Matcher, options?: ShadowMatcherOptions | undefined) => getAllByShadowPlaceholderText(document.documentElement, id, options), | ||
// @ts-expect-error | ||
getByShadowPlaceholderText: (id: Matcher, options?: ShadowMatcherOptions | undefined) => getByShadowPlaceholderText(document.documentElement, id, options), | ||
findAllByShadowPlaceholderText: (id: Matcher, ...args: any[]) => findAllByShadowPlaceholderText(document.documentElement, id, ...args), | ||
findByShadowPlaceholderText: (id: Matcher, ...args: any[]) => findByShadowPlaceholderText(document.documentElement, id, ...args), | ||
queryAllByShadowPlaceholderText: (...args: ScreenShadowMatcherParams) => queryAllByShadowPlaceholderText(document.documentElement, args[0], args[1]), | ||
queryByShadowPlaceholderText: (...args: ScreenShadowMatcherParams) => queryByShadowPlaceholderText(document.documentElement, args[0], args[1]), | ||
getAllByShadowPlaceholderText: (...args: ScreenShadowMatcherParams) => getAllByShadowPlaceholderText(document.documentElement, args[0], args[1]), | ||
getByShadowPlaceholderText: (...args: ScreenShadowMatcherParams) => getByShadowPlaceholderText(document.documentElement, args[0], args[1]), | ||
findAllByShadowPlaceholderText: (...args: AsyncScreenShadowMatcherParams) => findAllByShadowPlaceholderText(document.documentElement, args[0], args[1], args[2]), | ||
findByShadowPlaceholderText: (...args: AsyncScreenShadowMatcherParams) => findByShadowPlaceholderText(document.documentElement, args[0], args[1], args[2]), | ||
// Text | ||
queryAllByShadowText: (id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => queryAllByShadowText(document.documentElement, id, options), | ||
// @ts-expect-error | ||
queryByShadowText: (id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => queryByShadowText(document.documentElement, id, options), | ||
// @ts-expect-error | ||
getAllByShadowText: (id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => getAllByShadowText(document.documentElement, id, options), | ||
// @ts-expect-error | ||
getByShadowText: (id: Matcher, options?: ShadowSelectorMatcherOptions | undefined) => getByShadowText(document.documentElement, id, options), | ||
findAllByShadowText: (id: Matcher, ...args: any[]) => findAllByShadowText(document.documentElement, id, ...args), | ||
findByShadowText: (id: Matcher, ...args: any[]) => findByShadowText(document.documentElement, id, ...args), | ||
queryAllByShadowText: (...args: ScreenShadowSelectorMatcherParams) => queryAllByShadowText(document.documentElement, args[0], args[1]), | ||
queryByShadowText: (...args: ScreenShadowSelectorMatcherParams) => queryByShadowText(document.documentElement, args[0], args[1]), | ||
getAllByShadowText: (...args: ScreenShadowSelectorMatcherParams) => getAllByShadowText(document.documentElement, args[0], args[1]), | ||
getByShadowText: (...args: ScreenShadowSelectorMatcherParams) => getByShadowText(document.documentElement, args[0], args[1]), | ||
findAllByShadowText: (...args: AsyncScreenShadowSelectorMatcherParams) => findAllByShadowText(document.documentElement, args[0], args[1], args[2]), | ||
findByShadowText: (...args: AsyncScreenShadowSelectorMatcherParams) => findByShadowText(document.documentElement, args[0], args[1], args[2]), | ||
// Display Value | ||
queryAllByShadowDisplayValue: (id: Matcher, options?: ShadowMatcherOptions | undefined) => queryAllByShadowDisplayValue(document.documentElement, id, options), | ||
// @ts-expect-error | ||
queryByShadowDisplayValue: (id: Matcher, options?: ShadowMatcherOptions | undefined) => queryByShadowDisplayValue(document.documentElement, id, options), | ||
// @ts-expect-error | ||
getAllByShadowDisplayValue: (id: Matcher, options?: ShadowMatcherOptions | undefined) => getAllByShadowDisplayValue(document.documentElement, id, options), | ||
// @ts-expect-error | ||
getByShadowDisplayValue: (id: Matcher, options?: ShadowMatcherOptions | undefined) => getByShadowDisplayValue(document.documentElement, id, options), | ||
findAllByShadowDisplayValue: (id: Matcher, ...args: any[]) => findAllByShadowDisplayValue(document.documentElement, id, ...args), | ||
findByShadowDisplayValue: (id: Matcher, ...args: any[]) => findByShadowDisplayValue(document.documentElement, id, ...args), | ||
queryAllByShadowDisplayValue: (...args: ScreenShadowMatcherParams) => queryAllByShadowDisplayValue(document.documentElement, args[0], args[1]), | ||
queryByShadowDisplayValue: (...args: ScreenShadowMatcherParams) => queryByShadowDisplayValue(document.documentElement, args[0], args[1]), | ||
getAllByShadowDisplayValue: (...args: ScreenShadowMatcherParams) => getAllByShadowDisplayValue(document.documentElement, args[0], args[1]), | ||
getByShadowDisplayValue: (...args: ScreenShadowMatcherParams) => getByShadowDisplayValue(document.documentElement, args[0], args[1]), | ||
findAllByShadowDisplayValue: (...args: AsyncScreenShadowMatcherParams) => findAllByShadowDisplayValue(document.documentElement, args[0], args[1], args[2]), | ||
findByShadowDisplayValue: (...args: AsyncScreenShadowMatcherParams) => findByShadowDisplayValue(document.documentElement, args[0], args[1], args[2]), | ||
// Alt Text | ||
queryAllByShadowAltText: (id: Matcher, options?: ShadowMatcherOptions | undefined) => queryAllByShadowAltText(document.documentElement, id, options), | ||
// @ts-expect-error | ||
queryByShadowAltText: (id: Matcher, options?: ShadowMatcherOptions | undefined) => queryByShadowAltText(document.documentElement, id, options), | ||
// @ts-expect-error | ||
getAllByShadowAltText: (id: Matcher, options?: ShadowMatcherOptions | undefined) => getAllByShadowAltText(document.documentElement, id, options), | ||
// @ts-expect-error | ||
getByShadowAltText: (id: Matcher, options?: ShadowMatcherOptions | undefined) => getByShadowAltText(document.documentElement, id, options), | ||
findAllByShadowAltText: (id: Matcher, ...args: any[]) => findAllByShadowAltText(document.documentElement, id, ...args), | ||
findByShadowAltText: (id: Matcher, ...args: any[]) => findByShadowAltText(document.documentElement, id, ...args), | ||
queryAllByShadowAltText: (...args: ScreenShadowMatcherParams) => queryAllByShadowAltText(document.documentElement, args[0], args[1]), | ||
queryByShadowAltText: (...args: ScreenShadowMatcherParams) => queryByShadowAltText(document.documentElement, args[0], args[1]), | ||
getAllByShadowAltText: (...args: ScreenShadowMatcherParams) => getAllByShadowAltText(document.documentElement, args[0], args[1]), | ||
getByShadowAltText: (...args: ScreenShadowMatcherParams) => getByShadowAltText(document.documentElement, args[0], args[1]), | ||
findAllByShadowAltText: (...args: AsyncScreenShadowMatcherParams) => findAllByShadowAltText(document.documentElement, args[0], args[1], args[2]), | ||
findByShadowAltText: (...args: AsyncScreenShadowMatcherParams) => findByShadowAltText(document.documentElement, args[0], args[1], args[2]), | ||
// Title | ||
queryAllByShadowTitle: (id: Matcher, options?: ShadowMatcherOptions | undefined) => queryAllByShadowTitle(document.documentElement, id, options), | ||
// @ts-expect-error | ||
queryByShadowTitle: (id: Matcher, options?: ShadowMatcherOptions | undefined) => queryByShadowTitle(document.documentElement, id, options), | ||
// @ts-expect-error | ||
getAllByShadowTitle: (id: Matcher, options?: ShadowMatcherOptions | undefined) => getAllByShadowTitle(document.documentElement, id, options), | ||
// @ts-expect-error | ||
getByShadowTitle: (id: Matcher, options?: ShadowMatcherOptions | undefined) => getByShadowTitle(document.documentElement, id, options), | ||
findAllByShadowTitle: (id: Matcher, ...args: any[]) => findAllByShadowTitle(document.documentElement, id, ...args), | ||
findByShadowTitle: (id: Matcher, ...args: any[]) => findByShadowTitle(document.documentElement, id, ...args), | ||
queryAllByShadowTitle: (...args: ScreenShadowMatcherParams) => queryAllByShadowTitle(document.documentElement, args[0], args[1]), | ||
queryByShadowTitle: (...args: ScreenShadowMatcherParams) => queryByShadowTitle(document.documentElement, args[0], args[1]), | ||
getAllByShadowTitle: (...args: ScreenShadowMatcherParams) => getAllByShadowTitle(document.documentElement, args[0], args[1]), | ||
getByShadowTitle: (...args: ScreenShadowMatcherParams) => getByShadowTitle(document.documentElement, args[0], args[1]), | ||
findAllByShadowTitle: (...args: AsyncScreenShadowMatcherParams) => findAllByShadowTitle(document.documentElement, args[0], args[1], args[2]), | ||
findByShadowTitle: (...args: AsyncScreenShadowMatcherParams) => findByShadowTitle(document.documentElement, args[0], args[1], args[2]), | ||
// Test Id | ||
queryAllByShadowTestId: (id: Matcher, options?: ShadowMatcherOptions | undefined) => queryAllByShadowTestId(document.documentElement, id, options), | ||
// @ts-expect-error | ||
queryByShadowTestId: (id: Matcher, options?: ShadowMatcherOptions | undefined) => queryByShadowTestId(document.documentElement, id, options), | ||
// @ts-expect-error | ||
getAllByShadowTestId: (id: Matcher, options?: ShadowMatcherOptions | undefined) => getAllByShadowTestId(document.documentElement, id, options), | ||
// @ts-expect-error | ||
getByShadowTestId: (id: Matcher, options?: ShadowMatcherOptions | undefined) => getByShadowTestId(document.documentElement, id, options), | ||
findAllByShadowTestId: (id: Matcher, ...args: any[]) => findAllByShadowTestId(document.documentElement, id, ...args), | ||
findByShadowTestId: (id: Matcher, ...args: any[]) => findByShadowTestId(document.documentElement, id, ...args), | ||
queryAllByShadowTestId: (...args: ScreenShadowMatcherParams) => queryAllByShadowTestId(document.documentElement, args[0], args[1]), | ||
queryByShadowTestId: (...args: ScreenShadowMatcherParams) => queryByShadowTestId(document.documentElement, args[0], args[1]), | ||
getAllByShadowTestId: (...args: ScreenShadowMatcherParams) => getAllByShadowTestId(document.documentElement, args[0], args[1]), | ||
getByShadowTestId: (...args: ScreenShadowMatcherParams) => getByShadowTestId(document.documentElement, args[0], args[1]), | ||
findAllByShadowTestId: (...args: AsyncScreenShadowMatcherParams) => findAllByShadowTestId(document.documentElement, args[0], args[1], args[2]), | ||
findByShadowTestId: (...args: AsyncScreenShadowMatcherParams) => findByShadowTestId(document.documentElement, args[0], args[1], args[2]), | ||
} | ||
@@ -332,0 +523,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
232157
1368
159
22
1