Skip to content
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

Need to set Timeout at testcase level (it block or .cy file level) #31018

Open
varikaurtest opened this issue Feb 4, 2025 · 5 comments
Open
Labels
type: feature New feature that does not currently exist

Comments

@varikaurtest
Copy link

I am trying to use the suggestion as given in #9009 (comment)

but getting below error, is cypress capable of stopping test case execution after a certain timeinterval?

Image

Originally posted by @varikaurtest in #9009

@varikaurtest varikaurtest changed the title Timeout at testcase level (it block or .cy file level) Need to set Timeout at testcase level (it block or .cy file level) Feb 4, 2025
@jennifer-shehane jennifer-shehane added the type: feature New feature that does not currently exist label Feb 5, 2025
@alexsch01
Copy link
Contributor

Image

Playwright implemented this recently (https://github.com/microsoft/playwright/releases/tag/v1.50.0)

@varikaurtest
Copy link
Author

varikaurtest commented Feb 6, 2025

Hi @alexsch01 Thanks for the information on playwright, but my framework is implemented in Cypress, so looking to enhance that.

@alexsch01
Copy link
Contributor

@varikaurtest yes, I didn't mean for it to sound like I was telling you to switch to Playwright. I meant that since Playwright (a competitor to Cypress) implemented this feature, it could be a good idea for Cypress

@mschile
Copy link
Contributor

mschile commented Feb 6, 2025

@varikaurtest, just pointing out that testTimeout is defined here in the example you are using. Maybe you forgot to include it in your project.

@varikaurtest
Copy link
Author

varikaurtest commented Feb 7, 2025

Thanks @mschile , got the solution in the same project.

Although i am unblocked now, still wondering if there is a way we can set it in config to get it applied to all test cases at once?

I have hundreds of test cases (each .cy file has only 1 test case i.e. IT block), so would require to apply timeout on all of these at once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature that does not currently exist
Projects
None yet
Development

No branches or pull requests

4 participants