From 0a093e9a12a539db6e2caa80969699018e39a80a Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Mon, 16 Nov 2026 12:50:05 -0800 Subject: [PATCH 1/2] test(e2e): wait for the beta-args answer before asserting the pill is gone get-core-beta-args is recorded when the handler starts, and the pill keeps showing the previous answer until the new one arrives. On a slow Linux runner the check ran against that stale pill and failed (seen on PR 2151, run 43952857129). Wait for the pill to clear, then hold for two seconds as before. --- e2e/core-beta-args-pill-commit.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/e2e/core-beta-args-pill-commit.test.ts b/e2e/core-beta-args-pill-commit.test.ts index 3eb57a291..e1b7ce77c 100644 --- a/e2e/core-beta-args-pill-commit.test.ts +++ b/e2e/core-beta-args-pill-commit.test.ts @@ -150,6 +150,9 @@ async function expectAnsweredWithNoPill(popup: WebContentsPage, message: string) intervals: [100, 200] }) .toBeGreaterThanOrEqual(2) + await expect + .poll(() => pillLabel(popup), { message, timeout: 15_000, intervals: [100, 200] }) + .toBeNull() const deadline = Date.now() + 2_000 while (Date.now() < deadline) { expect(await pillLabel(popup), message).toBeNull() From fd24416b4199033fa7b205e4c2fc2a12c233c50c Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Mon, 16 Nov 2026 12:53:38 -0800 Subject: [PATCH 2/2] test(e2e): treat the loading placeholder as unanswered when waiting for the beta-args answer Waiting for the pill to clear also passed while the request ran past the 150 ms loading delay, since the placeholder replaces the pill. The hold check that follows then failed on the placeholder. The wait now reads the slot as pill, loading or empty and passes only on empty, which with both requests started can only come from the latest answer. --- e2e/core-beta-args-pill-commit.test.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/e2e/core-beta-args-pill-commit.test.ts b/e2e/core-beta-args-pill-commit.test.ts index e1b7ce77c..57a7c527f 100644 --- a/e2e/core-beta-args-pill-commit.test.ts +++ b/e2e/core-beta-args-pill-commit.test.ts @@ -143,6 +143,11 @@ async function openCounted(): Promise { return openStartupArgs() } +async function betaArgsSlot(popup: WebContentsPage): Promise<'pill' | 'loading' | 'empty'> { + if (await popup.exists(`${ARGS_FIELD} .beta-args-loading`)) return 'loading' + return (await pillLabel(popup)) === null ? 'empty' : 'pill' +} + async function expectAnsweredWithNoPill(popup: WebContentsPage, message: string): Promise { await expect .poll(async () => (await getIpcInvocations(ctx.app, 'get-core-beta-args')).length, { @@ -151,12 +156,11 @@ async function expectAnsweredWithNoPill(popup: WebContentsPage, message: string) }) .toBeGreaterThanOrEqual(2) await expect - .poll(() => pillLabel(popup), { message, timeout: 15_000, intervals: [100, 200] }) - .toBeNull() + .poll(() => betaArgsSlot(popup), { message, timeout: 15_000, intervals: [100, 200] }) + .toBe('empty') const deadline = Date.now() + 2_000 while (Date.now() < deadline) { - expect(await pillLabel(popup), message).toBeNull() - expect(await popup.exists(`${ARGS_FIELD} .beta-args-loading`), message).toBe(false) + expect(await betaArgsSlot(popup), message).toBe('empty') await new Promise((resolve) => setTimeout(resolve, 200)) } }