Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: call screencastOpts as a function for starting a screencast on electron. #23001

Merged
merged 3 commits into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions packages/server/lib/browsers/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const _getAutomation = async function (win, options, parent) {
// workaround: start and stop screencasts between screenshots
// @see https://github.com/cypress-io/cypress/pull/6555#issuecomment-596747134
if (!options.onScreencastFrame) {
await sendCommand('Page.startScreencast', screencastOpts)
await sendCommand('Page.startScreencast', screencastOpts())
const ret = await fn(message, data)

await sendCommand('Page.stopScreencast')
Expand Down Expand Up @@ -117,7 +117,7 @@ const _maybeRecordVideo = async function (webContents, options) {
}
})

await webContents.debugger.sendCommand('Page.startScreencast', screencastOpts)
await webContents.debugger.sendCommand('Page.startScreencast', screencastOpts())
}

module.exports = {
Expand Down
2 changes: 2 additions & 0 deletions packages/server/lib/modes/record.js
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,8 @@ const createRunAndRecordSpecs = (options = {}) => {
})

if (response === responseDidFail) {
debug('Response did fail equals response, allowing browser to hang until it is killed: Response %o', { responseDidFail })
mjhenkes marked this conversation as resolved.
Show resolved Hide resolved

// dont call the cb, let the browser hang until it's killed
return
}
Expand Down