Files
callstack__agent-device/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotPresentationInvariant.swift
Michał Pierzchała 868f8f90ee refactor(ios): extract snapshot presenter (#2206)
* refactor(ios): extract snapshot presenter

* refactor(ios): consume shared snapshot presenter

* fix: unblock snapshot presenter CI
2026-09-01 15:59:30 +02:00

20 lines
558 B
Swift

import AgentDeviceSnapshotPresentation
extension RunnerTests {
static func snapshotCaptureFailure(
for failure: SnapshotPresentationFailure
) -> SnapshotCaptureFailure {
SnapshotCaptureFailure(
code: failure.code,
message: failure.message,
hint: failure.hint,
qualityReasonCode: failure.qualityReasonCode
)
}
static func snapshotQualityReasonCode(for failure: SnapshotCaptureFailure) -> String {
failure.qualityReasonCode
?? (Self.isAxSnapshotFailure(failure) ? "ax-rejected" : "capture-failed")
}
}