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

chore(tests): fix flake in net stubbing/xhr/proxy logging tests #18163

Merged
merged 6 commits into from
Sep 21, 2021

Conversation

flotwig
Copy link
Contributor

@flotwig flotwig commented Sep 20, 2021

User facing changelog

n/a

Additional details

There are 2 main reasons these tests were flaky after #16730:

  1. It's possible for the log to update before or after the response is received (on the order of milliseconds). This means that tests that assert on the log after a response sometimes have to wait for the log to be updated.
  2. XHR logs are created by the xhr.js code still since they can be totally stubbed by cy.route(), which will bypass feat: proxy logging #16730 entirely. But if the XHR does go out-of-browser, the XHR log will be updated with proxy logging metadata either before or after the XHR onload event fires. (similar to (1))

Also bonus attempted to fix flake in net_stubbing_spec.

How has the user experience changed?

PR Tasks

  • Have tests been added/updated?
  • [na] Has the original issue or this PR been tagged with a release in ZenHub?
  • [na] Has a PR for user-facing changes been opened in cypress-documentation?
  • [na] Have API changes been updated in the type definitions?
  • [na] Have new configuration options been added to the cypress.schema.json?

@flotwig flotwig requested a review from a team as a code owner September 20, 2021 15:32
@flotwig flotwig requested review from chrisbreiding and jennifer-shehane and removed request for a team September 20, 2021 15:32
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Sep 20, 2021

Thanks for taking the time to open a PR!

@flotwig flotwig marked this pull request as draft September 20, 2021 15:34
@flotwig flotwig changed the title chore(tests): fix flake in proxy-logging-spec chore(tests): fix flake in proxy logging tests Sep 20, 2021
@cypress
Copy link

cypress bot commented Sep 20, 2021



Test summary

4184 2 53 1Flakiness 0


Run details

Project cypress
Status Failed
Commit 409f199
Started Sep 20, 2021 9:05 PM
Ended Sep 20, 2021 9:16 PM
Duration 10:50 💡
OS Linux Debian - 10.9
Browser Firefox 89

View run in Cypress Dashboard ➡️


Failures

e2e/focus_blur_spec.js Failed
1 intercept blur methods correctly > focus area
commands/actions/type_spec.js Failed
1 ... > element

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

@flotwig flotwig changed the title chore(tests): fix flake in proxy logging tests chore(tests): fix flake in net stubbing/xhr/proxy logging tests Sep 20, 2021
@flotwig flotwig force-pushed the issue-17629-flaky-logging-tests branch from d263d2d to cfe98cc Compare September 20, 2021 17:26
@flotwig flotwig marked this pull request as ready for review September 20, 2021 17:54
@flotwig flotwig force-pushed the issue-17629-flaky-logging-tests branch from 919085f to 409f199 Compare September 20, 2021 18:13
@flotwig flotwig merged commit 0964ca2 into develop Sep 21, 2021
tgriesser added a commit that referenced this pull request Sep 24, 2021
…/remove-decorators

* unified-desktop-gui:
  fixing broken ct tests
  fix types
  remove old code
  chore: bump deps (#18213)
  feat(app): icon library supporting Cy's custom icons (#18195)
  feat(app): adding navigation, pages, router, and layout (#18194)
  chore: Update Chrome (stable) to 94.0.4606.54 (#18196)
  chore: bump yarn.lock (#18204)
  chore(tests): fix flake in net stubbing/xhr/proxy logging tests (#18163)
  chore: Update Chrome (beta) to 94.0.4606.54 (#18174)
  fix: add deprecation notice for win 32-bit (#18130)
  chore: fix broken firefox focus tests, bump resource class of chrome-beta job (#18133)
  fix(cli): Respect NO_PROXY on cypress download (#17702)
  chore: Update Chrome (beta) to 94.0.4606.50 (#18117)
  release 8.4.1 [skip ci]
  fix: GH env variable for test other projects (#18147)
  fix(open_project): remove unnecessary fn wrapping from tryToCalls (#18146)
  change @ts-expect-error -> @ts-ignore (#18047)
tgriesser added a commit that referenced this pull request Sep 28, 2021
* unified-desktop-gui: (48 commits)
  refactor: remove nexus-decorators, add data context (#18211)
  fix mountFragment tests
  fix(unified-desktop-gui branch): initial installation on windows (#18247)
  fix(unify): fixing icons and supporting router within the shared cypress commands package (#18237)
  feat(launchpad): improve layout and design (#18238)
  feat(launchpad): add design tokens from Figma (#18223)
  fix(unify): appveyor windows issue + better icon types (#18226)
  fixing broken ct tests
  fix types
  remove old code
  chore: bump deps (#18213)
  feat(app): icon library supporting Cy's custom icons (#18195)
  feat(app): adding navigation, pages, router, and layout (#18194)
  chore: Update Chrome (stable) to 94.0.4606.54 (#18196)
  fix(launchpad): fix bugs introduced by urql/graphcache (#18193)
  chore: bump yarn.lock (#18204)
  feat: add gulp makePackage, begin to scaffold data-context (#18186)
  feat(launchpad): Directory Upload in Global Mode (#18165)
  chore(tests): fix flake in net stubbing/xhr/proxy logging tests (#18163)
  chore: remove nxs.gen.ts - should be created by codegen (#18184)
  ...
@flotwig flotwig deleted the issue-17629-flaky-logging-tests branch January 24, 2022 18:13
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.

Address flaky proxy logging tests
2 participants