Files
orca/tests/e2e/browser-agent-input-focus-isolation.spec.ts
T

49 lines
1.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* Agent browser input must reach its page without touching the user's keyboard focus (#20595).
* Runs hidden; browser-agent-input-focus-isolation-native.spec.ts repeats it in a visible window.
*/
import { test } from './helpers/orca-app'
import {
runAgentClicksScenario,
runAgentCrossSiteFrameScenario,
runAgentKeysScenario,
runAgentShortcutsScenario
} from './helpers/browser-agent-focus-scenarios'
import { runAgentClickDuringUserCompositionScenario } from './helpers/browser-agent-composition-scenario'
test('agent keys and text reach the page without leaving the user’s terminal', async ({
orcaPage
}) => {
test.setTimeout(120_000)
await runAgentKeysScenario(orcaPage)
})
test('agent clicks and presses reach the page without leaving the user’s terminal', async ({
orcaPage
}) => {
test.setTimeout(120_000)
await runAgentClicksScenario(orcaPage)
})
test('agent shortcut keys stay in the page instead of running Orca shortcuts', async ({
orcaPage
}) => {
test.setTimeout(120_000)
await runAgentShortcutsScenario(orcaPage)
})
test('agent keys and text reach a focused cross-site frame without moving the user’s focus', async ({
orcaPage
}) => {
test.setTimeout(120_000)
await runAgentCrossSiteFrameScenario(orcaPage)
})
test('an agent click is refused while the user composes with an IME in the terminal', async ({
orcaPage
}) => {
test.setTimeout(120_000)
await runAgentClickDuringUserCompositionScenario(orcaPage)
})