Files
Michał Pierzchała cd9a7ce41b test(android): add comprehensive emulator E2E coverage (#1482)
* test(android): add catalog emulator smoke coverage

* test(android): use stable snapshot diff mutation

* test(android): assert actual back destination

* test(android): separate keyboard and fill IMEs

* fix(ci): keep Android timing report in one shell

* refactor(test): simplify simulator e2e coverage

* test(android): assert stable diff landmarks

* fix(android): release snapshot helper gracefully

* fix(android): fully release snapshot helper runtime

* test(android): report coverage classifications

* fix(android): stabilize accessibility root capture

* fix(android): bound UiAutomation connection

* ci: upload worktree daemon diagnostics

* fix(android): cancel stalled wait captures

* fix(android): bound helper fallback lifecycle

* fix(android): harden emulator e2e lifecycle

* fix: align e2e changes with kernel package

* test(android): prove alert helper reuse directly

* fix(android): cancel stalled settle captures

* fix(android): separate helper retirement budgets
2026-07-30 15:10:21 +02:00

28 lines
757 B
TypeScript

import { assertWaitText } from './live-assertions.ts';
import { type LiveContext, runStep } from './live-harness.ts';
export type AndroidEmulatorScenarioStart = {
ime: 'system' | 'test';
landmark: string;
url: string;
};
export async function prepareAndroidEmulatorScenario(
context: LiveContext,
start?: AndroidEmulatorScenarioStart,
): Promise<void> {
if (context.sessionOpen) {
await runStep(context, 'close prior scenario session', ['close']);
}
if (!start) return;
await runStep(context, `open deterministic fixture route with ${start.ime} IME`, [
'open',
context.appId,
'--relaunch',
...(start.ime === 'system' ? ['--no-test-ime'] : []),
start.url,
]);
await assertWaitText(context, start.landmark);
}