* Add failing test case for visible element within overflow hidden then position absolute element. Addresses #4395 * Write failing test case for when parent is flex and overflow hidden with el outside bounds Addresses #4161 * Wrote failing test for visibility outside of clip-path Addresses #1178 * Add failing tests for transform scale Addresses https://github.com/cypress-io/cypress/issues/723 * Add failing test for backfact-visibility hidden example * cs -> js fixes * Add more specific error when el is not element * Always return as visible when checking html or body * Add comments + rename methods to be more exact * Add case for isHidden when visibility is collapse * Add failing test cases for visibility issues * Add comment about how ensureVisibility works under the hood * Add checks and tests for opacity: 0 to be hidden * Simplify if/case statements to be more readable * Expand check for offset parents to also check children of ancestor for positioning attributes close #4395 close #755 * Fix issue where els with parents with absolute position inside overflow hidden would be calculated as not visible * comment out opacity checks for patch release * Add more tests around new visibility assertions - Add case to make sure display none is not on the option or optgroup itself * Fix failing assertion - where el was undefined when looking for visibiliyt * remove commented out code involving opacity 😬
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.
Installing
The driver's dependencies can be installed with:
cd packages/driver
npm install
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.
cd packages/runner
npm run 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.
## run in cypress GUI mode
cd packages/driver
npm run 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.
## run all the tests
npm run cypress:run
Testing
This project is tested with Cypress itself. It acts exactly like any other Cypress project (really we're not kidding!).
The driver uses a node server to test all of its edge cases, so first start that.
## boot the driver's server
cd packages/driver
npm start
Debugging
In the browser
localStorage.debug = "cypress:driver"