UNPKG

shadow-dom-testing-library

Version:

An extension of DOM-testing-library to provide hooks into the shadow dom

6 lines (5 loc) 20 kB
"use strict";var ce=Object.defineProperty;var Ve=Object.getOwnPropertyDescriptor;var Fe=Object.getOwnPropertyNames;var Ne=Object.prototype.hasOwnProperty;var Me=(e,t)=>{for(var l in t)ce(e,l,{get:t[l],enumerable:!0})},Ce=(e,t,l,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Fe(t))!Ne.call(e,o)&&o!==l&&ce(e,o,{get:()=>t[o],enumerable:!(a=Ve(t,o))||a.enumerable});return e};var Ge=e=>Ce(ce({},"__esModule",{value:!0}),e);var ro={};Me(ro,{createDOMElementFilter:()=>L,debug:()=>we,deepQuerySelector:()=>Le,deepQuerySelectorAll:()=>Be,findAllByShadowAltText:()=>te,findAllByShadowDisplayValue:()=>J,findAllByShadowLabelText:()=>D,findAllByShadowPlaceholderText:()=>N,findAllByShadowRole:()=>b,findAllByShadowTestId:()=>he,findAllByShadowText:()=>U,findAllByShadowTitle:()=>re,findByShadowAltText:()=>oe,findByShadowDisplayValue:()=>K,findByShadowLabelText:()=>I,findByShadowPlaceholderText:()=>C,findByShadowRole:()=>q,findByShadowTestId:()=>ie,findByShadowText:()=>k,findByShadowTitle:()=>de,getAllByShadowAltText:()=>v,getAllByShadowDisplayValue:()=>z,getAllByShadowLabelText:()=>_,getAllByShadowPlaceholderText:()=>V,getAllByShadowRole:()=>R,getAllByShadowTestId:()=>se,getAllByShadowText:()=>$,getAllByShadowTitle:()=>le,getAllElementsAndShadowRoots:()=>h,getByShadowAltText:()=>ee,getByShadowDisplayValue:()=>Y,getByShadowLabelText:()=>O,getByShadowPlaceholderText:()=>F,getByShadowRole:()=>H,getByShadowTestId:()=>Te,getByShadowText:()=>W,getByShadowTitle:()=>ne,logShadowDOM:()=>P,prettyShadowDOM:()=>fe,queryAllByShadowAltText:()=>A,queryAllByShadowDisplayValue:()=>x,queryAllByShadowLabelText:()=>p,queryAllByShadowPlaceholderText:()=>B,queryAllByShadowRole:()=>c,queryAllByShadowTestId:()=>E,queryAllByShadowText:()=>f,queryAllByShadowTitle:()=>M,queryByShadowAltText:()=>Z,queryByShadowDisplayValue:()=>X,queryByShadowLabelText:()=>Q,queryByShadowPlaceholderText:()=>j,queryByShadowRole:()=>g,queryByShadowTestId:()=>ye,queryByShadowText:()=>G,queryByShadowTitle:()=>ae,screen:()=>Ie,shadowQueries:()=>m,within:()=>je});module.exports=Ge(ro);var Se=require("@testing-library/dom");var m={};Me(m,{findAllByShadowAltText:()=>te,findAllByShadowDisplayValue:()=>J,findAllByShadowLabelText:()=>D,findAllByShadowPlaceholderText:()=>N,findAllByShadowRole:()=>b,findAllByShadowTestId:()=>he,findAllByShadowText:()=>U,findAllByShadowTitle:()=>re,findByShadowAltText:()=>oe,findByShadowDisplayValue:()=>K,findByShadowLabelText:()=>I,findByShadowPlaceholderText:()=>C,findByShadowRole:()=>q,findByShadowTestId:()=>ie,findByShadowText:()=>k,findByShadowTitle:()=>de,getAllByShadowAltText:()=>v,getAllByShadowDisplayValue:()=>z,getAllByShadowLabelText:()=>_,getAllByShadowPlaceholderText:()=>V,getAllByShadowRole:()=>R,getAllByShadowTestId:()=>se,getAllByShadowText:()=>$,getAllByShadowTitle:()=>le,getByShadowAltText:()=>ee,getByShadowDisplayValue:()=>Y,getByShadowLabelText:()=>O,getByShadowPlaceholderText:()=>F,getByShadowRole:()=>H,getByShadowTestId:()=>Te,getByShadowText:()=>W,getByShadowTitle:()=>ne,queryAllByShadowAltText:()=>A,queryAllByShadowDisplayValue:()=>x,queryAllByShadowLabelText:()=>p,queryAllByShadowPlaceholderText:()=>B,queryAllByShadowRole:()=>c,queryAllByShadowTestId:()=>E,queryAllByShadowText:()=>f,queryAllByShadowTitle:()=>M,queryByShadowAltText:()=>Z,queryByShadowDisplayValue:()=>X,queryByShadowLabelText:()=>Q,queryByShadowPlaceholderText:()=>j,queryByShadowRole:()=>g,queryByShadowTestId:()=>ye,queryByShadowText:()=>G,queryByShadowTitle:()=>ae});var r=require("@testing-library/dom");We();function $e(){Ue()}function Ee(){HTMLSlotElement.prototype.querySelectorAll=HTMLElement.prototype.querySelectorAll}function s(e){$e();try{let t=e();return typeof t=="object"&&"finally"in t&&typeof t.finally=="function"&&t.finally(()=>Ee()),t}finally{Ee()}}function We(){if(typeof ShadowRoot>"u")throw"Your environment does not support shadow roots.";ShadowRoot.prototype.matches==null&&Object.defineProperties(ShadowRoot.prototype,{matches:{get(){return function(e){return e.trim()==="*"?!0:Boolean(this.querySelector(e))}}}}),ShadowRoot.prototype.outerHTML==null&&Object.defineProperties(ShadowRoot.prototype,{outerHTML:{get(){return this.innerHTML}}})}function Ue(){HTMLSlotElement.prototype.querySelectorAll=function(e){let t=HTMLElement.prototype.querySelectorAll,l=[];return this.assignedElements({flatten:!0}).forEach(a=>{let o=a,n=document.createElement("div");n.appendChild(o.cloneNode(!1)),n.querySelector(e)&&l.push(o),l=l.concat(Array.from(o.querySelectorAll(e)))}),l.length==0&&(l=Array.from(t.call(this,e))),[...new Set(l)]}}function pe(e){return e.shallow!=null&&(console.warn('The "shallow" option will be removed in the next major release. Please use "{depth: 1}" to maintain the same functionality.'),e.shallow===!0&&(e.depth=1)),e.depth||(e.depth=1/0),e}function Le(e,t,l={shallow:!1,depth:1/0}){l=pe(l);let a=Be(e,t,l);return Array.isArray(a)&&a.length>0?a[0]:null}function Be(e,t,l={shallow:!1,depth:1/0}){return l=pe(l),s(()=>{let o=h(e,l).map(n=>Array.from(n.querySelectorAll(t))).flat(1/0);return[...new Set(o)]})}function h(e,t={shallow:!1,depth:1/0}){return t=pe(t),Pe(e,"*",t)}function Pe(e,t,l={shallow:!1,depth:1/0},a=[],o=[],n=1){return e instanceof Document&&(e=document.documentElement),a=[e],o.push(e),e instanceof HTMLElement&&e.shadowRoot!=null&&e.shadowRoot.mode!=="closed"&&(o.push(e.shadowRoot),a.push(e.shadowRoot)),a.forEach(y=>{y.querySelectorAll(t).forEach(d=>{if(d.shadowRoot==null||d.shadowRoot.mode==="closed"){o.push(d);return}if(o.push(d.shadowRoot),l.depth&&l.depth<=n){d.shadowRoot.querySelectorAll(t).forEach(T=>{o.push(T)});return}n++,d.shadowRoot.querySelectorAll(t).forEach(T=>{o.push(T),a.push(T)}),Pe(d.shadowRoot,t,l,a,o,n)})}),[...new Set(o)]}function i(e){return e.map(t=>(...l)=>{let[a,o,n,...y]=l;return n==null&&(n={}),n.suggest=!1,t(a,o,n,...y)})}function c(...e){let[t,l,a]=e;return a==null&&(a={}),a.suggest=!1,[...new Set(s(()=>h(t,a).map(o=>(0,r.queryAllByRole)(o,l,a)).flat(1/0)))]}var ke=(e,t)=>`Found multiple elements with the role of: ${t}`,Xe=(e,t)=>`Unable to find an element with the role of: ${t}`,[ze,Ye,Je,Ke,Ze]=i((0,r.buildQueries)(c,ke,Xe)),g=(...e)=>ze(...e),R=(...e)=>Ye(...e),H=(...e)=>Je(...e),b=(...e)=>Ke(...e),q=(...e)=>Ze(...e);function p(...e){let[t,l,a]=e;return a==null&&(a={}),a.suggest=!1,[...new Set(s(()=>h(t,a).map(o=>(0,r.queryAllByLabelText)(o,l,a)).flat(1/0)))]}var ve=(e,t)=>`Found multiple elements with the label text of: ${t}`,et=(e,t)=>`Unable to find an element with the label text of: ${t}`,[tt,ot,at,lt,nt]=i((0,r.buildQueries)(p,ve,et)),Q=(...e)=>tt(...e),_=(...e)=>ot(...e),O=(...e)=>at(...e),D=(...e)=>lt(...e),I=(...e)=>nt(...e);function B(...e){let[t,l,a]=e;return a==null&&(a={}),a.suggest=!1,[...new Set(s(()=>h(t,a).map(o=>(0,r.queryAllByPlaceholderText)(o,l,a)).flat(1/0)))]}var rt=(e,t)=>`Found multiple elements with the placeholder text of: ${t}`,dt=(e,t)=>`Unable to find an element with the placeholder text of: ${t}`,[yt,st,Tt,ht,it]=i((0,r.buildQueries)(B,rt,dt)),j=(...e)=>yt(...e),V=(...e)=>st(...e),F=(...e)=>Tt(...e),N=(...e)=>ht(...e),C=(...e)=>it(...e);function f(...e){let[t,l,a]=e;return a==null&&(a={}),a.suggest=!1,[...new Set(s(()=>h(t,a).map(o=>(0,r.queryAllByText)(o,l,a)).flat(1/0)))]}var ut=(e,t)=>`Found multiple elements with the text of: ${t}`,wt=(e,t)=>`Unable to find an element with the text of: ${t}`,[mt,St,ct,pt,Bt]=i((0,r.buildQueries)(f,ut,wt)),G=(...e)=>mt(...e),$=(...e)=>St(...e),W=(...e)=>ct(...e),U=(...e)=>pt(...e),k=(...e)=>Bt(...e);function x(...e){let[t,l,a]=e;return a==null&&(a={}),a.suggest=!1,[...new Set(s(()=>h(t,a).map(o=>(0,r.queryAllByDisplayValue)(o,l,a)).flat(1/0)))]}var ft=(e,t)=>`Found multiple elements with the display value of: ${t}`,xt=(e,t)=>`Unable to find an element with the display value of: ${t}`,[At,Mt,Et,Lt,Pt]=i((0,r.buildQueries)(x,ft,xt)),X=(...e)=>At(...e),z=(...e)=>Mt(...e),Y=(...e)=>Et(...e),J=(...e)=>Lt(...e),K=(...e)=>Pt(...e);function A(...e){let[t,l,a]=e;return a==null&&(a={}),a.suggest=!1,[...new Set(s(()=>h(t,a).map(o=>(0,r.queryAllByAltText)(o,l,a)).flat(1/0)))]}var gt=(e,t)=>`Found multiple elements with the alt text of: ${t}`,Rt=(e,t)=>`Unable to find an element with the alt text of: ${t}`,[Ht,bt,qt,Qt,_t]=i((0,r.buildQueries)(A,gt,Rt)),Z=(...e)=>Ht(...e),v=(...e)=>bt(...e),ee=(...e)=>qt(...e),te=(...e)=>Qt(...e),oe=(...e)=>_t(...e);function M(...e){let[t,l,a]=e;return a==null&&(a={}),a.suggest=!1,[...new Set(s(()=>h(t,a).map(o=>(0,r.queryAllByTitle)(o,l,a)).flat(1/0)))]}var Ot=(e,t)=>`Found multiple elements with the title of: ${t}`,Dt=(e,t)=>`Unable to find an element with the title of: ${t}`,[It,jt,Vt,Ft,Nt]=i((0,r.buildQueries)(M,Ot,Dt)),ae=(...e)=>It(...e),le=(...e)=>jt(...e),ne=(...e)=>Vt(...e),re=(...e)=>Ft(...e),de=(...e)=>Nt(...e);function E(...e){let[t,l,a]=e;return a==null&&(a={}),a.suggest=!1,[...new Set(s(()=>h(t,a).map(o=>(0,r.queryAllByTestId)(o,l,a)).flat(1/0)))]}var Ct=(e,t)=>`Found multiple elements with the test id of: ${t}`,Gt=(e,t)=>`Unable to find an element with the test id of: ${t}`,[$t,Wt,Ut,kt,Xt]=i((0,r.buildQueries)(E,Ct,Gt)),ye=(...e)=>$t(...e),se=(...e)=>Wt(...e),Te=(...e)=>Ut(...e),he=(...e)=>kt(...e),ie=(...e)=>Xt(...e);var Oe=require("@testing-library/dom");var ue=require("@testing-library/dom");var ge=/([^\S(\r\n|\r|\n)]*[\f\n\r\t\v]+)/.source;function zt(e){return e.replace(new RegExp(`${ge}.*${ge}{2,}`,"g"),"")}function fe(...e){let[t,l,a]=e,o=L((a==null?void 0:a.filterNode)||xe);return a==null&&(a={}),a.plugins==null&&(a.plugins=[]),a.plugins.push(o),s(()=>(0,ue.prettyDOM)(t,l,{...a,plugins:[o]}))}function He(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function xe(e){return e.nodeType!==Ae&&(e.nodeType!==qe||!e.matches((0,ue.getConfig)().defaultIgnore))}var Yt=(e,t,l,a,o,n,y)=>{let d=a+l.indent,T=l.colors;return e.map(u=>{let S=t[u],w=y(S,l,d,o,n);return typeof S!="string"&&(w.indexOf(` `)!==-1&&(w=l.spacingOuter+d+w+l.spacingOuter+a),w="{"+w+"}"),l.spacingInner+a+T.prop.open+u+T.prop.close+"="+T.value.open+w+T.value.close}).join("")},Jt=3,Kt=(e,t,l,a,o,n)=>zt(e.map(y=>{let d=typeof y=="string"?be(y,t):n(y,t,l,a,o);return d===""&&typeof y=="object"&&y!=null&&y.nodeType!==Jt?"":t.spacingOuter+l+d}).join("")),be=(e,t)=>{let l=t.colors.content;return l.open+He(e)+l.close},Zt=(e,t)=>{let l=t.colors.comment;return l.open+"<!--"+He(e)+"-->"+l.close},vt=(e,t,l,a,o)=>{let n=a.colors.tag;return n.open+"<"+e+(t&&n.close+t+a.spacingOuter+o+n.open)+(l?">"+n.close+l+a.spacingOuter+o+n.open+"</"+e:(t&&!a.min?"":" ")+"/")+">"+n.close},eo=(e,t)=>{let l=t.colors.tag;return l.open+"<"+e+l.close+" \u2026"+l.open+" />"+l.close},qe=1,Qe=3,Ae=8,_e=11,to=/^((HTML|SVG)\w*)?Element$/,oo=e=>{var n;let t=((n=e==null?void 0:e.constructor)==null?void 0:n.name)||"",{nodeType:l,tagName:a}=e,o=typeof a=="string"&&a.includes("-")||typeof e.hasAttribute=="function"&&e.hasAttribute("is")||e instanceof HTMLElement;return l===qe&&(to.test(t)||o)||l===Qe&&t==="Text"||l===Ae&&t==="Comment"||l===_e};function ao(e){return e.nodeType===Qe}function lo(e){return e.nodeType===Ae}function Re(e){return e.nodeType===_e}function L(e){function t(l){let a=Array.prototype.slice.call(l.childNodes||l.children);return"shadowRoot"in l&&l.shadowRoot!=null&&l.shadowRoot.mode!=="closed"&&a.unshift(l.shadowRoot),a.filter(e)}return{test:l=>(l==null?void 0:l.constructor)&&oo(l),serialize:(l,a,o,n,y,d)=>{if(ao(l))return be(l.data,a);if(lo(l))return Zt(l.data,a);let T="DocumentFragment";return"tagName"in l&&l.tagName?T=l.tagName.toLowerCase():l instanceof ShadowRoot&&(T="ShadowRoot"),++n>a.maxDepth?eo(T,a):vt(T,Yt(Re(l)?[]:Array.from(l.attributes).map(u=>u.name).sort(),Re(l)?{}:Array.from(l.attributes).reduce((u,S)=>(u[S.name]=S.value,u),{}),a,o+a.indent,n,y,d),Kt(t(l),a,o+a.indent,n,y,d),a,o)}}}function P(...e){let[t,l,a]=e,o=L((a==null?void 0:a.filterNode)||xe);a==null&&(a={}),a.plugins==null&&(a.plugins=[]),a.plugins.push(o),s(()=>(0,Oe.logDOM)(t,l,a))}function we(...e){let[t,l,a]=e;Array.isArray(t)?t.forEach(o=>P(o,l,a)):P(t,l,a)}var De=require("@testing-library/dom");var Ie={...De.screen,debug:we,queryAllByShadowRole:(...e)=>c(document.documentElement,e[0],e[1]),queryByShadowRole:(...e)=>g(document.documentElement,e[0],e[1]),getAllByShadowRole:(...e)=>R(document.documentElement,e[0],e[1]),getByShadowRole:(...e)=>H(document.documentElement,e[0],e[1]),findAllByShadowRole:(...e)=>b(document.documentElement,e[0],e[1],e[2]),findByShadowRole:(...e)=>q(document.documentElement,e[0],e[1],e[2]),queryAllByShadowLabelText:(...e)=>p(document.documentElement,e[0],e[1]),queryByShadowLabelText:(...e)=>Q(document.documentElement,e[0],e[1]),getAllByShadowLabelText:(...e)=>_(document.documentElement,e[0],e[1]),getByShadowLabelText:(...e)=>O(document.documentElement,e[0],e[1]),findAllByShadowLabelText:(...e)=>D(document.documentElement,e[0],e[1],e[2]),findByShadowLabelText:(...e)=>I(document.documentElement,e[0],e[1],e[2]),queryAllByShadowPlaceholderText:(...e)=>B(document.documentElement,e[0],e[1]),queryByShadowPlaceholderText:(...e)=>j(document.documentElement,e[0],e[1]),getAllByShadowPlaceholderText:(...e)=>V(document.documentElement,e[0],e[1]),getByShadowPlaceholderText:(...e)=>F(document.documentElement,e[0],e[1]),findAllByShadowPlaceholderText:(...e)=>N(document.documentElement,e[0],e[1],e[2]),findByShadowPlaceholderText:(...e)=>C(document.documentElement,e[0],e[1],e[2]),queryAllByShadowText:(...e)=>f(document.documentElement,e[0],e[1]),queryByShadowText:(...e)=>G(document.documentElement,e[0],e[1]),getAllByShadowText:(...e)=>$(document.documentElement,e[0],e[1]),getByShadowText:(...e)=>W(document.documentElement,e[0],e[1]),findAllByShadowText:(...e)=>U(document.documentElement,e[0],e[1],e[2]),findByShadowText:(...e)=>k(document.documentElement,e[0],e[1],e[2]),queryAllByShadowDisplayValue:(...e)=>x(document.documentElement,e[0],e[1]),queryByShadowDisplayValue:(...e)=>X(document.documentElement,e[0],e[1]),getAllByShadowDisplayValue:(...e)=>z(document.documentElement,e[0],e[1]),getByShadowDisplayValue:(...e)=>Y(document.documentElement,e[0],e[1]),findAllByShadowDisplayValue:(...e)=>J(document.documentElement,e[0],e[1],e[2]),findByShadowDisplayValue:(...e)=>K(document.documentElement,e[0],e[1],e[2]),queryAllByShadowAltText:(...e)=>A(document.documentElement,e[0],e[1]),queryByShadowAltText:(...e)=>Z(document.documentElement,e[0],e[1]),getAllByShadowAltText:(...e)=>v(document.documentElement,e[0],e[1]),getByShadowAltText:(...e)=>ee(document.documentElement,e[0],e[1]),findAllByShadowAltText:(...e)=>te(document.documentElement,e[0],e[1],e[2]),findByShadowAltText:(...e)=>oe(document.documentElement,e[0],e[1],e[2]),queryAllByShadowTitle:(...e)=>M(document.documentElement,e[0],e[1]),queryByShadowTitle:(...e)=>ae(document.documentElement,e[0],e[1]),getAllByShadowTitle:(...e)=>le(document.documentElement,e[0],e[1]),getByShadowTitle:(...e)=>ne(document.documentElement,e[0],e[1]),findAllByShadowTitle:(...e)=>re(document.documentElement,e[0],e[1],e[2]),findByShadowTitle:(...e)=>de(document.documentElement,e[0],e[1],e[2]),queryAllByShadowTestId:(...e)=>E(document.documentElement,e[0],e[1]),queryByShadowTestId:(...e)=>ye(document.documentElement,e[0],e[1]),getAllByShadowTestId:(...e)=>se(document.documentElement,e[0],e[1]),getByShadowTestId:(...e)=>Te(document.documentElement,e[0],e[1]),findAllByShadowTestId:(...e)=>he(document.documentElement,e[0],e[1],e[2]),findByShadowTestId:(...e)=>ie(document.documentElement,e[0],e[1],e[2])};var me=require("@testing-library/dom");var no={...me.queries,...m};function je(e){let t=(0,me.within)(e,no);return{...t,...{queryAllByShadowRole:(...o)=>t.queryAllByShadowRole(...o),queryByShadowRole:(...o)=>t.queryByShadowRole(...o),getAllByShadowRole:(...o)=>t.getAllByShadowRole(...o),getByShadowRole:(...o)=>t.getByShadowRole(...o),findAllByShadowRole:(...o)=>t.findAllByShadowRole(...o),findByShadowRole:(...o)=>t.findByShadowRole(...o),queryAllByShadowLabelText:(...o)=>t.queryAllByShadowLabelText(...o),queryByShadowLabelText:(...o)=>t.queryByShadowLabelText(...o),getAllByShadowLabelText:(...o)=>t.getAllByShadowLabelText(...o),getByShadowLabelText:(...o)=>t.getByShadowLabelText(...o),findAllByShadowLabelText:(...o)=>t.findAllByShadowLabelText(...o),findByShadowLabelText:(...o)=>t.findByShadowLabelText(...o),queryAllByShadowPlaceholderText:(...o)=>t.queryAllByShadowPlaceholderText(...o),queryByShadowPlaceholderText:(...o)=>t.queryByShadowPlaceholderText(...o),getAllByShadowPlaceholderText:(...o)=>t.getAllByShadowPlaceholderText(...o),getByShadowPlaceholderText:(...o)=>t.getByShadowPlaceholderText(...o),findAllByShadowPlaceholderText:(...o)=>t.findAllByShadowPlaceholderText(...o),findByShadowPlaceholderText:(...o)=>t.findByShadowPlaceholderText(...o),queryAllByShadowText:(...o)=>t.queryAllByShadowText(...o),queryByShadowText:(...o)=>t.queryByShadowText(...o),getAllByShadowText:(...o)=>t.getAllByShadowText(...o),getByShadowText:(...o)=>t.getByShadowText(...o),findAllByShadowText:(...o)=>t.findAllByShadowText(...o),findByShadowText:(...o)=>t.findByShadowText(...o),queryAllByShadowDisplayValue:(...o)=>t.queryAllByShadowDisplayValue(...o),queryByShadowDisplayValue:(...o)=>t.queryByShadowDisplayValue(...o),getAllByShadowDisplayValue:(...o)=>t.getAllByShadowDisplayValue(...o),getByShadowDisplayValue:(...o)=>t.getByShadowDisplayValue(...o),findAllByShadowDisplayValue:(...o)=>t.findAllByShadowDisplayValue(...o),findByShadowDisplayValue:(...o)=>t.findByShadowDisplayValue(...o),queryAllByShadowAltText:(...o)=>t.queryAllByShadowAltText(...o),queryByShadowAltText:(...o)=>t.queryByShadowAltText(...o),getAllByShadowAltText:(...o)=>t.getAllByShadowAltText(...o),getByShadowAltText:(...o)=>t.getByShadowAltText(...o),findAllByShadowAltText:(...o)=>t.findAllByShadowAltText(...o),findByShadowAltText:(...o)=>t.findByShadowAltText(...o),queryAllByShadowTitle:(...o)=>t.queryAllByShadowTitle(...o),queryByShadowTitle:(...o)=>t.queryByShadowTitle(...o),getAllByShadowTitle:(...o)=>t.getAllByShadowTitle(...o),getByShadowTitle:(...o)=>t.getByShadowTitle(...o),findAllByShadowTitle:(...o)=>t.findAllByShadowTitle(...o),findByShadowTitle:(...o)=>t.findByShadowTitle(...o),queryAllByShadowTestId:(...o)=>t.queryAllByShadowTestId(...o),queryByShadowTestId:(...o)=>t.queryByShadowTestId(...o),getAllByShadowTestId:(...o)=>t.getAllByShadowTestId(...o),getByShadowTestId:(...o)=>t.getByShadowTestId(...o),findAllByShadowTestId:(...o)=>t.findAllByShadowTestId(...o),findByShadowTestId:(...o)=>t.findByShadowTestId(...o)}}}(0,Se.configure)({getElementError(e,t){let l=fe(t),a=new Error([e,`Ignored nodes: comments, ${(0,Se.getConfig)().defaultIgnore} ${l}`].filter(Boolean).join(` `));return a.name="ShadowDOMTestingLibraryElementError",a}});0&&(module.exports={createDOMElementFilter,debug,deepQuerySelector,deepQuerySelectorAll,findAllByShadowAltText,findAllByShadowDisplayValue,findAllByShadowLabelText,findAllByShadowPlaceholderText,findAllByShadowRole,findAllByShadowTestId,findAllByShadowText,findAllByShadowTitle,findByShadowAltText,findByShadowDisplayValue,findByShadowLabelText,findByShadowPlaceholderText,findByShadowRole,findByShadowTestId,findByShadowText,findByShadowTitle,getAllByShadowAltText,getAllByShadowDisplayValue,getAllByShadowLabelText,getAllByShadowPlaceholderText,getAllByShadowRole,getAllByShadowTestId,getAllByShadowText,getAllByShadowTitle,getAllElementsAndShadowRoots,getByShadowAltText,getByShadowDisplayValue,getByShadowLabelText,getByShadowPlaceholderText,getByShadowRole,getByShadowTestId,getByShadowText,getByShadowTitle,logShadowDOM,prettyShadowDOM,queryAllByShadowAltText,queryAllByShadowDisplayValue,queryAllByShadowLabelText,queryAllByShadowPlaceholderText,queryAllByShadowRole,queryAllByShadowTestId,queryAllByShadowText,queryAllByShadowTitle,queryByShadowAltText,queryByShadowDisplayValue,queryByShadowLabelText,queryByShadowPlaceholderText,queryByShadowRole,queryByShadowTestId,queryByShadowText,queryByShadowTitle,screen,shadowQueries,within}); //# sourceMappingURL=index.cjs.map