Files
docs/悦/PDA(海外)/tests/pallet-detail-destination-label.test.ps1
2026-09-08 14:05:30 +08:00

13 lines
600 B
PowerShell

$ErrorActionPreference = 'Stop'
$html = Get-Content -Raw -Encoding UTF8 -LiteralPath (Join-Path $PSScriptRoot '..\assets\app.js')
$palletView = [regex]::Match($html, '(?s)function palletView\(\).*?(?=function startPallet\()').Value
if (-not $palletView.Contains('<span>${t(''destinationWarehouseShort'')}</span>')) {
throw 'Inbound pallet detail still uses the generic destination label'
}
if ($palletView.Contains('<span>${t(''destination'')}</span>')) {
throw 'Inbound pallet detail still renders the generic destination label'
}
Write-Output 'PASS: pallet detail destination label contract'