webdriverio / query-selector-shadow-dom

querySelector that can pierce Shadow DOM roots without knowing the path through nested shadow roots. Useful for automated testing of Web Components. Production use is not advised, this is for test environments/tools such as Web Driver, Playwright, Puppeteer
MIT License
239 stars 25 forks source link

Cache collected elements and support ">" in selectors #40

Closed mariusandra closed 3 years ago

mariusandra commented 3 years ago

This PR adds two features that I needed:

I have added tests for both features.

codecov[bot] commented 3 years ago

Codecov Report

Merging #40 into master will decrease coverage by 2.70%. The diff coverage is 92.59%.

Impacted file tree graph

@@             Coverage Diff             @@
##            master      #40      +/-   ##
===========================================
- Coverage   100.00%   97.29%   -2.71%     
===========================================
  Files            1        1              
  Lines           61       74      +13     
===========================================
+ Hits            61       72      +11     
- Misses           0        2       +2     
Impacted Files Coverage Δ
src/querySelectorDeep.js 97.29% <92.59%> (-2.71%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2983aee...83b202f. Read the comment docs.

Georgegriff commented 3 years ago

Thanks for the pr much appreciated I'll try to find some time to understand and review soon. Please could you look at why test coverage has lowered

Georgegriff commented 3 years ago

The coverage was at 100% I may have lowered it by mistake I'll look at that soon but that's what would be ideal

Georgegriff commented 3 years ago

Released in 0.8.0, thank you!