Skip to content

Commit 2b4916f

Browse files
authored
'Fix' flaky redirect test (#19042)
1 parent dc7503e commit 2b4916f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/driver/cypress/fixtures/meta-redirect-timeout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html>
22
<head>
3-
<meta http-equiv="refresh" content="0; url=/timeout?ms=100" />
3+
<meta http-equiv="refresh" content="0; url=/redirect-timeout" />
44
<title>Page Redirect</title>
55
</head>
66
<body>

packages/driver/cypress/plugins/server.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ const createApp = (port) => {
4343
})
4444
})
4545

46+
app.get('/redirect-timeout', (req, res) => {
47+
return Promise
48+
.delay(100)
49+
.then(() => {
50+
return res.send('<html><body>timeout</body></html>')
51+
})
52+
})
53+
4654
app.get('/custom-headers', (req, res) => {
4755
return res.set('x-foo', 'bar')
4856
.send('<html><body>hello there</body></html>')

0 commit comments

Comments
 (0)