* 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>
Driver
This is the core JavaScript library that is loaded inside the browser that is responsible for executing Cypress commands and managing the test runtime.
Building
The driver is actually consumed by the runner like any other npm module. To develop the driver and see changes reflected you need to run the watch task inside of the runner.
yarn workspace @packages/runner watch
Developing
If you're developing on the driver, you'll want to run in the normal Cypress GUI mode, like you would when you're writing tests for your own Cypress projects.
yarn workspace @packages/driver cypress:open
Read the runner's README.md for more information.
Running
You can also run all of the driver's tests locally. We don't really recommend this because it takes a long time, and we have this process optimized by load balancing the tests across multiple workers in CI.
It's usually easier to run the tests in the GUI, commit, and then see if anything broke elsewhere.
yarn workspace @packages/driver start
# in separate terminal
yarn workspace @packages/driver cypress:run
# or for development
yarn workspace @packages/driver cypress:open
Debugging
In the browser
localStorage.debug = "cypress:driver"
Patches
sinonunfetchto polyfillfetch. Added constructor function to point XMLHttpRequest to the application under test window.
Note: when creating a patch, make sure there is no package-lock.json file! Also rename the patch to have ".dev.patch" extension.