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
Do not truncate Command Log message in default commands #6145
Comments
We would likely just extend the same stylings for other commands as Making this configurable is problematic because setting the truncation too large will cause the browser to lock up in some circumstances currently. Can you explain the use case for needing this configurable as opposed to always showing up to 50 lines? |
Please have a look at the screenshot above. You see that the locator is not fully visible. For us this is problematic because we have a complex application with deeply nested elements and thus the locator are very long. For example:
Now I see that an object was displayed but the test fails. As i do not see the full selector, I do not know which object was used within the Now you might argue that our selectors are too long. But The structure of the application does not allow to reduce the length and keep readability at all places. But I understand that this is something you probably don't want to implement. Do you think that this can be done by using a cypress plugin? Then I can create one that fits exactly our usecase. |
@gabbersepp Yes, I understand the need to show more of the info in the error, up to 50 lines like the I was asking why you believed this needed to be configurable and not just show 50 lines max always for every default command? I would suggest extending the css styles from this PR to apply to other commands in the Command Log. #5630 |
@jennifer-shehane sorry. Now I understand what you mean. I do not know if this behaviour is necessary for all user and for all commands. So adding a true/false flag to the config would avoid applying this breaking feature to all user |
@gabbersepp I wouldn't consider this a breaking change. Should be good to extend the truncation to 50 lines. |
The code for this is done in cypress-io/cypress#6163, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior:
Logs from
cy.log
are now truncated at 50 lines: #5625But logs from
cy.get
not.Desired behavior:
I wanted to know if we can add a global option in
cypress.config
that tells cypress to apply the same truncate logic as it does on manualcy.log
calls?Test code to reproduce
use
cy.get
with a very large selector and let it fail. You are not able to determine the failure from the screenshot:Versions
3.8.2
The text was updated successfully, but these errors were encountered: