From fd8123d4281da6e55a4172620a86ab17ca34864a Mon Sep 17 00:00:00 2001 From: Coracle-Bot Date: Sun, 20 Sep 2026 06:38:12 +0000 Subject: [PATCH] Wait out the app second before Bob replies in US-024 --- e2e/specs/rooms.spec.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/e2e/specs/rooms.spec.ts b/e2e/specs/rooms.spec.ts index b080eea9..7dd6c7e8 100644 --- a/e2e/specs/rooms.spec.ts +++ b/e2e/specs/rooms.spec.ts @@ -1,5 +1,5 @@ import {neventEncode, npubEncode} from "nostr-tools/nip19" -import {DAY, HOUR, MINUTE, WEEK, bech32ToHex} from "@welshman/lib" +import {DAY, HOUR, MINUTE, WEEK, bech32ToHex, now} from "@welshman/lib" import {getLnUrl} from "@welshman/util" import {Profile, displayPubkey} from "@welshman/domain" import type {Locator, Page} from "@playwright/test" @@ -577,9 +577,13 @@ test("US-024 edit or delete a message you sent", async ({seed, as}) => { await expect(message(bob, "we sail at dwan")).toBeVisible() // Her edit republishes with her original timestamp, and two messages sharing a second are - // ordered by event id (US-118) -- which the edit changes. His reply lands in a later second, so + // ordered by event id (US-118) -- which the edit changes. His reply waits her second out, so // the order asserted below is about the timestamp rather than a coin flip on the new id. - await alice.waitForTimeout(1000 - (Date.now() % 1000) + 50) + const sent = now() + + while (now() === sent) { + await alice.waitForTimeout(50) + } await send(bob, "spelling?")