Files
callstack__agent-device/test/integration/android-emulator-e2e/live-coverage-report.ts
Michał Pierzchała 32b9db2d7a test: add Android full emulator coverage (#1484)
* test: add Android full emulator coverage

* ci: package Android helpers before nightly coverage

* fix: harden Android nightly runtime evidence

* fix: expose trace artifacts in MCP schema

* style: format Android coverage manifest

* fix: address Android coverage review findings

* refactor: share live device coverage helpers

* fix: restore fixture landmarks in device smokes

* refactor: centralize live artifact assertions

* fix: normalize fixture canary visibility
2026-07-30 21:07:06 +02:00

40 lines
1.2 KiB
TypeScript

import {
assertCoverageComplete as assertLiveCoverageComplete,
writeCoverageReport as writeLiveCoverageReport,
} from '../live-device-e2e/coverage.ts';
import {
ANDROID_EMULATOR_BEHAVIOR_COVERAGE,
type AndroidEmulatorBehaviorId,
} from './behavior-coverage.ts';
import {
ANDROID_EMULATOR_COVERAGE_CLASSIFICATION_SUMMARY,
liveCommandsForScenario,
} from './coverage-manifest.ts';
import type { LiveContext } from './live-harness.ts';
export function assertCoverageComplete(
context: LiveContext,
selectedScenarios: readonly { id: string }[],
): void {
assertLiveCoverageComplete(
context,
selectedScenarios,
liveCommandsForScenario,
liveBehaviorsForScenario,
'Android emulator E2E coverage is incomplete',
);
}
export function writeCoverageReport(context: LiveContext): string {
return writeLiveCoverageReport(context, {
classificationSummary: ANDROID_EMULATOR_COVERAGE_CLASSIFICATION_SUMMARY,
tier: context.tier,
});
}
export function liveBehaviorsForScenario(scenarioId: string): AndroidEmulatorBehaviorId[] {
return Object.entries(ANDROID_EMULATOR_BEHAVIOR_COVERAGE)
.filter(([, entry]) => entry.owner === scenarioId)
.map(([behavior]) => behavior as AndroidEmulatorBehaviorId);
}