cypress icon indicating copy to clipboard operation
cypress copied to clipboard

SvelteKit CT support

Open ZachJW34 opened this issue 3 years ago • 8 comments

What would you like?

SvelteKit support for Cypress Component Testing!

Why is this needed?

We are adding Svelte support for Vite and Webpack based applications, but won't have SvelteKit support in our initial launch. SvelteKit is a framework built on top of Svelte, mirroring frameworks like Next and Nuxt where it brings SSR, SSG, and other goodies that are very popular in todays frontend landscape.

SvelteKit is getting a lot of hype and will be a good framework to add to our CT testing repertoire.

Other

SvelteKit is currently in Beta, but would be good to get some initial findings and possible implementations condensed into a tech-brief.

ZachJW34 avatar Aug 30 '22 15:08 ZachJW34

Sveltekit reached 1.0 and still there isn't any support for it. Does anyone know when we can get support for sveltekit ct? I'm currently stuck with e2e tests that I cant update anymore because my app requires backend connection.

ksawery29 avatar Dec 25 '22 19:12 ksawery29

Related: https://github.com/cypress-io/cypress/issues/23621 (research SvelteKit) Also related, user wants to use SvelteKit: https://github.com/cypress-io/cypress/issues/26064

I will take a look and see how much complexity is here. If SvelteKit exposes their Vite config, we can likely just grab it, make some mods, and off we go. If not, this will be substantially more complex.

lmiller1990 avatar Mar 19 '23 23:03 lmiller1990

Any update on this issue?

gparonitti avatar May 15 '23 14:05 gparonitti

Right now it works with Svelte + Vite - are you looking for some SvelteKit specific behavior you cannot accomplish just using the cypress/svelte mount function?

lmiller1990 avatar Jun 05 '23 04:06 lmiller1990

Some renewed interested here: https://github.com/cypress-io/cypress/issues/26064#issuecomment-1630979470

We work with Svelte - but seamlessly working with SvelteKit out of the box would be ideal.

lmiller1990 avatar Jul 12 '23 00:07 lmiller1990

Will love to have SvelteKit support out-of-the-box, just like Svelte.

veselints avatar Aug 15 '23 12:08 veselints

Same here! My company uses SvelteKit and we can only relay on component testings because our content is created by users, so the layout of the UI page changes a lot.

felipelimalima avatar Sep 11 '23 14:09 felipelimalima

+1, would love to see this! E2E tests don't work in a lot of cases in my SK apps since initial fetches run in SSR & aren't stub-able.

kiosion avatar Nov 29 '23 15:11 kiosion

+1 Would be great to have this out of the box, but the solution in https://github.com/cypress-io/cypress/issues/26064 is working for me

benjaminknox avatar Jul 05 '24 13:07 benjaminknox