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 timeout progress bar for cy.wait #7882

Merged
merged 12 commits into from
Jul 20, 2020
9 changes: 8 additions & 1 deletion packages/driver/src/cy/commands/waiting.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ module.exports = (Commands, Cypress, cy, state) => {

if (options.log !== false) {
log = options._log = Cypress.log({
timeout: options.timeout,
type: 'parent',
aliasType: 'route',
options: userOptions,
Expand Down Expand Up @@ -156,13 +155,21 @@ module.exports = (Commands, Cypress, cy, state) => {
options = _.omit(options, '_runnableTimeout')
options.timeout = requestTimeout || Cypress.config('requestTimeout')

if (log) {
log.set('timeout', options.timeout)
}

return checkForXhr(alias, 'request', index, num, options)
}

const waitForResponse = () => {
options = _.omit(options, '_runnableTimeout')
options.timeout = responseTimeout || Cypress.config('responseTimeout')

if (log) {
log.set('timeout', options.timeout)
}

return checkForXhr(alias, 'response', index, num, options)
}

Expand Down
1 change: 1 addition & 0 deletions packages/reporter/src/commands/command-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export default class Command extends Instrument {
this.numElements = props.numElements
this.renderProps = props.renderProps || {}
this.visible = props.visible
this.timeout = props.timeout

this._checkLongRunning()
}
Expand Down