feat(cdk/testing): add option to customise TestElement#text #29324
Labels
area: cdk/testing
feature
This issue represents a new feature or feature request rather than a bug or bug fix
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
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 theinnerText
/textContent
functionality (forTestElement#text
) of the browser as the builtininnerText
andtextContent
properties skips over shadow content:-->
document.querySelector('angular-component').innerText === 'Hello, '
Use Case
Improve unit testing using component harnesses when web components using shadow DOM are used.
The text was updated successfully, but these errors were encountered: