From de9563064f61b0999dfb2520f51d1354d347fef6 Mon Sep 17 00:00:00 2001 From: Banna Date: Tue, 6 Oct 2026 00:11:55 -0400 Subject: [PATCH] e2e: the inbox step waits for the second diagram's commit, not for a toast that is already showing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit main's CI failed after #43 (run 37411779781): the inbox showed 1 changed diagram where the test expects 2. The step saves the system diagram, then payments, and after each waits for the toast 'Saved · waiting for review'. The first toast stays 4.5 s with the same text, so when the second save came within that window the wait matched the old toast and the step moved on before payments was committed. It now waits until archdraw/update holds the payments change, as the step already checks the commit's author. Agent: Banna Signed-off-by: Banna --- app/e2e/app.e2e.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/e2e/app.e2e.ts b/app/e2e/app.e2e.ts index 3b0c90e..f313977 100644 --- a/app/e2e/app.e2e.ts +++ b/app/e2e/app.e2e.ts @@ -156,7 +156,13 @@ async function main() { await page.keyboard.press("Control+End") await page.keyboard.type('\nnode bank "Bank" below psp\n') await page.keyboard.press("Control+s") - await page.waitForSelector("[data-testid=toast]:has-text('waiting for review')") + // the first save's toast ("Saved · waiting for review") is still up for 4.5 s with the same text, so the toast + // cannot tell this save apart: wait for the payments change itself on the update branch + for (let t = Date.now(); ; ) { + if (sh(origin, "show", "archdraw/update:.archdraw/payments.archdraw").includes('node bank "Bank"')) break + if (Date.now() - t > 15_000) throw new Error("the payments change never reached archdraw/update") + await page.waitForTimeout(200) + } await page.click("[data-testid=toggle-source]") }) await step("the inbox lists the changed diagrams compactly, Approve on top; a click opens one's colored diff; Approve publishes", async () => {