Fixed flaky history test by fixing waitForResponse race condition#26788
Fixed flaky history test by fixing waitForResponse race condition#26788cmraible merged 1 commit intoTryGhost:mainfrom
Conversation
The waitForResponse listener was registered after the click that triggers the API call, so the response could complete before Playwright started listening. Moved the listener setup before the click to ensure the response is always captured.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis change refactors a test file to modify the timing of an asynchronous response handler. A promise is introduced to capture the 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The waitForResponse listener was registered after the click that triggers the API call, so the response could complete before Playwright started listening. Moved the listener setup before the click to ensure the response is always captured.