Skip to content

Conversation

@adamalston
Copy link
Contributor

@adamalston adamalston commented Aug 21, 2025

Additional details

I left a TODO with some questions that hopefully someone can answer.

Steps to test

Revert the fix and check that the test fails.

How has the user experience changed?

N/A

PR Tasks


Note

Marks in-flight requests as errored at navigation start so cy.wait('@alias') resolves when the underlying request is canceled by navigation; adds test and changelog entry.

  • Driver (navigation):
    • Mark in-flight network requests and aliasedRequests as canceled on navigation start by setting request.state = 'Errored' and attaching an error in stabilityChanged() within packages/driver/src/cy/commands/navigation.ts.
  • Tests:
    • Add e2e test in packages/driver/cypress/e2e/commands/navigation.cy.js verifying cy.wait('@alias') resolves after a navigation-canceled request.
  • Changelog:
    • Add bugfix note to cli/CHANGELOG.md for cy.wait('@alias') timing out on navigation-canceled requests.
  • Misc:
    • Add ESLint suppression for console in packages/electron/src/print-node-version.ts.

Written by Cursor Bugbot for commit f670c41. This will update automatically on new commits. Configure here.

@cypress-app-bot
Copy link
Collaborator

@adamalston
Copy link
Contributor Author

adamalston commented Sep 12, 2025

Regarding the changes in a623e1f:

  • The pre-commit hook would not pass without the update in packages/electron/lib/print-node-version.ts.
  • I did not make the change in npm/cypress-schematic/src/schematics/utils/index.ts. It appears to have been made automatically.
  • I did not move the changelog entry. I don't seen any benefit in moving it and creating additional conflicts before the code is reviewed.

markRequestAsCancelled(request)
})
} catch (_) {
// TODO: Should I use `$errUtils.logError` or another method from
Copy link
Contributor

Choose a reason for hiding this comment

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

My opinion @adamalston would be to do nothing since an error in the Cypress log would likely confuse the user. @jennifer-shehane anything you want to add here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cancelled network requests fail to resolve with cy.wait

3 participants