cypress icon indicating copy to clipboard operation
cypress copied to clipboard

Svelte Component Testing Support

Open rockindahizzy opened this issue 1 year ago • 9 comments

What would you like?

Add support for Svelte in Component Testing

Things to consider

  1. Common setups around svelte. The Getting Started guide uses Vite
  2. Documentation Updates
  3. Tests

Why is this needed?

No response

Other

No response

rockindahizzy avatar Aug 01 '22 11:08 rockindahizzy

Hey team! Please add your planning poker estimate with ZenHub @astone123 @lmiller1990 @marktnoonan @mike-plummer @rockindahizzy @warrensplayer @ZachJW34

baus avatar Aug 02 '22 11:08 baus

We have an open source contribution for the mount side of things. Depending on when we want to get this out, we can create another issue for SvelteKit and focus the svelte + vite/webpack support

ZachJW34 avatar Aug 02 '22 14:08 ZachJW34

Assume this does not include SvelteKit support

baus avatar Aug 02 '22 20:08 baus

Please, please, please - can we have official support for Svelte? I've been trying to get Svelte Vite Cypress combination to work for days now and at the end of my tether with not much luck. Been trying to follow this article, but the thing just doesn't want to work https://www.thisdot.co/blog/svelte-component-testing-with-cypress-vite

slavco86 avatar Aug 03 '22 11:08 slavco86

@slavco86 we sure can, it's getting worked on https://github.com/cypress-io/cypress/pull/22862.

Are you using SvelteKit? I think Svelte + webpack combo will likely land before the full SvelteKit/Vite integration does.

lmiller1990 avatar Aug 03 '22 22:08 lmiller1990

No, just vanilla Svelte +Vite. I think I finally got it to work 😂

slavco86 avatar Aug 03 '22 22:08 slavco86

Cool, maybe you can share your config for everyone else to see :100:

lmiller1990 avatar Aug 03 '22 22:08 lmiller1990

The problem is that my config is tightly locked into Node 14 and Cypress 8.5 Updating any of these - inevitably breaks the setup. Which specific config you want me to share?

slavco86 avatar Aug 04 '22 09:08 slavco86

Right, I didn't realise you were on 8.5.

Definitely recommend upgrading first! When we release our Svelte support, it'll be with Cypress 10 (latest version) in mind.

lmiller1990 avatar Aug 04 '22 22:08 lmiller1990

We will consider this implementation to be experimental

baus avatar Aug 16 '22 20:08 baus

Released in 10.7.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v10.7.0, please open a new issue.

cypress-bot[bot] avatar Aug 30 '22 18:08 cypress-bot[bot]