mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-03 05:20:38 -05:00
Merge branch 'develop' into release/15.0.0
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
version: 2.1
|
||||
|
||||
chrome-stable-version: &chrome-stable-version "138.0.7204.183"
|
||||
chrome-beta-version: &chrome-beta-version "139.0.7258.66"
|
||||
chrome-stable-version: &chrome-stable-version "139.0.7258.66"
|
||||
chrome-beta-version: &chrome-beta-version "140.0.7339.5"
|
||||
firefox-stable-version: &firefox-stable-version "141.0"
|
||||
|
||||
orbs:
|
||||
|
||||
@@ -237,139 +237,3 @@ exports['e2e network error handling Cypress does not delay a 304 Not Modified be
|
||||
|
||||
|
||||
`
|
||||
|
||||
exports['e2e network error handling Cypress tests run as expected 1'] = `
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Starting)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Cypress: 1.2.3 │
|
||||
│ Browser: FooBrowser 88 │
|
||||
│ Specs: 1 found (network_error_handling.cy.js) │
|
||||
│ Searched: cypress/e2e/network_error_handling.cy.js │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Running: network_error_handling.cy.js (1 of 1)
|
||||
|
||||
|
||||
network error handling
|
||||
cy.visit() retries
|
||||
1) fails after retrying 5x
|
||||
✓ works on the third try after two failed requests
|
||||
✓ works on the third try after two 500 errors
|
||||
✓ re-sends a <form> body on failures
|
||||
cy.request() retries
|
||||
2) fails after retrying 5x
|
||||
✓ works on the third try after two failed requests
|
||||
✓ works on the third try after two 500 errors
|
||||
subresource retries
|
||||
✓ on <img> tags
|
||||
✓ on <script> tags
|
||||
|
||||
|
||||
7 passing
|
||||
2 failing
|
||||
|
||||
1) network error handling
|
||||
cy.visit() retries
|
||||
fails after retrying 5x:
|
||||
CypressError: \`cy.visit()\` failed trying to load:
|
||||
|
||||
http://localhost:13370/immediate-reset?visit
|
||||
|
||||
We attempted to make an http request to this URL but the request failed without a response.
|
||||
|
||||
We received this error at the network level:
|
||||
|
||||
> Error: socket hang up
|
||||
|
||||
Common situations why this would fail:
|
||||
- you don't have internet access
|
||||
- you forgot to run / boot your web server
|
||||
- your web server isn't accessible
|
||||
- you have weird network configuration settings on your computer
|
||||
[stack trace lines]
|
||||
|
||||
From Node.js Internals:
|
||||
Error: socket hang up
|
||||
[stack trace lines]
|
||||
|
||||
2) network error handling
|
||||
cy.request() retries
|
||||
fails after retrying 5x:
|
||||
CypressError: \`cy.request()\` failed trying to load:
|
||||
|
||||
http://localhost:13370/immediate-reset?request
|
||||
|
||||
We attempted to make an http request to this URL but the request failed without a response.
|
||||
|
||||
We received this error at the network level:
|
||||
|
||||
> Error: socket hang up
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
The request we sent was:
|
||||
|
||||
Method: GET
|
||||
URL: http://localhost:13370/immediate-reset?request
|
||||
|
||||
-----------------------------------------------------------
|
||||
|
||||
Common situations why this would fail:
|
||||
- you don't have internet access
|
||||
- you forgot to run / boot your web server
|
||||
- your web server isn't accessible
|
||||
- you have weird network configuration settings on your computer
|
||||
|
||||
https://on.cypress.io/request
|
||||
[stack trace lines]
|
||||
|
||||
From Node.js Internals:
|
||||
RequestError: Error: socket hang up
|
||||
[stack trace lines]
|
||||
|
||||
|
||||
|
||||
|
||||
(Results)
|
||||
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ Tests: 9 │
|
||||
│ Passing: 7 │
|
||||
│ Failing: 2 │
|
||||
│ Pending: 0 │
|
||||
│ Skipped: 0 │
|
||||
│ Screenshots: 2 │
|
||||
│ Video: false │
|
||||
│ Duration: X seconds │
|
||||
│ Spec Ran: network_error_handling.cy.js │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
|
||||
|
||||
(Screenshots)
|
||||
|
||||
- /XXX/XXX/XXX/cypress/screenshots/network_error_handling.cy.js/network error hand (1280x720)
|
||||
ling -- cy.visit() retries -- fails after retrying 5x (failed).png
|
||||
- /XXX/XXX/XXX/cypress/screenshots/network_error_handling.cy.js/network error hand (1280x720)
|
||||
ling -- cy.request() retries -- fails after retrying 5x (failed).png
|
||||
|
||||
|
||||
====================================================================================================
|
||||
|
||||
(Run Finished)
|
||||
|
||||
|
||||
Spec Tests Passing Failing Pending Skipped
|
||||
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
|
||||
│ ✖ network_error_handling.cy.js XX:XX 9 7 2 - - │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
✖ 1 of 1 failed (100%) XX:XX 9 7 2 - -
|
||||
|
||||
|
||||
`
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 14 KiB |
@@ -373,41 +373,6 @@ describe('e2e network error handling', function () {
|
||||
})
|
||||
})
|
||||
|
||||
it('tests run as expected', function () {
|
||||
return systemTests.exec(this, {
|
||||
spec: 'network_error_handling.cy.js',
|
||||
expectedExitCode: 2,
|
||||
snapshot: true,
|
||||
}).then(({ stdout }) => {
|
||||
// sometimes <img>, <script> get retried, sometimes they do not
|
||||
|
||||
if (counts['/immediate-reset?load-img'] > 1) {
|
||||
console.log('load-img was retried', counts['/immediate-reset?load-img'], 'times')
|
||||
counts['/immediate-reset?load-img'] = 1
|
||||
}
|
||||
|
||||
if (counts['/immediate-reset?load-js'] > 1) {
|
||||
console.log('load-js was retried', counts['/immediate-reset?load-js'], 'times')
|
||||
counts['/immediate-reset?load-js'] = 1
|
||||
}
|
||||
|
||||
expect(counts).to.deep.eq({
|
||||
'/immediate-reset?visit': 5,
|
||||
'/immediate-reset?request': 5,
|
||||
'/immediate-reset?load-img': 1,
|
||||
'/immediate-reset?load-js': 1,
|
||||
'/works-third-time-else-500/500-for-request': 3,
|
||||
'/works-third-time/for-request': 3,
|
||||
'/works-third-time-else-500/500-for-visit': 3,
|
||||
'/works-third-time/for-visit': 3,
|
||||
'/print-body-third-time': 3,
|
||||
'/print-body-third-time-form': 1,
|
||||
'/load-img-net-error.html': 1,
|
||||
'/load-script-net-error.html': 1,
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
it('does not connect to the upstream proxy for the SNI server request', function () {
|
||||
const onConnect = sinon.spy(() => {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user