Repository navigation
test(dashboard): Wait for the answer before the answered-ask test leaves the Inbox - #3721
Merged
Merged
Conversation
#3690 tested that an answered row says "You answered Hold" in the Inbox. #3712 then removed Conversation rows from the Inbox, so no Inbox row can show the answer, and the test fails on main each time. Check that the ask leaves the Inbox, then check the answer on its row in Conversations. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e0a1543. Configure here.
The Inbox removes an answered ask before the server answers, so the test could open Conversations while the answer request was still in flight, and the navigation could stop it. Wait for its response first. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…er-e2e # Conflicts: # packages/junior-dashboard/e2e/inbox/inbox-answers.spec.ts
Contributor
|
8 screenshot changes — 8 changed · 0 added · 0 removed Review screenshots in Frameshift |
Member
Author
gricha
approved these changes
Nov 19, 2026
24 tasks done
dcramer
added a commit
that referenced
this pull request
Nov 22, 2026
A dashboard e2e test that ends while a request it caused is still open fails only when the timing lines up. #3721 was that case: a test navigated away before its POST answer reached the server. #3316 hid another case by making `unrouteAll` ignore errors from a route handler that was still running. The shared `page` fixture now tracks the fetch/XHR requests of each page. At teardown it fails the test if a request still has no response, and lists the method and path of each one. `BACKGROUND_READS` in `e2e/harness.ts` lists the reads that the app starts on its own, so one can be open whenever a test ends: the versions poll, the detail poll and its side reads, the reads that a moved versions token refreshes, and hover prefetch. Only GET requests can match. Reads that a page starts when it opens, such as outline and events pages, are not exempt. A request that has its response gets up to 1 s for its body to end, because `requestfinished` can fire after `waitForResponse` resolves. `unrouteAll({ behavior: "ignoreErrors" })` stays: an exempt read can still be in a route handler at teardown. Specs that ended on an optimistic UI change, a `waitForRequest`, a held route, or a navigation now wait for the response or a visible result. No product code changed. Open question: a write that a navigation cancels (`net::ERR_ABORTED`) is not caught, because Playwright reports it as failed, which counts as done. Chromium also reports `ERR_ABORTED` for some requests after a 204 response, so that case needs its own design. <!-- junior-request-attribution:start --> via @dcramer. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A61c795595079f331690fea94e2b2f688 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A61c795595079f331690fea94e2b2f688) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A61c795595079f331690fea94e2b2f688/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: David Cramer <[email protected]>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

#3704 fixed the "an answer says so in a toast, then on the row" test in
inbox-answers.spec.tsafter #3712. The test now opens Conversations to find the answered row. This PR first made the same fix. After a merge withmain, this PR has only the change below.The Inbox removes an answered row before the server answers. So
expect(rollout(page)).toHaveCount(0)can pass while the held answer request is still in progress. Thepage.gototo Conversations can then stop that request, and the row never says "You answered Hold". Cursor Bugbot found this race.The test now waits for the POST response to
/api/review-items/:id/actionsand checks that it is OK. Only then does it go to Conversations.Locally, the spec passed 10 of 10 runs (
--repeat-each 5 --retries 0,inboxproject).No screenshot test applies: this changes only an e2e test, not what users see.
No Linear issue.
🤖 Generated with Claude Code