cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.66k stars 3.16k forks source link

SvelteKit CT support #23618

Open ZachJW34 opened 2 years ago

ZachJW34 commented 2 years ago

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.

ksawery29 commented 1 year ago

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.

lmiller1990 commented 1 year ago

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.

gparonitti commented 1 year ago

Any update on this issue?

lmiller1990 commented 1 year ago

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 commented 1 year ago

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.

veselints commented 1 year ago

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

felipelimalima commented 12 months ago

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.

kiosion commented 9 months ago

+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.

benjaminknox commented 2 months ago

+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