Files
cypress/packages/server/lib/modes
Jennifer Shehane fe937d3450 Display full specfile(s) in stdout during cypress run (#5120)
* Begin inserting newlines for long specfiles in results table of stdout

* clean up some decaff weirdness

* move newlines function into util

- call ‘formatPath’ on any area where the path could be too long and
needs to word wrap

* Clean up some styles, padding that does nothing - get specname closer to symbol by 1 pixel

* Commit new snapshot changes. Word wrapping, some spacing changes

* remove more padding that does functionally nothing

* Fix more of the extra unnecessary padding in 'Running' table

* Update other CLI snapshots to match new spacing

* Remove the error thrown when colWidths exceeds 100, I don't see this as necessary since we have snapshots covering the design of the columns.

* Update some snapshots I missed

* Add gaurd in newLine function in case there is no specfile name

* fix more snapshots

* Fix snapshot extra space

* forcibly enable colors in all e2e tests, and strip them back out of the snapshots

* Fix colors that got lost in stdout

* Update newlines function to use simpler ramda split + fix implementation to remove last newline

- write unit test for newlines function for easier refactoring in future

* iterating on fixing the weird column issues

* handle if str is undefined in newlines function

* Draw the tables at exact 100 width, taking into account padding and borders

- Calculate the actual width of the table column in order to add
newlines at that length
- Add newlines for the ‘Finished processing’ output of video file
- Add newlines for the ‘Screenshots’ output of screenshot paths

* remove .only

* Remove extra 1 char padding

* Remove color changes (separate PR for this)

* Replace project path with same num chars of X's

We were just replacing it with foo/bar/baz which would mess up the
alignment of the snapshots since it was removing chars

* If we are running with a CYPRESS_ENV of 'test', replace the cwd

- Replace the current working directory if we’re running withing
Cypress so that our snapshots are consistent when run on diff machines.
- Ideally, I would have liked to have had a special ‘—fake-cwd-path’
flag so that we can override this later, but I couldn’t figure how to
pass that.

* Continue stripping the projectPath from snapshot output

- This is required because some messaging comes from outside of the
run.js file, so we still need to replace these paths in snapshot.

* Update snapshots to have correctly replaced cwd

* Update formatting of new Node Version path to properly return within our stdout tables

* remove tests for method that does not exist

- update the drawing of table columns to match the new logic - don’t
need weird spaces and padding right anymore.
- update snapshot to match

* Update snapshot for performance test that didn't previously run

* return empty string if no name passed (really just for weird edgecases in our own tests)

* Add instructions on how to run performance tests in server

* Update video processing and screenshot tables so they no longer use weird negative padding hack with ' ' border

* Update snapshots to reflect new table spacing

* Another snapshot update missed

* Accept 'FAKE_CWD_PATH' env var to replace it in the run

* Pad paren time to factor in extra whitespace

* Update snapshots to no longer have static 'acb123.mp4' for video names

- This was throwing off the table calculations.

* remove stripping screenshot dimensions + replace padStart with padEnd

* Update snapshots to instead user shorter form 'second' in order to account for shorter duration printing when it is 1 second

* Add correct padding for screenshot dimensions

* update perf spec

* Update performance snapshot

* remove unused 'stripAnsi' dep

* Fix merge conflict failure - didn't regenerate snapshot correctly last time.

* commit size of electron screenshot (fix incoming in another PR to avoid this)

* Correctly handle padding of node version so we don't have to rewrite this later.

* split out let & const assignments


Co-authored-by: Brian Mann <brian.mann86@gmail.com>
2019-10-21 11:21:34 -04:00
..