shadow-dom-testing-library
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -1,2 +0,2 @@ | ||
import{buildQueries as r,screen as M,queryAllByRole as T,queryAllByLabelText as p,queryAllByPlaceholderText as f,queryAllByText as E,queryAllByDisplayValue as B,queryAllByAltText as A,queryAllByTitle as x,queryAllByTestId as P}from"@testing-library/dom";function R(){typeof ShadowRoot>"u"||typeof ShadowRoot.prototype.matches<"u"||(ShadowRoot.prototype.matches=function(e){return e.trim()==="*"?!0:this.querySelector(e)!=null},Object.defineProperties(ShadowRoot.prototype,{outerHTML:{get(){return this.innerHTML}}}))}R();function Fe(e,t,a={shallow:!1},o=[]){let n=l(e,t,a,o);return Array.isArray(n)&&n.length>0?n[0]:null}function l(e,t,a={shallow:!1},o=[]){return e instanceof Document&&(e=document.documentElement),e.shadowRoot!=null&&e.shadowRoot.mode!=="closed"&&o.push(e.shadowRoot),e instanceof ShadowRoot&&o.push(e),e.querySelectorAll(t).forEach(n=>{if(n.shadowRoot==null||n.shadowRoot.mode==="closed"){o.push(n),console.log(n);return}if(o.push(n.shadowRoot),a.shallow===!0){n.shadowRoot.querySelectorAll(t).forEach(d=>o.push(d));return}n.shadowRoot.querySelectorAll(t).forEach(d=>o.push(d)),l(n.shadowRoot,t,a,o)}),[...new Set(o)]}var c=":scope *";function h(...e){let[t,a,o]=e;return l(t,c,o).map(n=>T(n,a,o)).flat(1/0)}var L=(e,t)=>`Found multiple elements with the role of: ${t}`,q=(e,t)=>`Unable to find an element with the role of: ${t}`,[H,O,b,I,D]=r(h,L,q);function m(...e){let[t,a,o]=e;return l(t,":scope *").map(d=>p(d,a,o)).flat(1/0)}var _=(e,t)=>`Found multiple elements with the label text of: ${t}`,$=(e,t)=>`Unable to find an element with the label text of: ${t}`,[F,V,U,g,Q]=r(m,_,$);function S(...e){let[t,a,o]=e;return l(t,c,o).map(n=>f(n,a,o)).flat(1/0)}var C=(e,t)=>`Found multiple elements with the placeholder text of: ${t}`,v=(e,t)=>`Unable to find an element with the placeholder text of: ${t}`,[j,k,z,G,J]=r(S,C,v);function i(...e){let[t,a,o]=e;return l(t,c,o).map(n=>E(n,a,o)).flat(1/0)}var K=(e,t)=>`Found multiple elements with the text of: ${t}`,N=(e,t)=>`Unable to find an element with the text of: ${t}`,[W,X,Y,Z,ee]=r(i,K,N);function u(...e){let[t,a,o]=e;return l(t,c,o).map(n=>B(n,a,o)).flat(1/0)}var te=(e,t)=>`Found multiple elements with the display value of: ${t}`,oe=(e,t)=>`Unable to find an element with the display value of: ${t}`,[ne,ae,le,re,ce]=r(u,te,oe);function s(...e){let[t,a,o]=e;return l(t,c,o).map(n=>A(n,a,o)).flat(1/0)}var de=(e,t)=>`Found multiple elements with the alt text of: ${t}`,he=(e,t)=>`Unable to find an element with the alt text of: ${t}`,[me,Se,ie,ue,se]=r(s,de,he);function w(...e){let[t,a,o]=e;return l(t,c,o).map(n=>x(n,a,o)).flat(1/0)}var we=(e,t)=>`Found multiple elements with the title of: ${t}`,ye=(e,t)=>`Unable to find an element with the title of: ${t}`,[Me,Te,pe,fe,Ee]=r(w,we,ye);function y(...e){let[t,a,o]=e;return l(t,c,o).map(n=>P(n,a,o)).flat(1/0)}var Be=(e,t)=>`Found multiple elements with the test id of: ${t}`,Ae=(e,t)=>`Unable to find an element with the test id of: ${t}`,[xe,Pe,Re,Le,qe]=r(y,Be,Ae),Ve={...M,queryAllByShadowRole:(...e)=>h(document.documentElement,e[0],e[1]),queryByShadowRole:(...e)=>H(document.documentElement,e[0],e[1]),getAllByShadowRole:(...e)=>O(document.documentElement,e[0],e[1]),getByShadowRole:(...e)=>b(document.documentElement,e[0],e[1]),findAllByShadowRole:(...e)=>I(document.documentElement,e[0],e[1],e[2]),findByShadowRole:(...e)=>D(document.documentElement,e[0],e[1],e[2]),queryAllByShadowLabelText:(...e)=>m(document.documentElement,e[0],e[1]),queryByShadowLabelText:(...e)=>F(document.documentElement,e[0],e[1]),getAllByShadowLabelText:(...e)=>V(document.documentElement,e[0],e[1]),getByShadowLabelText:(...e)=>U(document.documentElement,e[0],e[1]),findAllByShadowLabelText:(...e)=>g(document.documentElement,e[0],e[1],e[2]),findByShadowLabelText:(...e)=>Q(document.documentElement,e[0],e[1],e[2]),queryAllByShadowPlaceholderText:(...e)=>S(document.documentElement,e[0],e[1]),queryByShadowPlaceholderText:(...e)=>j(document.documentElement,e[0],e[1]),getAllByShadowPlaceholderText:(...e)=>k(document.documentElement,e[0],e[1]),getByShadowPlaceholderText:(...e)=>z(document.documentElement,e[0],e[1]),findAllByShadowPlaceholderText:(...e)=>G(document.documentElement,e[0],e[1],e[2]),findByShadowPlaceholderText:(...e)=>J(document.documentElement,e[0],e[1],e[2]),queryAllByShadowText:(...e)=>i(document.documentElement,e[0],e[1]),queryByShadowText:(...e)=>W(document.documentElement,e[0],e[1]),getAllByShadowText:(...e)=>X(document.documentElement,e[0],e[1]),getByShadowText:(...e)=>Y(document.documentElement,e[0],e[1]),findAllByShadowText:(...e)=>Z(document.documentElement,e[0],e[1],e[2]),findByShadowText:(...e)=>ee(document.documentElement,e[0],e[1],e[2]),queryAllByShadowDisplayValue:(...e)=>u(document.documentElement,e[0],e[1]),queryByShadowDisplayValue:(...e)=>ne(document.documentElement,e[0],e[1]),getAllByShadowDisplayValue:(...e)=>ae(document.documentElement,e[0],e[1]),getByShadowDisplayValue:(...e)=>le(document.documentElement,e[0],e[1]),findAllByShadowDisplayValue:(...e)=>re(document.documentElement,e[0],e[1],e[2]),findByShadowDisplayValue:(...e)=>ce(document.documentElement,e[0],e[1],e[2]),queryAllByShadowAltText:(...e)=>s(document.documentElement,e[0],e[1]),queryByShadowAltText:(...e)=>me(document.documentElement,e[0],e[1]),getAllByShadowAltText:(...e)=>Se(document.documentElement,e[0],e[1]),getByShadowAltText:(...e)=>ie(document.documentElement,e[0],e[1]),findAllByShadowAltText:(...e)=>ue(document.documentElement,e[0],e[1],e[2]),findByShadowAltText:(...e)=>se(document.documentElement,e[0],e[1],e[2]),queryAllByShadowTitle:(...e)=>w(document.documentElement,e[0],e[1]),queryByShadowTitle:(...e)=>Me(document.documentElement,e[0],e[1]),getAllByShadowTitle:(...e)=>Te(document.documentElement,e[0],e[1]),getByShadowTitle:(...e)=>pe(document.documentElement,e[0],e[1]),findAllByShadowTitle:(...e)=>fe(document.documentElement,e[0],e[1],e[2]),findByShadowTitle:(...e)=>Ee(document.documentElement,e[0],e[1],e[2]),queryAllByShadowTestId:(...e)=>y(document.documentElement,e[0],e[1]),queryByShadowTestId:(...e)=>xe(document.documentElement,e[0],e[1]),getAllByShadowTestId:(...e)=>Pe(document.documentElement,e[0],e[1]),getByShadowTestId:(...e)=>Re(document.documentElement,e[0],e[1]),findAllByShadowTestId:(...e)=>Le(document.documentElement,e[0],e[1],e[2]),findByShadowTestId:(...e)=>qe(document.documentElement,e[0],e[1],e[2])};export{Fe as deepQuerySelector,l as deepQuerySelectorAll,ue as findAllByShadowAltText,re as findAllByShadowDisplayValue,g as findAllByShadowLabelText,G as findAllByShadowPlaceholderText,I as findAllByShadowRole,Le as findAllByShadowTestId,Z as findAllByShadowText,fe as findAllByShadowTitle,se as findByShadowAltText,ce as findByShadowDisplayValue,Q as findByShadowLabelText,J as findByShadowPlaceholderText,D as findByShadowRole,qe as findByShadowTestId,ee as findByShadowText,Ee as findByShadowTitle,Se as getAllByShadowAltText,ae as getAllByShadowDisplayValue,V as getAllByShadowLabelText,k as getAllByShadowPlaceholderText,O as getAllByShadowRole,Pe as getAllByShadowTestId,X as getAllByShadowText,Te as getAllByShadowTitle,ie as getByShadowAltText,le as getByShadowDisplayValue,U as getByShadowLabelText,z as getByShadowPlaceholderText,b as getByShadowRole,Re as getByShadowTestId,Y as getByShadowText,pe as getByShadowTitle,s as queryAllByShadowAltText,u as queryAllByShadowDisplayValue,m as queryAllByShadowLabelText,S as queryAllByShadowPlaceholderText,h as queryAllByShadowRole,y as queryAllByShadowTestId,i as queryAllByShadowText,w as queryAllByShadowTitle,me as queryByShadowAltText,ne as queryByShadowDisplayValue,F as queryByShadowLabelText,j as queryByShadowPlaceholderText,H as queryByShadowRole,xe as queryByShadowTestId,W as queryByShadowText,Me as queryByShadowTitle,Ve as screen}; | ||
import{buildQueries as r,screen as M,queryAllByRole as T,queryAllByLabelText as p,queryAllByPlaceholderText as f,queryAllByText as E,queryAllByDisplayValue as B,queryAllByAltText as A,queryAllByTitle as x,queryAllByTestId as P}from"@testing-library/dom";function R(){typeof ShadowRoot>"u"||typeof ShadowRoot.prototype.matches<"u"||(ShadowRoot.prototype.matches=function(e){return e.trim()==="*"?!0:this.querySelector(e)!=null},Object.defineProperties(ShadowRoot.prototype,{outerHTML:{get(){return this.innerHTML}}}))}R();function Fe(e,t,a={shallow:!1},o=[]){let n=l(e,t,a,o);return Array.isArray(n)&&n.length>0?n[0]:null}function l(e,t,a={shallow:!1},o=[]){return e instanceof Document&&(e=document.documentElement),e.shadowRoot!=null&&e.shadowRoot.mode!=="closed"&&o.push(e.shadowRoot),e instanceof ShadowRoot&&o.push(e),e.querySelectorAll(t).forEach(n=>{if(n.shadowRoot==null||n.shadowRoot.mode==="closed"){o.push(n);return}if(o.push(n.shadowRoot),a.shallow===!0){n.shadowRoot.querySelectorAll(t).forEach(d=>o.push(d));return}n.shadowRoot.querySelectorAll(t).forEach(d=>o.push(d)),l(n.shadowRoot,t,a,o)}),[...new Set(o)]}var c=":scope *";function h(...e){let[t,a,o]=e;return l(t,c,o).map(n=>T(n,a,o)).flat(1/0)}var L=(e,t)=>`Found multiple elements with the role of: ${t}`,q=(e,t)=>`Unable to find an element with the role of: ${t}`,[H,O,b,I,D]=r(h,L,q);function m(...e){let[t,a,o]=e;return l(t,":scope *").map(d=>p(d,a,o)).flat(1/0)}var _=(e,t)=>`Found multiple elements with the label text of: ${t}`,$=(e,t)=>`Unable to find an element with the label text of: ${t}`,[F,V,U,Q,g]=r(m,_,$);function S(...e){let[t,a,o]=e;return l(t,c,o).map(n=>f(n,a,o)).flat(1/0)}var C=(e,t)=>`Found multiple elements with the placeholder text of: ${t}`,v=(e,t)=>`Unable to find an element with the placeholder text of: ${t}`,[j,k,z,G,J]=r(S,C,v);function i(...e){let[t,a,o]=e;return l(t,c,o).map(n=>E(n,a,o)).flat(1/0)}var K=(e,t)=>`Found multiple elements with the text of: ${t}`,N=(e,t)=>`Unable to find an element with the text of: ${t}`,[W,X,Y,Z,ee]=r(i,K,N);function u(...e){let[t,a,o]=e;return l(t,c,o).map(n=>B(n,a,o)).flat(1/0)}var te=(e,t)=>`Found multiple elements with the display value of: ${t}`,oe=(e,t)=>`Unable to find an element with the display value of: ${t}`,[ne,ae,le,re,ce]=r(u,te,oe);function s(...e){let[t,a,o]=e;return l(t,c,o).map(n=>A(n,a,o)).flat(1/0)}var de=(e,t)=>`Found multiple elements with the alt text of: ${t}`,he=(e,t)=>`Unable to find an element with the alt text of: ${t}`,[me,Se,ie,ue,se]=r(s,de,he);function w(...e){let[t,a,o]=e;return l(t,c,o).map(n=>x(n,a,o)).flat(1/0)}var we=(e,t)=>`Found multiple elements with the title of: ${t}`,ye=(e,t)=>`Unable to find an element with the title of: ${t}`,[Me,Te,pe,fe,Ee]=r(w,we,ye);function y(...e){let[t,a,o]=e;return l(t,c,o).map(n=>P(n,a,o)).flat(1/0)}var Be=(e,t)=>`Found multiple elements with the test id of: ${t}`,Ae=(e,t)=>`Unable to find an element with the test id of: ${t}`,[xe,Pe,Re,Le,qe]=r(y,Be,Ae),Ve={...M,queryAllByShadowRole:(...e)=>h(document.documentElement,e[0],e[1]),queryByShadowRole:(...e)=>H(document.documentElement,e[0],e[1]),getAllByShadowRole:(...e)=>O(document.documentElement,e[0],e[1]),getByShadowRole:(...e)=>b(document.documentElement,e[0],e[1]),findAllByShadowRole:(...e)=>I(document.documentElement,e[0],e[1],e[2]),findByShadowRole:(...e)=>D(document.documentElement,e[0],e[1],e[2]),queryAllByShadowLabelText:(...e)=>m(document.documentElement,e[0],e[1]),queryByShadowLabelText:(...e)=>F(document.documentElement,e[0],e[1]),getAllByShadowLabelText:(...e)=>V(document.documentElement,e[0],e[1]),getByShadowLabelText:(...e)=>U(document.documentElement,e[0],e[1]),findAllByShadowLabelText:(...e)=>Q(document.documentElement,e[0],e[1],e[2]),findByShadowLabelText:(...e)=>g(document.documentElement,e[0],e[1],e[2]),queryAllByShadowPlaceholderText:(...e)=>S(document.documentElement,e[0],e[1]),queryByShadowPlaceholderText:(...e)=>j(document.documentElement,e[0],e[1]),getAllByShadowPlaceholderText:(...e)=>k(document.documentElement,e[0],e[1]),getByShadowPlaceholderText:(...e)=>z(document.documentElement,e[0],e[1]),findAllByShadowPlaceholderText:(...e)=>G(document.documentElement,e[0],e[1],e[2]),findByShadowPlaceholderText:(...e)=>J(document.documentElement,e[0],e[1],e[2]),queryAllByShadowText:(...e)=>i(document.documentElement,e[0],e[1]),queryByShadowText:(...e)=>W(document.documentElement,e[0],e[1]),getAllByShadowText:(...e)=>X(document.documentElement,e[0],e[1]),getByShadowText:(...e)=>Y(document.documentElement,e[0],e[1]),findAllByShadowText:(...e)=>Z(document.documentElement,e[0],e[1],e[2]),findByShadowText:(...e)=>ee(document.documentElement,e[0],e[1],e[2]),queryAllByShadowDisplayValue:(...e)=>u(document.documentElement,e[0],e[1]),queryByShadowDisplayValue:(...e)=>ne(document.documentElement,e[0],e[1]),getAllByShadowDisplayValue:(...e)=>ae(document.documentElement,e[0],e[1]),getByShadowDisplayValue:(...e)=>le(document.documentElement,e[0],e[1]),findAllByShadowDisplayValue:(...e)=>re(document.documentElement,e[0],e[1],e[2]),findByShadowDisplayValue:(...e)=>ce(document.documentElement,e[0],e[1],e[2]),queryAllByShadowAltText:(...e)=>s(document.documentElement,e[0],e[1]),queryByShadowAltText:(...e)=>me(document.documentElement,e[0],e[1]),getAllByShadowAltText:(...e)=>Se(document.documentElement,e[0],e[1]),getByShadowAltText:(...e)=>ie(document.documentElement,e[0],e[1]),findAllByShadowAltText:(...e)=>ue(document.documentElement,e[0],e[1],e[2]),findByShadowAltText:(...e)=>se(document.documentElement,e[0],e[1],e[2]),queryAllByShadowTitle:(...e)=>w(document.documentElement,e[0],e[1]),queryByShadowTitle:(...e)=>Me(document.documentElement,e[0],e[1]),getAllByShadowTitle:(...e)=>Te(document.documentElement,e[0],e[1]),getByShadowTitle:(...e)=>pe(document.documentElement,e[0],e[1]),findAllByShadowTitle:(...e)=>fe(document.documentElement,e[0],e[1],e[2]),findByShadowTitle:(...e)=>Ee(document.documentElement,e[0],e[1],e[2]),queryAllByShadowTestId:(...e)=>y(document.documentElement,e[0],e[1]),queryByShadowTestId:(...e)=>xe(document.documentElement,e[0],e[1]),getAllByShadowTestId:(...e)=>Pe(document.documentElement,e[0],e[1]),getByShadowTestId:(...e)=>Re(document.documentElement,e[0],e[1]),findAllByShadowTestId:(...e)=>Le(document.documentElement,e[0],e[1],e[2]),findByShadowTestId:(...e)=>qe(document.documentElement,e[0],e[1],e[2])};export{Fe as deepQuerySelector,l as deepQuerySelectorAll,ue as findAllByShadowAltText,re as findAllByShadowDisplayValue,Q as findAllByShadowLabelText,G as findAllByShadowPlaceholderText,I as findAllByShadowRole,Le as findAllByShadowTestId,Z as findAllByShadowText,fe as findAllByShadowTitle,se as findByShadowAltText,ce as findByShadowDisplayValue,g as findByShadowLabelText,J as findByShadowPlaceholderText,D as findByShadowRole,qe as findByShadowTestId,ee as findByShadowText,Ee as findByShadowTitle,Se as getAllByShadowAltText,ae as getAllByShadowDisplayValue,V as getAllByShadowLabelText,k as getAllByShadowPlaceholderText,O as getAllByShadowRole,Pe as getAllByShadowTestId,X as getAllByShadowText,Te as getAllByShadowTitle,ie as getByShadowAltText,le as getByShadowDisplayValue,U as getByShadowLabelText,z as getByShadowPlaceholderText,b as getByShadowRole,Re as getByShadowTestId,Y as getByShadowText,pe as getByShadowTitle,s as queryAllByShadowAltText,u as queryAllByShadowDisplayValue,m as queryAllByShadowLabelText,S as queryAllByShadowPlaceholderText,h as queryAllByShadowRole,y as queryAllByShadowTestId,i as queryAllByShadowText,w as queryAllByShadowTitle,me as queryByShadowAltText,ne as queryByShadowDisplayValue,F as queryByShadowLabelText,j as queryByShadowPlaceholderText,H as queryByShadowRole,xe as queryByShadowTestId,W as queryByShadowText,Me as queryByShadowTitle,Ve as screen}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,1 +0,1 @@ | ||
{"inputs":{"src/index.ts":{"bytes":20052,"imports":[]}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":27104},"dist/index.js":{"imports":[],"exports":["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","getByShadowAltText","getByShadowDisplayValue","getByShadowLabelText","getByShadowPlaceholderText","getByShadowRole","getByShadowTestId","getByShadowText","getByShadowTitle","queryAllByShadowAltText","queryAllByShadowDisplayValue","queryAllByShadowLabelText","queryAllByShadowPlaceholderText","queryAllByShadowRole","queryAllByShadowTestId","queryAllByShadowText","queryAllByShadowTitle","queryByShadowAltText","queryByShadowDisplayValue","queryByShadowLabelText","queryByShadowPlaceholderText","queryByShadowRole","queryByShadowTestId","queryByShadowText","queryByShadowTitle","screen"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":6384}},"bytes":7785}}} | ||
{"inputs":{"src/index.ts":{"bytes":20030,"imports":[]}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":27061},"dist/index.js":{"imports":[],"exports":["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","getByShadowAltText","getByShadowDisplayValue","getByShadowLabelText","getByShadowPlaceholderText","getByShadowRole","getByShadowTestId","getByShadowText","getByShadowTitle","queryAllByShadowAltText","queryAllByShadowDisplayValue","queryAllByShadowLabelText","queryAllByShadowPlaceholderText","queryAllByShadowRole","queryAllByShadowTestId","queryAllByShadowText","queryAllByShadowTitle","queryByShadowAltText","queryByShadowDisplayValue","queryByShadowLabelText","queryByShadowPlaceholderText","queryByShadowRole","queryByShadowTestId","queryByShadowText","queryByShadowTitle","screen"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":6369}},"bytes":7770}}} |
{ | ||
"name": "shadow-dom-testing-library", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "An extension of DOM-testing-library to provide hooks into the shadow dom", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -86,3 +86,2 @@ import {waitForOptions, buildQueries, screen, ByRoleMatcher, ByRoleOptions, queryAllByRole, SelectorMatcherOptions, queryAllByLabelText, Matcher, queryAllByPlaceholderText, MatcherOptions, queryAllByText, queryAllByDisplayValue, queryAllByAltText, queryAllByTitle, queryAllByTestId} from '@testing-library/dom' | ||
elements.push(el) | ||
console.log(el) | ||
return | ||
@@ -89,0 +88,0 @@ } |
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
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
89956
560