Examples
- This can be login with ajax and redirect to home page .
- In SPA app add new item with ajax and redirect to detail page.
or use any async redirection.
Many SPA routers uses similar approach
To install run npm install
npm run start-app-and-test
npm run start-app-and-test-unsecure
npm run start-app
npm run cypress:run
npm run cypress:run-unsecure
npm run cypress:open
npm run cypress:open-unsecure
When in app change hash location with delay (setTimeout) test will leave current page and go to parent page (cypress runner page). In my case http://localhost:8080/__/#/some/route/1
-
If set "chromeWebSecurity" to true, when run
cypress openand select test get error "CypressError: Cypress detected a cross origin error happened on page load:..." -
If set "chromeWebSecurity" to false, when run
cypress runget error "Error: EISDIR: illegal operation on a directory, open 'C:\Users\fakeuser\AppData\Roaming\Cypress\cy\production\projects\cypress-playground-98c610aaf979570d4bd341aac2a02314\bundles'"
When in app change hash location with delay (setTimeout) test will stay on current page. In my case http://localhost:8080/index.html#/some/route/1
Do not want to see any error.
Cypress package version: 3.6.1
Cypress binary version: 3.6.1
Operating System: Windows10 64bit
Browser: Chrome 78
Electron: 73 (headless)
Tiny Cypress E2E test case
| Build status | Description |
|---|---|
| Linux & Mac | |
| Windows 32-bit | |
| Windows 64-bit | |
| |
Codeship Basic |
Note that this project DOES NOT include Cypress dependency in the package.json. The reason for such omission is that we use this project to test every Cypress build and do not want to spend time installing cypress@x.x.x just to immediately install and test cypress@y.y.y. Which means when submitting pull requests with a bug report, please save the problematic version of Cypress in package.json. Simply run npm install --save-dev cypress or npm i -D cypress@x.x.x and commit the change before submitting a pull request.