-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Cypress ignores specs #2564
Comments
If you open the browser DevTools, are there any errors in the console? |
Before// https://docs.cypress.io/guides/guides/plugins-guide.html
const webpack = require('@cypress/webpack-preprocessor')
module.exports = (on, config) => {
on('file:preprocessor', webpack({
webpackOptions: require('@vue/cli-service/webpack.config'),
watchOptions: {}
}))
return Object.assign({}, config, {
fixturesFolder: 'tests/e2e/fixtures',
integrationFolder: 'tests/e2e/specs',
screenshotsFolder: 'tests/e2e/screenshots',
videosFolder: 'tests/e2e/videos',
supportFile: 'tests/e2e/support/index.js'
})
} Removing this line: After// https://docs.cypress.io/guides/guides/plugins-guide.html
const webpack = require('@cypress/webpack-preprocessor')
module.exports = (on, config) => {
on('file:preprocessor', webpack({
watchOptions: {}
}))
return Object.assign({}, config, {
fixturesFolder: 'tests/e2e/fixtures',
integrationFolder: 'tests/e2e/specs',
screenshotsFolder: 'tests/e2e/screenshots',
videosFolder: 'tests/e2e/videos',
supportFile: 'tests/e2e/support/index.js'
})
} So this appears to be more a misconfiguration of @vue/cli |
@chrisbreiding Console logs look clean. |
same here, but I can't remove the webpack config line you mentioned because I'll have other errors like missing aliases |
@oswaldofreitas Are you referring to the Yea, that's the only downer about the workaround, you lose all the vue-cli webpack goodness. Have you had any luck in troubleshooting this? |
in a new project created by |
I am also encountering this. Removing the |
Ok, I can reproduce it now :) If I add a optimization section to my webpack config like this one: optimization: {
splitChunks: {
cacheGroups: {
vendor: {
name: 'vendor',
chunks: 'initial',
test: path.resolve(__dirname, 'node_modules'),
enforce: true,
},
},
},
} it shows me the "No tests found in your file", however if I remove that config everything works fine! |
Contributor of vue-cli here (the project that the reproduction is built on). We recently found that doing any sort of code splitting with webpack 4 We did a quick fix in our own webpack config: But when users lik OP overwrites this config, it breaks again. So I think we should investigate how codesplit chunks break the preprocessor. |
I'm having the same/comparable issue. Still working on it. See #2608 |
Thanks to @LinusBorg comment. I just have to disable code splitting for now in my webpack config. |
Closing as resolved. If you're experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix. |
Current behavior:
Cypress seems to recognize the spec files...
However, it can't seem to find the test cases within.
But there are totally tests.
Here is the corresponding stack
Desired behavior:
I would hope the test would run, cypress would run my test-cases.
Steps to reproduce:
npm install
3.
npm run test:e2e
Versions
Cypress 3.1.0, MacOS 10.13.6, Chrome 69
The text was updated successfully, but these errors were encountered: