Skip to content

Commit f147ebb

Browse files
fix: call screencastOpts as a function for starting a screencast on electron. (#23001)
Co-authored-by: Mark Noonan <mark@cypress.io>
1 parent 85ee714 commit f147ebb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/server/lib/browsers/electron.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const _getAutomation = async function (win, options, parent) {
6565
// workaround: start and stop screencasts between screenshots
6666
// @see https://github.com/cypress-io/cypress/pull/6555#issuecomment-596747134
6767
if (!options.onScreencastFrame) {
68-
await sendCommand('Page.startScreencast', screencastOpts)
68+
await sendCommand('Page.startScreencast', screencastOpts())
6969
const ret = await fn(message, data)
7070

7171
await sendCommand('Page.stopScreencast')
@@ -117,7 +117,7 @@ const _maybeRecordVideo = async function (webContents, options) {
117117
}
118118
})
119119

120-
await webContents.debugger.sendCommand('Page.startScreencast', screencastOpts)
120+
await webContents.debugger.sendCommand('Page.startScreencast', screencastOpts())
121121
}
122122

123123
module.exports = {

packages/server/lib/modes/record.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,8 @@ const createRunAndRecordSpecs = (options = {}) => {
784784
})
785785

786786
if (response === responseDidFail) {
787+
debug('`responseDidFail` equals `response`, allowing browser to hang until it is killed: Response %o', { responseDidFail })
788+
787789
// dont call the cb, let the browser hang until it's killed
788790
return
789791
}

0 commit comments

Comments
 (0)