Not possible to set specific timeout on custom commands
See original GitHub issueThis issue is related to Cypress API for custom commands. Hopefully it’s just undocumented or I didn’t find it in the docs.
I define a custom command, which might be a long operation. I wish to control the default timeout for my custom command. My command looks like this:
Cypress.Commands.add('myCommand', () => {
return cy.document().then(doc => {
<long operation>
});
});
I’d like the <long operation>
to have its own timeout. Is that possible? Or achievable in some way?
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Cypress: custom timeout in specific should command
tl;dr. Just pass the timeout to get , it will pass it down to should . cy.get('body', {timeout: 30000}).should('contain','success') ...
Read more >Custom Commands - Cypress Documentation
Custom commands are a great way to abstract away setup (specific to your app). When doing those kinds of tasks, skip as much...
Read more >How to increase time out for one specific command
I am implementing an operational command and I want to increase the time out for this specific command as it takes longer time...
Read more >Setting Command Timeouts in Bash | Baeldung on Linux
The timeout command is part of an external package. This means that it might not be available on every system. 4.2. Custom Timeouts....
Read more >Understanding command statuses - AWS Systems Manager
Configure Amazon Simple Notification Service (Amazon SNS) to send notifications for all status changes or specific statuses such as Failed or TimedOut. Run ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s just a workaround so you can sepcify the default timeout time in the command and not in the test.