From 776be625c8567867850dbf4d2aa204a4e36b5eab Mon Sep 17 00:00:00 2001 From: Jinwoo Hong <73622457+Jinwoo-H@users.noreply.github.com> Date: Mon, 6 Jul 2026 18:04:02 -0400 Subject: [PATCH] feat(win-update-e2e): submit worktree composer via Create button prefix / Ctrl+Enter --- tools/win-update-e2e/app-driver.mjs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tools/win-update-e2e/app-driver.mjs b/tools/win-update-e2e/app-driver.mjs index bdbf0ddca..f10040425 100644 --- a/tools/win-update-e2e/app-driver.mjs +++ b/tools/win-update-e2e/app-driver.mjs @@ -150,16 +150,24 @@ async function createWorkspaceFromSeededRepo(page, timeoutMs) { .first() .click({ timeout: timeoutMs }) // Choose the plain-terminal mode (best-effort — if it is already the default - // or the label differs, the create click below still produces a worktree). + // or the label differs, the create below still produces a worktree). await page .getByRole('button', { name: 'Blank Terminal' }) .first() .click({ timeout: 15_000 }) .catch(() => {}) - await page - .getByRole('button', { name: 'Create worktree', exact: true }) - .first() + // Submit. The create button's accessible name carries the shortcut hint + // ("Create worktreeCtrl"), so match by prefix; fall back to the documented + // Ctrl+Enter shortcut if the button is not directly clickable. + const created = await page + .getByRole('button', { name: /^Create worktree/ }) + .last() .click({ timeout: 15_000 }) + .then(() => true) + .catch(() => false) + if (!created) { + await page.keyboard.press('Control+Enter') + } } /** Create a new terminal tab via the New tab menu. Returns the count after. */