mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
cd9a7ce41b
* 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
38 lines
1.5 KiB
TypeScript
38 lines
1.5 KiB
TypeScript
import { PUBLIC_COMMANDS } from '../../../src/command-catalog.ts';
|
|
import { assertJsonContains } from './live-assertions.ts';
|
|
import { type LiveContext, runStep, verifyCommand } from './live-harness.ts';
|
|
|
|
const C = PUBLIC_COMMANDS;
|
|
|
|
export async function assertInventoryAndInstall(context: LiveContext): Promise<void> {
|
|
const devices = await runStep(context, 'list Android devices', ['devices']);
|
|
assertJsonContains(
|
|
devices,
|
|
context.serial,
|
|
'device inventory should include selected emulator serial',
|
|
);
|
|
verifyCommand(context, C.devices, 'selected emulator serial appears in typed inventory');
|
|
|
|
const capabilities = await runStep(context, 'read Android capabilities', ['capabilities']);
|
|
for (const command of ['click', 'fill', 'snapshot', 'type']) {
|
|
assertJsonContains(capabilities, command, `capabilities should include ${command}`);
|
|
}
|
|
verifyCommand(
|
|
context,
|
|
C.capabilities,
|
|
'typed capability response includes fixture-driving commands',
|
|
);
|
|
|
|
const apps = await runStep(context, 'list installed user apps', ['apps']);
|
|
assertJsonContains(apps, context.appId, 'app inventory should include fixture package');
|
|
verifyCommand(context, C.apps, 'installed fixture package appears in app inventory');
|
|
|
|
const doctor = await runStep(context, 'doctor fixture package discovery', [
|
|
'doctor',
|
|
'--app',
|
|
context.appId,
|
|
]);
|
|
assertJsonContains(doctor, context.appId, 'doctor should discover fixture package');
|
|
verifyCommand(context, C.doctor, 'doctor discovers the installed fixture package');
|
|
}
|