Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions e2e/specs/mock/scenarios/unseen-replies.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,16 @@ test.describe('unseen replies', () => {
await selectMockEndpoint(second, MOCK_ENDPOINTS[0]);
await second.bringToFront();
await unfocus(page);
const acknowledged = second.waitForResponse(
(response) =>
new URL(response.url()).pathname === '/api/convos/seen' &&
response.request().method() === 'POST',
);
await sendMessageAndWaitForCompletion(second, `E2E_REPLY:withheld-${id.slice(0, 8)}`);
/* The reply tab acknowledges the reply it just rendered. Restoring the unread baseline
* before that write lands is overwritten by it, and the first tab then polls a
* conversation the server considers read, so its dot never appears. */
await acknowledged;
const completed = await readConversation(id);
if (completed?.lastResponseAt == null) throw new Error('Reply timestamp was not saved');
completedReplyAt = new Date(completed.lastResponseAt);
Expand Down
Loading