29 lines
2.1 KiB
PowerShell
29 lines
2.1 KiB
PowerShell
$ErrorActionPreference = 'Stop'
|
|
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$evidencePath = Join-Path $root 'tests/manual/tac-android-accessibility-evidence.json'
|
|
|
|
if (-not (Test-Path -LiteralPath $evidencePath)) {
|
|
throw @'
|
|
ANDROID-AUTH-ACCESSIBILITY-RELEASE BLOCKED
|
|
- 当前只能证明认证页与 TAC 外壳具备静态语义、键盘焦点和 48px 操作目标,不能证明天爱拖动挑战可由 TalkBack、外接键盘或低精度操作完成。
|
|
- 后端/provider 尚未提供与同一租户、客户端、场景、手机号和 challengeId 原子绑定的非拖动等价验证路径。
|
|
- 尚无 MuMu Android 上的 TalkBack、外接键盘、返回键、动态播报、焦点恢复和 48dp 触控目标三方实测证据。
|
|
- 关闭条件:先落地安全等价的非拖动验证方式,再由三位评审在 MuMu Android 对同一候选包完成实测,并提交 tests/manual/tac-android-accessibility-evidence.json。
|
|
'@
|
|
}
|
|
|
|
$evidence = Get-Content -LiteralPath $evidencePath -Raw -Encoding UTF8 | ConvertFrom-Json
|
|
if ($evidence.schemaVersion -ne 1) { throw 'Android 无障碍证据 schemaVersion 必须为 1' }
|
|
if ($evidence.platform -ne 'MuMu Android') { throw 'Android 无障碍证据必须来自 MuMu Android' }
|
|
if ([string]$evidence.artifactSha256 -notmatch '^[a-fA-F0-9]{64}$') { throw 'Android 无障碍证据必须绑定候选包 SHA256' }
|
|
if ([string]$evidence.accessibleChallenge.type -match '^(?i:slider|drag)$') { throw '拖动挑战不能作为无障碍等价路径' }
|
|
if ($evidence.accessibleChallenge.serverBound -ne $true) { throw '无障碍等价挑战必须由服务端原子绑定并消费' }
|
|
foreach ($check in @('talkBackPass', 'externalKeyboardPass', 'androidBackPass', 'liveRegionPass', 'focusRestorePass', 'touchTarget48dpPass')) {
|
|
if ($evidence.checks.PSObject.Properties[$check].Value -ne $true) { throw "Android 无障碍证据未通过:$check" }
|
|
}
|
|
$reviewers = @($evidence.reviewers | Sort-Object -Unique)
|
|
if ($reviewers.Count -ne 3) { throw 'Android 无障碍证据必须由三位不同评审者共同签署' }
|
|
|
|
Write-Output 'ANDROID-AUTH-ACCESSIBILITY-RELEASE PASS'
|