question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Do not truncate Command Log message in default commands

See original GitHub issue

Current behavior:

Logs from cy.log are now truncated at 50 lines: https://github.com/cypress-io/cypress/issues/5625 But 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 manual cy.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:

describe("3.8.2", () => {
    it("truncate", () => {
        cy.visit("https://cypress.io")
            .get("#page-content > div:nth-child(2) > div > main > section.index-hero.Hero__StyledHero-sc-15j8hrl-2.kegIwW.gatsby-image-wrapper > div > h1 > div")
            .should("not.be.visible")
    })
})

image

Versions

3.8.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jennifer-shehanecommented, Jan 13, 2020

@gabbersepp I wouldn’t consider this a breaking change. Should be good to extend the truncation to 50 lines.

0reactions
cypress-bot[bot]commented, Jan 24, 2020

Released in 3.8.3.

This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v3.8.3, please open a new issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Suppress 'file truncated' messages when using tail
I've tried using tail -f messages.log | grep -v truncated but it shows me the message anyway. Is there any method to suppress...
Read more >
Truncate/Delete the log file contents which are generated via ...
When the new logs are generated then log file size is = old file size(before truncate) + new log messages size. This means...
Read more >
How to truncate the log file size without losing recent logs?
This command will truncate log file /tmp/myfile , it cuts the beginning and not the end of the file, it does not require...
Read more >
Difference between SQL Truncate and SQL Delete statements ...
SQL Truncate command places a table and page lock to remove all records. Delete command logs entry for each deleted row in the...
Read more >
Documentation: 15: TRUNCATE - PostgreSQL
Refuse to truncate if any of the tables have foreign-key references from tables that are not listed in the command. This is the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found