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
48 lines
1.5 KiB
TypeScript
48 lines
1.5 KiB
TypeScript
import {
|
|
assertCoverageComplete as assertLiveCoverageComplete,
|
|
computeMissingCoverage,
|
|
writeCoverageReport as writeLiveCoverageReport,
|
|
} from '../live-device-e2e/coverage.ts';
|
|
import {
|
|
IOS_SIMULATOR_BEHAVIOR_COVERAGE,
|
|
type IosSimulatorBehaviorId,
|
|
} from './behavior-coverage.ts';
|
|
import { liveCommandsForScenario } from './coverage-manifest.ts';
|
|
import type { LiveContext, Tier } from './live-harness.ts';
|
|
import { IOS_SIMULATOR_LIVE_SCENARIOS, type IosSimulatorScenario } from './scenarios.ts';
|
|
|
|
export function assertCoverageComplete(context: LiveContext): void {
|
|
assertLiveCoverageComplete(
|
|
context,
|
|
scenariosForTier(context.tier),
|
|
liveCommandsForScenario,
|
|
liveBehaviorsForScenario,
|
|
'iOS simulator E2E coverage is incomplete',
|
|
);
|
|
}
|
|
|
|
export function writeCoverageReport(context: LiveContext): void {
|
|
const scenarios = scenariosForTier(context.tier);
|
|
writeLiveCoverageReport(context, {
|
|
...computeMissingCoverage(
|
|
context,
|
|
scenarios,
|
|
liveCommandsForScenario,
|
|
liveBehaviorsForScenario,
|
|
),
|
|
tier: context.tier,
|
|
});
|
|
}
|
|
|
|
function scenariosForTier(tier: Tier): readonly IosSimulatorScenario[] {
|
|
return IOS_SIMULATOR_LIVE_SCENARIOS.filter(
|
|
(scenario) => scenario.tier === 'smoke' || tier === 'full',
|
|
);
|
|
}
|
|
|
|
export function liveBehaviorsForScenario(scenarioId: string): IosSimulatorBehaviorId[] {
|
|
return Object.entries(IOS_SIMULATOR_BEHAVIOR_COVERAGE)
|
|
.filter(([, entry]) => entry.level === 'live' && entry.owner === scenarioId)
|
|
.map(([behavior]) => behavior as IosSimulatorBehaviorId);
|
|
}
|