mirror of
https://github.com/callstack/agent-device.git
synced 2026-09-14 20:06:34 +08:00
868f8f90ee
* refactor(ios): extract snapshot presenter * refactor(ios): consume shared snapshot presenter * fix: unblock snapshot presenter CI
20 lines
558 B
Swift
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")
|
|
}
|
|
}
|