Files
docs/悦/PDA(海外)/tests/relabel-box-progress.test.ps1
2026-09-08 14:05:30 +08:00

20 lines
736 B
PowerShell

$ErrorActionPreference = 'Stop'
$html = Get-Content -Raw -LiteralPath (Join-Path $PSScriptRoot '..\assets\app.js')
$detailView = [regex]::Match($html, '(?s)function relabelDetailView\(mode\).*?(?=function relabelBoxView)').Value
if (-not $detailView) { throw 'Relabel detail view function not found' }
if (-not $detailView.Contains("t('relabelProgress')")) {
throw 'Relabel detail view does not render relabel progress'
}
if (-not $detailView.Contains('progress-line')) {
throw 'Relabel progress should use the standard progress line'
}
if (-not $detailView.Contains('relabelBoxTitle')) {
throw 'Relabel detail view no longer distinguishes carton-mark mode'
}
Write-Output 'PASS: carton-mark relabel detail exposes progress'