Files
cypress/packages/reporter
Zach Panzarino 7d468d4e2c Split hooks and open hooks in ide from reporter (#7821)
* Add invocation details to hooks

* Add hooks to emitted root runnable

* Hook details model

* Progress on hook models

* Add commands to hook

* Fix display of hooks

* Display hooks in correct order

* (More) efficiently reorder hooks and display split numbers

* Open hook in IDE functionality

* Properly style button to open in IDE

* Add ability to open test body in IDE

* Fix hooks specs

* Runnables store tests

* Test model unit tests

* HookDetails -> HookProps

* Fix reporter integration tests

* Fix issue with after hook

* Update runner mocha tests

* Remove driver integration test that is no longer needed

* Update snapshot for server tests

* Add reporter integration tests for hooks

* Fix driver querying test

* Add runner test for hooks

* Update reporter hook tests to check for before all

* Fix before/after hook counts

* Fix runner test

* Fix issue with stack trace in ff and clean up mocha override

* Just incase someone names their test or support file common.js

Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
2020-07-07 21:17:03 +06:30
..

Reporter

Reporter

The reporter shows the running results of the tests. It includes the following:

  • A button to focus the list of test files
  • Stats for number of tests passed, failed, and pending
  • The total test run duration
  • Control for toggling auto-scrolling
  • Controls for various states (running, paused, stopped, etc.)
  • A command log, showing:
    • suites
    • tests
    • hooks
    • commands and assertions with detailed information
    • any failures/errors
  • Toggle-able auto-scrolling of command log

Building

For development

yarn workspace @packages/reporter build

For production

yarn workspace @packages/reporter build-prod

Developing

To see the reporter render, see Developing the driver.

Watching

  • Runs *.js and *.jsx through babel and bundles with browserify into single dist/reporter.js
  • Runs associated unit test of file saved and outputs to terminal
  • Compiles *.scss files to single dist/reporter.css
yarn workspace @packages/reporter watch

Testing

Cypress

Run Cypress tests found in cypress/integration.

yarn workspace @packages/reporter cypress:open

You'll want to run yarn workspace @packages/reporter watch to iterate on the reporter under test while testing.

You'll want to run yarn workspace @packages/runner watch to get changes to the main Cypress reporter while testing.

Enzyme

Run enzyme component tests found in *.spec files in src:

yarn workspace @packages/reporter test