Closed ttalbot closed 2 years ago
Playwright has been identified as a great candidate for testing web components, especially on his ability to pierce shadow DOM via simplified selectors: https://playwright.dev/docs/selectors/#selecting-elements-in-shadow-dom
Various inspirations:
This story will be left using only a global web-test-runner
for all web-components, since all of them are at the moment written in LitElement.
Once we have some contributions with other frameworks, we'll make a separate test process that launches tests from the inner package of a given web component. Resulting lcov.info will be added to codecov in the files
attribute of the wc-pr-build.yml
This could be used as an starting point: https://github.com/code2nguyen/finastra-web-components/blob/testing-workflow/scripts/test.js
The goal of this issue is to define unit testing strategy for web components. All the following should be done for it to be considered complete:
button
card
divider
(?)logo
(?)search-input