Open
Description
Feature Description
We use web components in our angular components. We can override the browser's querySelectorAll
in the testbed test environment to pierce through shadow roots. We would like to also be able to override the innerText
/textContent
functionality (for TestElement#text
) of the browser as the builtin innerText
and textContent
properties skips over shadow content:
<angular-component>
Hello,
<web-component>
<template shadowrootmode="open">World!</template>
</web-component>
</angular-component>
--> document.querySelector('angular-component').innerText === 'Hello, '
Use Case
Improve unit testing using component harnesses when web components using shadow DOM are used.