mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
9d7d60c5e0
* test(coverage): declare every public command's six platform coverage judgments once One row per public command in test/integration/command-coverage/declarations.ts carries the android-emulator, ios-simulator, macOS, tvOS, web and Linux classifications with the same fields the six per-platform manifests use today. Each platform's Record<PublicCommand, ...> is projected from that table at load time by a small per-platform view module, so no projected record is committed. No judgment is derived from another platform's: all six stay authored per command. * test(coverage): read the projected per-platform coverage view The six coverage smoke tests, live harnesses and coverage reports now import the platform view module that projects the declaration table. Both the depgraph blast-radius query and the device-lane test follow the iOS and macOS paths. * test(coverage): delete the six per-platform coverage manifests Their rows now live once, per command, in the declaration table; each platform's record is projected from it at load time. * fix(check-affected): extend macos-coverage and integration-node ownership to command-coverage/ test/integration/command-coverage/declarations.ts now carries the per-command coverage judgments that used to live directly under test/integration/macos-e2e/. Its nested path wasn't matched by macosCoverageOwnership (top-level or macos-e2e/ only) or isNodeIntegrationPath (no nested segments), so it fell through to vitest-related, which can't actually run its node --test consumers. Extend both rules to also match test/integration/command-coverage/.
44 lines
2.1 KiB
TypeScript
44 lines
2.1 KiB
TypeScript
import { projectCoverage } from '../command-coverage/declarations.ts';
|
|
import type { PublicCommand } from '../command-coverage/entries.ts';
|
|
import { buildCoverageClassificationSummary } from '../support/coverage-classification.ts';
|
|
|
|
export {
|
|
WEB_COVERAGE_GAP_ISSUE,
|
|
WEB_SMOKE_EVIDENCE,
|
|
WEB_SMOKE_TEST_NAME,
|
|
} from '../command-coverage/evidence.ts';
|
|
|
|
/**
|
|
* One primary, observable owner for every public command on the managed web target.
|
|
*
|
|
* Live rows are limited to the existing web-smoke scenario; they do not widen its scope. Contract
|
|
* rows do not
|
|
* turn fixture-backed tests into live E2E claims, and cite one of two evidence shapes: a
|
|
* web-specific unit/provider test exercising the command's own operation (e.g. `click`, `hover`);
|
|
* or, for a command whose handler has no platform branch at all, a test proving its existing
|
|
* generic/shared code path runs correctly for a web-backed session or device (e.g. `artifacts`,
|
|
* `batch`, `diff`, `press`), OR the web runtime's own unavailable-operation fact, a real and
|
|
* permanent denial (e.g. `boot`, `push`).
|
|
*
|
|
* #1900 closed 14 of the 15 known-gap rows this manifest originally carried using the shapes
|
|
* above. `test` stays `known-gap`: its declared-platform filter structurally excludes web
|
|
* (`ReplayTestPlatform = Exclude<PlatformSelector, 'web'>`), so `test --platform web` can never
|
|
* select a script — real, tested, command-specific behavior (see
|
|
* `session-command-replay.test.ts`), but evidence of what the command cannot do, not executable
|
|
* evidence that it works on web. Closing this row needs a separate product decision: either web
|
|
* replay-test support, or an explicit denial.
|
|
*
|
|
* Projected from the command-owned declaration table; the rows are authored there.
|
|
*/
|
|
export const WEB_PLATFORM_COVERAGE = projectCoverage('web');
|
|
|
|
export const WEB_PLATFORM_COVERAGE_CLASSIFICATION_SUMMARY = buildCoverageClassificationSummary(
|
|
Object.values(WEB_PLATFORM_COVERAGE),
|
|
);
|
|
|
|
export function liveCommandsForWebSmoke(): PublicCommand[] {
|
|
return Object.entries(WEB_PLATFORM_COVERAGE)
|
|
.filter(([, entry]) => entry.level === 'live')
|
|
.map(([command]) => command as PublicCommand);
|
|
}
|