Show warning messages in command log
See original GitHub issueIt would be useful to allow commands to print a warning instead of an error in the command log.
This would allow commands to alert the user something they have done may lead to unexpected behavior, such as pressing the {home}
key while we cannot preform the default action of scrolling. Or calling a cy.wait
after a cy.visit
.
We could have:
- If there’s a soft error during a command, allow a config value to turn it into a warning.
- If there’s a warning during a command, add an icon to the command and allow it to be clicked and expanded
- Ability to add a new command log message / event for warnings/errors not linked directly to a command
Issue Analytics
- State:
- Created 4 years ago
- Reactions:13
- Comments:14 (9 by maintainers)
Top Results From Across the Web
SHOW WARNINGS - MariaDB Knowledge Base
The SHOW COUNT(*) WARNINGS statement displays the total number of errors, warnings, and notes. You can also retrieve this number from the warning_count...
Read more >Logging, Warnings, and Error Messages · GitBook
Logging allows us to use "rules" to say what information should be shown. ... setLevel("WARN") shows messages from logger.warn and logger.error`; logger.
Read more >Logging a warning message (Command Stage) - Forums - IBM
I tried using a Command stage to call DSLogWarn but this gives the error: Command failed to execute - Verb "LOGWARNINGMSG("RECONCILIATION" is not...
Read more >13.7.7.42 SHOW WARNINGS Statement
In the mysql client, you can enable and disable automatic warnings display using the warnings and nowarning commands, respectively, or their shortcuts, \W...
Read more >A Utility Program for Quickly Identifying LOG Error or Warning ...
ABSTRACT. This paper will show you how to create and install a utility program that will allow Windows users to find SAS® error...
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
I also see the need for
cy.warn
. We maintain an extended cypress custom command library which is used by various applications. No one will ever notice eg. deprecation notes in the console log. In contrast, having (orange) warnings in the command log will be noticed for sure (as long as the functionality is not abused).Maybe useful as well (or instead of
cy.warn
). Allow passing a custom color tocy.log
- so there can be visual distinction between different use cases (eg. deprecation vs. anti-pattern vs. … ).This would be fantastic for the new access accessibility tests I want to bring in. Having tests fail at the moment would be a nightmare as there is a long list of legacy issues. But warnings would put us on the right track to fix them!