12 lines
639 B
PowerShell
12 lines
639 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
|
|
|
|
$scanAt = $palletView.IndexOf('${scanCard}')
|
|
$cargoAt = $palletView.IndexOf('${cargoInfo}')
|
|
if ($scanAt -lt 0) { throw 'Pallet detail scan module is missing' }
|
|
if ($cargoAt -lt 0) { throw 'Pallet detail cargo information module is missing' }
|
|
if ($scanAt -gt $cargoAt) { throw 'Pallet detail scan module must appear before cargo information' }
|
|
|
|
Write-Output 'PASS: pallet detail scan module order contract'
|