diff --git a/src/tests/frontend-new/specs/collab_client.spec.ts b/src/tests/frontend-new/specs/collab_client.spec.ts index 9d4581438..12b89a104 100644 --- a/src/tests/frontend-new/specs/collab_client.spec.ts +++ b/src/tests/frontend-new/specs/collab_client.spec.ts @@ -30,6 +30,11 @@ test.describe('Messages in the COLLABROOM', function () { const div = body.locator('div').nth(lineNumber) + // Click into the editor before keypresses. Each test opens its own + // browser contexts via goToPad, which does not click — previously the + // page-load auto-focus put the editor in focus regardless, but that + // was removed in #7255 so the skip link could be Tab-reachable. + await body.click(); // simulate key presses to delete content await div.locator('span').selectText() // select all await page.keyboard.press('Backspace') // clear the first line diff --git a/src/tests/frontend-new/specs/enter.spec.ts b/src/tests/frontend-new/specs/enter.spec.ts index beb54203a..d5c30eb30 100644 --- a/src/tests/frontend-new/specs/enter.spec.ts +++ b/src/tests/frontend-new/specs/enter.spec.ts @@ -49,7 +49,11 @@ test.describe('enter keystroke', function () { for (let i = 0; i < numberOfLines; i++) { const expectedCount = originalLength + i + 1; const lastLine = padBody.locator('div').last(); - await lastLine.focus(); + // `.focus()` is a no-op on a