Matt Henkes 6ee305ba41 feat: Allow cy.visit to visit cross origin sites. (#23297)
* Initial async changes

* Small fixes and test updates.

* updating tests

* Fixes for cookie login tests

* remove the onlys

* Most tests passing

* Fix driver tests?

* fix firefox test?

* fix unit tests

* fix tests??

* a better check

* fix integration tests

* minor cleanup

* Comment out tyler fix for 10.0 origin issue

* also fix integration tests

* remove fixmes

* Adding Retries for cookie actions. May break other error tests.

* Address (some) PR comments

* update to warn about cross origin command AUT in assertions

* Fix type errors

* Move document.cookie patch to injection

* Adding iframe patching.

* forward errors prior to attaching

* Add error message when using visit to visit a cross origin site with the onLoad or onBeforeLoad options.

* Attempt to fix test errors.

* more fixes, but not all

* use the origin policy

* Fix types

* more fixes

* consider chromeWebSecurity when checking if you can communicate with the AUT

* firefox

* prevent hangs if before unload happens after on load.

* Fix some ToDos

* code cleanup

* remove quotes

* Code review changes

* more cr changes

* fix tests possibly

* for realz this time

* roll back change

* Fix some flake

* Fix flakey xhr test hopefully.

* oops, forgot communicator changes. need those.

* modify error message to not lose the original error

* read config right derp

* simpler check

* no unused vars

* don't put config on window

* Make isRunnerAbleToCommunicateWithTheAUT a util function instead of attaching it to cypress.

* fix a race condition maybe

* clear document when window is cross origin... we'll see if this breaks anything.

* Retry if querying against the wrong AUT

* use timeout

* Don't print the retrying string unless you're retrying due to command aut origin mismatch

* try handling undefined document

* Code review updates. What could go wrong??

* Apply suggestions from code review

Co-authored-by: Bill Glesias <bglesias@gmail.com>

* minor fixes

* try aut location and move the async state collection.

* fix flake around the loading message, probably

* Fix system tests and some flake around redirect counts.

* Improve error handler prior to attaching.

* Code review suggestions

* use a generated ID when promisifying post message

* clean up promise helper

* skip xhr test until issue is resolved.

* Apply suggestions from code review

Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>

* use state directly

* Apply suggestions from code review

Co-authored-by: Bill Glesias <bglesias@gmail.com>

* Update packages/driver/src/cypress/error_messages.ts

Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>

Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Chris Breiding <chrisbreiding@users.noreply.github.com>
2022-09-15 12:28:27 -05:00
2022-06-22 07:06:38 -07:00
2021-03-04 04:06:21 -05:00
2022-06-22 07:06:38 -07:00

Cypress Logo

Documentation | Changelog | Roadmap

The web has evolved. Finally, testing has too.

Fast, easy and reliable testing for anything that runs in a browser.

Join us, we're hiring.

npm Gitter chat StackShare

What is Cypress?

Why Cypress Video

Installing

npm version

Install Cypress for Mac, Linux, or Windows, then get started.

npm install cypress --save-dev

or

yarn add cypress --dev

installing-cli e1693232

Contributing

  • CircleCI - develop branch
  • CircleCI - master branch

Please see our Contributing Guideline which explains repo organization, linting, testing, and other steps.

License

license

This project is licensed under the terms of the MIT license.

Badges

Let the world know your project is using Cypress.io to test with this cool badge

Cypress.io

[![Cypress.io](https://img.shields.io/badge/tested%20with-Cypress-04C38E.svg)](https://www.cypress.io/)
Description
Fast, easy and reliable testing for anything that runs in a browser.
Readme MIT 978 MiB
Languages
TypeScript 54.2%
JavaScript 38.1%
Vue 4%
HTML 3.1%
SCSS 0.4%
Other 0.1%