From 50f0f3de26d2bfce41a9f212db73b0d0c9a0d492 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Wed, 21 Oct 2026 02:35:04 +0000 Subject: [PATCH] test(ui): wait for the targeted Reinstall button before the install click The "generic deletion blocks targeted install at confirmation" spec dispatches a popstate to set the target node, then clicks Reinstall with a script click. The click can run before the targeted page has rendered or while the button is still disabled, so no install request is sent and the poll on the install count times out. It failed 1 run in 10 with two workers and on every retry in CI. The spec now waits for the button to be enabled first. The assertions are unchanged. Assisted-by: Claude Code:claude-sonnet-5-5 playwright Signed-off-by: Ettore Di Giacinto --- .../http/react-ui/e2e/backends-installed-node-removal.spec.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/http/react-ui/e2e/backends-installed-node-removal.spec.js b/core/http/react-ui/e2e/backends-installed-node-removal.spec.js index b6bc50a79..c059a6d52 100644 --- a/core/http/react-ui/e2e/backends-installed-node-removal.spec.js +++ b/core/http/react-ui/e2e/backends-installed-node-removal.spec.js @@ -414,6 +414,10 @@ for (const beforeConfirm of [false, true]) test(`generic deletion blocks targete history.pushState({}, '', url); dispatchEvent(new PopStateEvent('popstate')) }, ids[0]) } + // The popstate renders the targeted page in a later commit. A click that + // lands before it reaches a button that is missing or still disabled and + // sends nothing. + await expect(reinstall(page)).toBeEnabled() await reinstall(page).evaluate(el => el.click()) await expect.poll(() => s.installs.length).toBe(1) if (beforeConfirm) {