Skip to content

test(dashboard): Wait for the answer before the answered-ask test leaves the Inbox - #3721

Merged
armcknight merged 3 commits into
mainfrom
armcknight/inbox-answer-e2e
Nov 19, 2026
Merged

armcknight merged 3 commits into
mainfrom
armcknight/inbox-answer-e2e

Conversation

@armcknight

@armcknight armcknight commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

#3704 fixed the "an answer says so in a toast, then on the row" test in inbox-answers.spec.ts after #3712. The test now opens Conversations to find the answered row. This PR first made the same fix. After a merge with main, 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. The page.goto to 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/actions and 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, inbox project).

No screenshot test applies: this changes only an e2e test, not what users see.

No Linear issue.

🤖 Generated with Claude Code

#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]>
@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Nov 18, 2026 11:44pm UTC

Request Review

@github-actions github-actions Bot added the risk: low PR risk score: low label Nov 18, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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
@armcknight armcknight changed the title test(dashboard): Check the answered ask in Conversations, not the Inbox test(dashboard): Wait for the answer before the answered-ask test leaves the Inbox Nov 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

8 screenshot changes — 8 changed · 0 added · 0 removed

Review screenshots in Frameshift

Automation Run Details · Desktop
Automation Run Details · Desktop
Changed
Automations Runs Filters · Desktop
Automations Runs Filters · Desktop
Changed
Conversation Attachment Zoom · Desktop
Conversation Attachment Zoom · Desktop
Changed
Conversation Event Log · Mobile
Conversation Event Log · Mobile
Changed
Conversation Question · Desktop
Conversation Question · Desktop
Changed
Conversation Question Light · Desktop
Conversation Question Light · Desktop
Changed
Show 2 more changed screenshots
Inbox Row Answer · Desktop
Inbox Row Answer · Desktop
Changed
Inbox Row Answer Light · Desktop
Inbox Row Answer Light · Desktop
Changed

@armcknight

Copy link
Copy Markdown
Member Author

@gricha this fixes a failing CI test that hit #3605

@armcknight
armcknight requested a review from gricha November 19, 2026 00:28
@armcknight
armcknight merged commit d9a8000 into main Nov 19, 2026
48 checks passed
@armcknight
armcknight deleted the armcknight/inbox-answer-e2e branch November 19, 2026 00:28
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

1 active deployment
Preview – junior-docs — abe3481a Deployed Nov 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants