-
Notifications
You must be signed in to change notification settings - Fork 12
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
Spec files not being copied to cache #70
Comments
Definitely not stale ^^ |
@marina-mosti |
@marina-mosti This is due to |
Hey @mammadataei @nichita-pasecinic thanks for the suggestions, sadly it doesn't seem that the rollup option here is the issue,since the files that arent been found are the actual tests - not the app code itself. Regardless, I tried modifying my cypress config to not use any custom vite configuration and I keep getting the exact same error. const { defineConfig } = require('cypress')
const vitePreprocessor = require('cypress-vite')
module.exports = defineConfig({
chromeWebSecurity: false,
retries: 1,
defaultCommandTimeout: 8000,
responseTimeout: 40000,
requestTimeout: 10000,
projectId: 'XXX'
fixturesFolder: 'tests/e2e/fixtures',
screenshotsFolder: 'tests/e2e/screenshots',
videosFolder: 'tests/e2e/videos',
includeShadowDom: true,
e2e: {
setupNodeEvents (on) {
on('file:preprocessor', vitePreprocessor())
},
baseUrl: 'https://localhost:3009',
specPattern: 'tests/e2e/specs/**/*.{js,jsx,ts,tsx}',
supportFile: 'tests/e2e/support/index.js'
}
}) |
As for debug mode, I don't see anything that helps me understand the problem:
|
@marina-mosti this worked for me vitePreprocessor({
configFile: false, // <- do not use vite app config
mode: 'development',
// overwrite vite specific configurations that are used in cypress tests
resolve: {
alias: {
'@': resolve(__dirname, './src'),
},
},
}), |
Amazing thanks @nichita-pasecinic that seemed to get it working 👍🏻 |
@marina-mosti I'd still keep the issue open as |
Hi @mammadataei will this be fixed ? |
@nichita-pasecinic If you know the cause or solution, I would gladly fix it. |
@mammadataei The only details I know: the build of the cypress tests has different structure because of custom vite build configuration If vite config file has: (this creates rollupOptions: {
output: {
assetFileNames: `assets/[name]-[hash]-${Date.now()}[extname]`,
entryFileNames: `assets/[name]-[hash]-${Date.now()}.js`,
},
} The The content of build path is has the structure defined in application |
This definitely should not be closed |
Thanks @nichita-pasecinic |
@mammadataei please reopen (for sake of QAs that are waiting for it - not me though 😄 ) |
Hello @mammadataei , thanks for your work on this amazing lib!
I'm having an issue with the dreaded
ENOENT
problem. I've read through all the related issues but even though it seems to be somehow related to #33 and #5 it seems different enough that I think it warrants a new issue. Hope I'm wrong and its an easy fix.I am getting the following errors:
After deleting cypress cache and doing a clean install, I noticed that the spec files are no longer being copied to the cypress cache where cypress is assuming it will find them for a run.
cypress.config.js
vite.config.js
Any help is dearly appreciated
The text was updated successfully, but these errors were encountered: