mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
32b9db2d7a
* 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
40 lines
1.2 KiB
TypeScript
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);
|
|
}
|