Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Support Lit elements in component testing #24248

Closed
simonireilly opened this issue Oct 13, 2022 · 3 comments
Closed

feature: Support Lit elements in component testing #24248

simonireilly opened this issue Oct 13, 2022 · 3 comments
Labels
CT Issue related to component testing type: feature New feature that does not currently exist

Comments

@simonireilly
Copy link

What would you like?

I'd like to be able to run component tests against my lit elements in Cypress.

I've demonstrated the solution here https://dev.to/simonireilly/cypress-component-tests-for-lit-elements-web-components-45oj and would submit a pull request coping the patterns of the svelta plugin.

Why is this needed?

Testing web components in real browsers is more advantageous than any other environment.

Because cypress offers

  • chromium
  • WebKit
  • electron
  • quantum

Based browser's, it's a great choice for testing web components.

Other

No response

@simonireilly simonireilly changed the title Support Lit elements in component testing feature: Support Lit elements in component testing Oct 13, 2022
@simonireilly
Copy link
Author

This feature isn't currently going to enter cypress.

If your looking to use cypress for lit, or any other web components, try this:

https://www.npmjs.com/package/cypress-lit
https://github.com/simonireilly/cypress-lit

@lmiller1990
Copy link
Contributor

We have a public API for this feature now.

If there is interest from @simonireilly, we can collab to create cypress-ct-lit which would do what is proposed here - first class integration w/ Cypress CT (including onboarding and scaffolding the supportFile with mount, etc).

@Darrenbydesign
Copy link

I am interested in Cypress with support for Lit! I came across Simon's approach and I'd really like it added as a collaboration so that I can use it in my org.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CT Issue related to component testing type: feature New feature that does not currently exist
Projects
None yet
Development

No branches or pull requests

3 participants