Replies: 11 comments 6 replies
-
I stuck at the same point and can not use cypress with nuxt3. Any help whould be nice! |
Beta Was this translation helpful? Give feedback.
-
Would love to try that out with nuxt 3 app. |
Beta Was this translation helpful? Give feedback.
-
man, I just followed the documentation and applied it to my nuxt 3 project (https://docs.cypress.io/guides/end-to-end-testing/) and managed to run almost all features! I recommend |
Beta Was this translation helpful? Give feedback.
-
Also missing setup for Nuxt 3. I think if you can point cypress to the |
Beta Was this translation helpful? Give feedback.
-
I've found out that cypress 10 have breaking change in case of loading plugins: And also that this build works for 2 types of configs: In my opinion cypress needs to add |
Beta Was this translation helpful? Give feedback.
-
I got it working by setting the It's more of an adhesive tape fix, but it worked for mounting a component. Haven't checked other tests, yet. |
Beta Was this translation helpful? Give feedback.
-
I wrote a quick blog post on how to set up Cypress with Nuxt 3. Here's the repo for reference. I didn't experience anything out of the ordinary. Are you trying to set up E2E testing or Component testing? |
Beta Was this translation helpful? Give feedback.
-
I am also interested in a Cypress configuration that will work for Component Testing in a Nuxt 3 project. According to Cypress Component Testing documentation, only Nuxt 2 is supported and marked The Nuxt specific Component Testing section in the Cypress docs says that Nuxt 3 is not yet supported. I subscribed to this issue hoping someone was going to post the magic Cypress configuration that would allow Component Testing to work with Nuxt 3. My guess is it's some combination of telling Cypress it's a Vue 3 project and then somehow dumping the Vite configuration from Nuxt. I started down that path, but other work got in the way! 😄 |
Beta Was this translation helpful? Give feedback.
-
Update: In hindsight my example doesn't load Nuxt at all, so any auto-imports you rely on won't work. I recommend looking at this example: nuxt/nuxt#19304. I've got a workaround by adding a import vue from '@vitejs/plugin-vue'
// Workaround to get Cypress Component Testing working with Nuxt 3
export default {
plugins: [
vue({
template: {
compilerOptions: {
isCustomElement: (tag) => tag.includes('-'),
},
},
}),
],
} And then importing it in the import { defineConfig } from 'cypress'
import viteConfig from '~/vite.config.cypress.component.js'
export default defineConfig({
component: {
devServer: {
framework: 'vue',
bundler: 'vite',
viteConfig,
},
},
}) I haven't run into issues with this just yet (but this is with a CSR only project). |
Beta Was this translation helpful? Give feedback.
-
Someone posted a working guide here as well for using component testing: nuxt/nuxt#19304 |
Beta Was this translation helpful? Give feedback.
-
Honestly Vue 3 and also Nuxt 3 are out there for quite a while now. But Cypress still only only supports Vue 2 / nuxt 2. When can we expect the update in support here? |
Beta Was this translation helpful? Give feedback.
-
Hi
I'm looking for a guide to setup Cypress with Nuxt 3. Following the current guide I get stuck at passing vite.config.js since its not available in Nuxt 3 (i assume):
Beta Was this translation helpful? Give feedback.
All reactions