14 lines
895 B
PowerShell
14 lines
895 B
PowerShell
$ErrorActionPreference = 'Stop'
|
|
$html = Get-Content -Raw -Encoding UTF8 -LiteralPath (Join-Path $PSScriptRoot '..\assets\app.js')
|
|
$detailView = [regex]::Match($html, '(?s)function consolidationDetailView\(\).*?(?=const basePalletView=)').Value
|
|
|
|
if (-not $detailView) { throw 'Consolidation detail view is missing' }
|
|
|
|
if (-not $detailView.Contains("t('scanPalletLabel')")) { throw 'Consolidation scan module must use pallet-label copy' }
|
|
if (-not $detailView.Contains('selectorClassName')) { throw 'Consolidation detail must remove the pallet label selector module' }
|
|
$scanAt = $detailView.IndexOf('consolidation-scan-card')
|
|
$currentAt = $detailView.IndexOf('current-pallet-card')
|
|
if ($scanAt -lt 0 -or $currentAt -lt 0 -or $scanAt -gt $currentAt) { throw 'Consolidation scan module must remain above current pallet details' }
|
|
|
|
Write-Output 'PASS: consolidation detail scan-first order contract'
|