Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html>
<head>
<meta http-equiv="refresh" content="0; url=/timeout?ms=100" />
<meta http-equiv="refresh" content="0; url=/redirect-timeout" />
<title>Page Redirect</title>
</head>
<body>
Expand Down
8 changes: 8 additions & 0 deletions packages/driver/cypress/plugins/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ const createApp = (port) => {
})
})

app.get('/redirect-timeout', (req, res) => {
return Promise
.delay(100)
.then(() => {
return res.send('<html><body>timeout</body></html>')
})
})

Comment on lines +46 to +53
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: is there something blocking you from creating a cy.intercept() instead of a new route in server.js? This file be balloonin'. I guess you'd have to update the test to deal with the add'l logs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this was my attempt to be minimally invasive.

app.get('/custom-headers', (req, res) => {
return res.set('x-foo', 'bar')
.send('<html><body>hello there</body></html>')
Expand Down