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

feat: rename delayMs to delay, deprecate delay #14822

Merged
merged 1 commit into from
Feb 1, 2021

Conversation

flotwig
Copy link
Contributor

@flotwig flotwig commented Jan 29, 2021

  • Closes

User facing changelog

  • The delayMs option for StaticResponses used with cy.intercept has been renamed to delay.

Additional details

How has the user experience changed?

PR Tasks

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 29, 2021

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented Jan 29, 2021



Test summary

3974 0 52 1


Run details

Project cypress
Status Passed
Commit 1076619
Started Jan 29, 2021 6:19 PM
Ended Jan 29, 2021 6:32 PM
Duration 12:39 💡
OS Linux Debian - 10.5
Browser Firefox 77

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@@ -43,9 +43,17 @@ export function validateStaticResponse (cmd: string, staticResponse: StaticRespo
err('`throttleKbps` must be a finite, positive number.')
}

if (delayMs && delay) {
err('`delayMs` and `delay` cannot both be set.')
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be more like "delayMs has been deprecated. Use delay instead.`"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I tried thinking of a better error, but it's backwards-compatible so the wording is tricky. I think this wording is prob fine - we still support delayMs, so this is the most accurate error. In the future when delayMs is removed it can be updated.

@flotwig flotwig merged commit d662c5d into develop Feb 1, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 1, 2021

Released in 6.4.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v6.4.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Feb 1, 2021
@flotwig flotwig deleted the rename-cy.intercept-delay branch January 24, 2022 18:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants