mirror of
https://github.com/block/buzz.git
synced 2026-11-13 04:41:12 +00:00
test(desktop): clear the parked error toast before the DM retry
The first send parks the pointer over the bottom-right error toast, which overlaps the send button; Sonner pauses its dismiss timer while the toaster is hovered, so the native retry click is intercepted for the full timeout. Move the cursor away and wait for the transient toast to clear naturally before retrying, mirroring the adjacent agent-startup-failure test. The injected first-send failure and every destination assertion are unchanged. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson <loganj@squareup.com>
This commit is contained in:
@@ -1063,6 +1063,15 @@ test("drops an expanded DM after the first message fails", async ({ page }) => {
|
||||
|
||||
await input.fill(retryMessage);
|
||||
const retryBaseline = commandsAfterFailure.length;
|
||||
// The first send left the cursor parked over the bottom-right error toast,
|
||||
// which overlaps the send button. Sonner pauses its dismiss timer while the
|
||||
// toaster is hovered, so move the cursor away and let the transient toast
|
||||
// clear before retrying — otherwise the retry click is intercepted for the
|
||||
// full timeout.
|
||||
await page.mouse.move(0, 0);
|
||||
await expect(page.locator("[data-sonner-toast]")).toHaveCount(0, {
|
||||
timeout: 10_000,
|
||||
});
|
||||
await page.getByTestId("send-message").click();
|
||||
|
||||
await expect(page.getByTestId("chat-title")).toHaveText("charlie");
|
||||
|
||||
Reference in New Issue
Block a user