-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error experience when visiting outside of Cypress-launched br…
…owser (#6435) * force websockets transport * wip: ensure ws connections take place thru a known socket * clean up yesterday's work * remove dead code (request is undefined) * update websocket tests * add websocket tests * update socket + server specs * add token auth for file_server * Fix cy.visit file_server * restrict non-proxied URLs, serve error on runner URL non-proxied * add e2e test for server splash page * fix types * use clientRoute, fix tests * only run 6_non_proxied in electron * use browser.path * improve empty options type * add ws assertions in e2e tests * fix server_spec * refactor socket whitelisting logic * update server_spec * respond to PR feedback - added tests for non-clientRoute redirecting to clientRoute when not behind proxy - cleaned up comments - cleaned up logic in server.coffee - moved error html to own file - added unit test for socket whitelist + fixed removal bug
- Loading branch information
Showing
23 changed files
with
466 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
exports['e2e non-proxied spec / passes'] = ` | ||
==================================================================================================== | ||
(Run Starting) | ||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐ | ||
│ Cypress: 1.2.3 │ | ||
│ Browser: FooBrowser 88 │ | ||
│ Specs: 1 found (spec.js) │ | ||
│ Searched: cypress/integration/spec.js │ | ||
└────────────────────────────────────────────────────────────────────────────────────────────────┘ | ||
──────────────────────────────────────────────────────────────────────────────────────────────────── | ||
Running: spec.js (1 of 1) | ||
non proxied e2e | ||
✓ has the expected look | ||
✓ cannot connect to ws | ||
✓ can connect to proxied ws | ||
3 passing | ||
(Results) | ||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐ | ||
│ Tests: 3 │ | ||
│ Passing: 3 │ | ||
│ Failing: 0 │ | ||
│ Pending: 0 │ | ||
│ Skipped: 0 │ | ||
│ Screenshots: 0 │ | ||
│ Video: false │ | ||
│ Duration: X seconds │ | ||
│ Spec Ran: spec.js │ | ||
└────────────────────────────────────────────────────────────────────────────────────────────────┘ | ||
==================================================================================================== | ||
(Run Finished) | ||
Spec Tests Passing Failing Pending Skipped | ||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐ | ||
│ ✔ spec.js XX:XX 3 3 - - - │ | ||
└────────────────────────────────────────────────────────────────────────────────────────────────┘ | ||
✔ All specs passed! XX:XX 3 3 - - - | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<html> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html;charset=utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Cypress</title> | ||
|
||
<link href="/__cypress/static/favicon.ico" rel="icon"> | ||
|
||
<link rel="stylesheet" href="/__cypress/runner/cypress_runner.css"> | ||
</head> | ||
<body> | ||
<div id="app"> | ||
<div class="runner automation-failure"> | ||
<div class="automation-message"> | ||
<p>Whoops, we can't run your tests.</p> | ||
<div> | ||
<p class="muted">This browser was not launched through Cypress. Tests cannot run.</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.
15c3e95
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
linux x64
version of the Test Runner.You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.
You will need to use custom
CYPRESS_INSTALL_BINARY
url and install Cypress using an url instead of the version.15c3e95
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Circle has built the
linux x64
version of the Test Runner.You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.
You will need to use custom
CYPRESS_INSTALL_BINARY
url and install Cypress using an url instead of the version.15c3e95
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppVeyor has built the
win32 ia32
version of the Test Runner.You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.
You will need to use custom
CYPRESS_INSTALL_BINARY
url and install Cypress using an url instead of the version.Instructions are included below, depending on the shell you are using.
In Command Prompt (
cmd.exe
):In PowerShell:
In Git Bash:
Using
cross-env
:If the above commands do not work for you, you can also try using
cross-env
: