18 lines
752 B
PowerShell
18 lines
752 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('relabel-scan-card')) {
|
|
throw 'Relabel detail view should expose a dedicated scan card after hiding the summary card'
|
|
}
|
|
|
|
if ($detailView.Contains('p.customer') -or
|
|
$detailView.Contains('p.container') -or
|
|
$detailView.Contains('p.inboundCode')) {
|
|
throw 'Relabel detail view still renders the hidden summary card content'
|
|
}
|
|
|
|
Write-Output 'PASS: relabel detail summary is hidden for carton-mark and SKU pages'
|