-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
After the update to version 13, the component tests do not work. #27975
Comments
@cosimogaloi Could you be more specific about the last working version of Cypress? We had a webpack update towards the end of 12.x versions, and I wonder if that’s impacting this. We haven’t had much in 13 that would affect this to my knowledge. |
This is how it works
|
@cosimogaloi Are you saying that Cypress 12.17.4 works? But 13.0.0 is broken? |
Exactly the same test, I'm just updating the Cypress to version 13. I also did a npm cache clean and a cypress cache clean. I can't explain it. |
Also getting this with Cypress 13, but also with some later versions of 12. Mac OS and Node18 too. I will try 12.17.4 to see if that lines up with @cosimogaloi |
After checking, I still don't get my spec files found.
Using the following config:
I am wondering if there are things in my webpack or tsconfig that I need to be cautious of? Does webpack need to know about the .cy files, and cypress reads them from the web server rather than the file system? |
I found the problem with the route for the test So if I remove the "+" in the route, all the tests work @jennifer-shehane I understand that this is a bug or did I configure something wrong? |
@cosimogaloi Sounds like we're getting closer, I have a few questions to clarify:
Thanks. |
I can't promote the code, unfortunately, but I can provide you with the path. src/app/+auth/login/auth-login-form/auth-login-form.cy.ts In version 12.17.4, it works, and after installing any version of 13.x, it no longer works. |
I also experienced the same problem. updating node version fixed it. @cosimogaloi , what node version (node -v) are you using? It should be 18 or greater. |
My version is 18.11 but thanks for the input. |
Same issue here! I'm using React + Webpack and Node 18.12.1. I'm also using @badeball/cypress-cucumber-preprocessor and my import { defineConfig } from 'cypress'
import type * as Webpack from 'webpack'
import { devServer } from '@cypress/webpack-dev-server'
import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor'
const webpackConfig = (
cypressConfig: Cypress.PluginConfigOptions
): Webpack.Configuration => {
return {
resolve: {
extensions: ['.tsx', '.jsx', '.ts', '.js']
},
module: {
rules: [
{
test: /\.tsx?$/,
exclude: [/node_modules/],
use: [
{
loader: 'ts-loader',
options: { transpileOnly: true }
}
]
},
{
test: /\.ts$/,
exclude: [/node_modules/],
use: [
{
loader: 'babel-loader'
}
]
},
{
test: /\.feature$/,
use: [
{
loader: '@badeball/cypress-cucumber-preprocessor/webpack',
options: cypressConfig
}
]
}
]
}
}
}
export default defineConfig({
component: {
specPattern: './cypress/integration/**/*.feature',
devServer(devServerConfig) {
return devServer({
...devServerConfig,
framework: 'react',
webpackConfig: webpackConfig(devServerConfig.cypressConfig)
})
},
async setupNodeEvents(on, config) {
await addCucumberPreprocessorPlugin(on, config)
return config
},
env: {
codeCoverage: {
exclude: ['cypress/**/*.*']
},
TAGS: '@focus'
}
}
}) My tests are in my @jennifer-shehane any thoughts? 🥲 |
I'm facing the same problem with Cypress v13.6.0, NX v16.9.1, Node v18 and rspack core v0.3.14 Here is my cypress config:
rspack server configuration:
When I run the tests with webpack v5.88.2 everything works fine. |
@rexizam I had similar config with you, Cypress 13.0.0, Nx 16.0.3, Rspack 0.3.14 and cypress-rspack-dev-server 0.0.3. Everything works on Cypress 12.17.4, but got this |
@cosimogaloi can you create an example repo? I'd love to take a look at this |
I found the reason of this |
Can you publish the updated version of cypress-rspack-dev-server on npm please ? 🙂 |
Yes, done |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
This issue has been closed due to inactivity. |
Current behavior
After updating to version 13 of Cypress, some tests are giving me the following error.
No tests found.
Cypress could not detect tests in this file.
They worked in Version 12
Desired behavior
No response
Test code to reproduce
Cypress Version
13.2.0
Node version
18.11.0
Operating System
Mac OS
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: