Files
cypress/packages/runner
Chris Breiding 3e6d6bfe15 chore: Updates based on PR feedback (#21137)
* add generic to cy.origin type

* fix log type, update/add comments

* fix comment indentation

* specific generic

* move RemoteState to internal types

* add on links to experimental flag descriptions

* chore: reduce nesting by flipping condition

* fix test title

* simplify failing log

* rename variable

* delete error property

* fix types

* fix type

* remove unnecessary todo

* update wait test

* jquery -> this

* update comment

* remove vestigial autoRun

* use finally

* re-throw non-security errors

* move back getting index

* add new state types

* remove unnecessary export

* startsWith -> includes

* it -> them

* update system test

* remove use of promise constructor

* Revert "remove use of promise constructor"

This reverts commit 35ccc28b6f.

* log errors from Page.getFrameTree

* test if anything breaks when removing optional chaining operator

* remove vestigial file

* handle queue ending in cross-origin driver

* fix coordinates spec

* improve chrome/firefox check in extension

* improve secure cookie regex

* use production mode for cross-origin driver bundle

* adding remoteStates.getPrimary

* catch and ignore queue errors

* remove optional chaining in postMessage handler

* removed unnecessary async

* update frame tree on cri client reconnect

* fix formatting

* renaming remoteStates variable

* prevent requests from being paused if experimentalSessionAndOrigin flag is off

Co-authored-by: Matt Schile <mschile@cypress.io>
2022-04-22 14:58:02 -05:00
..

Runner

Runner

The runner is the minimal "chrome" around the user's app for end-to-end testing and has the following responsibilities:

  • Managing communication between the driver, the reporter, the extension, and the server
  • Managing the viewport size and scale
  • Showing the currently active URL

This package also includes the majority of the code that gets injected into the App Under Test (AUT) by packages/proxy. That bundle's entry point is injection/index.js.

Developing

Watching

This watches and compiles all changes as you make them.

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

Building

For development

yarn workspace @packages/runner build

For production

yarn workspace @packages/runner build-prod

Testing

Node Unit Tests

yarn workspace @packages/runner test

Cypress Tests

You can run Cypress tests found in cypress/integration:

yarn workspace @packages/runner cypress:open

To watch and reload changes to the runner while testing you'll want to run:

yarn workspace @packages/runner watch