-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Display full specfile(s) in stdout during cypress run #5120
Conversation
This comment has been minimized.
This comment has been minimized.
- call ‘formatPath’ on any area where the path could be too long and needs to word wrap
… to symbol by 1 pixel
…as necessary since we have snapshots covering the design of the columns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- We need to leave the truncation in place for displaying the number of found spec files - because using a
specPattern
would list out potentially dozens or even hundreds of tests - which is not what the user wants. - Add margin-right space back in for displaying the Running spec
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…eird negative padding hack with ' ' border
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
# Conflicts: # packages/server/__snapshots__/1_commands_outside_of_test_spec.coffee.js # packages/server/__snapshots__/2_browser_path_spec.coffee.js # packages/server/__snapshots__/2_cookies_spec.coffee.js # packages/server/__snapshots__/3_plugins_spec.coffee.js # packages/server/__snapshots__/3_user_agent_spec.coffee.js # packages/server/__snapshots__/4_request_spec.coffee.js # packages/server/__snapshots__/5_screenshots_spec.coffee.js # packages/server/__snapshots__/5_stdout_spec.coffee.js # packages/server/__snapshots__/5_subdomain_spec.coffee.js # packages/server/__snapshots__/6_web_security_spec.coffee.js
- This was throwing off the table calculations.
…count for shorter duration printing when it is 1 second
# Conflicts: # packages/server/__snapshots__/1_commands_outside_of_test_spec.coffee.js # packages/server/__snapshots__/2_cookies_spec.coffee.js # packages/server/__snapshots__/3_plugins_spec.coffee.js # packages/server/__snapshots__/3_user_agent_spec.coffee.js # packages/server/__snapshots__/4_request_spec.coffee.js # packages/server/__snapshots__/5_subdomain_spec.coffee.js # packages/server/__snapshots__/5_task_not_registered_spec.coffee.js # packages/server/__snapshots__/6_uncaught_support_file_spec.coffee.js # packages/server/test/e2e/5_stdout_spec.coffee # packages/server/test/support/helpers/e2e.coffee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New stdout looks awesome! I noticed some minor things you might want to fix but all in all this looks great.
Brian said this is good to go since reviewed by other teammate
User facing changelog
Stdout printed during
cypress run
no longer truncates text such a filenames and instead wraps the text to fit within the width of the terminal.Additional details
The way tables are printed in stdout has been refactored.
Paths now insert newlines
...
, now we have a new methodformatPath
that when passed the width of the table's column it will be drawn within, will add newlines at the width so that the path will return.https://github.com/cypress-io/cypress/blob/issue-4977-specfiles-in-stdout/packages/server/lib/modes/run.js#L115
console.log('path/to/thing')
have now been replaced with tables so we can properly wrap depending on the set column width.https://github.com/cypress-io/cypress/blob/issue-4977-specfiles-in-stdout/packages/server/lib/modes/run.js#L859
Leftover width when < 100 width
3
(1 left padding, 1 width, 1 right padding), it would sometimes print out at a width of10
because if the other columns did not take up a width of100
- they would throw the extra width into the first column.https://github.com/cypress-io/cypress/blob/issue-4977-specfiles-in-stdout/packages/server/lib/util/terminal.js#L161
Snapshots
1028x468
, we now replace it with the smallest possible width (in this case a screenshot could be0x0
at it's smallest) and add padding to equal the length of the original screenshot, so we replace the text like:_.startPad('YxZ', p1.length)
.https://github.com/cypress-io/cypress/blob/issue-4977-specfiles-in-stdout/packages/server/test/support/helpers/e2e.coffee#L77
FAKE_CWD_PATH
env var during test execution - that when present duringrun
, replaces the current working directory path before we insert the newlines.https://github.com/cypress-io/cypress/blob/issue-4977-specfiles-in-stdout/packages/server/lib/modes/run.js#L120
Bug in cli-table-3
I found a bug with cli-table-3 where padding passed to a cell is ignored if set to
0
. Opened an issue here: cli-table/cli-table3#124How has the user experience changed?
Run Header
Before
After
Run Results
Before
After
PR Tasks
cypress-documentation
?type definitions
?cypress.schema.json
?