16 lines
1.2 KiB
PowerShell
16 lines
1.2 KiB
PowerShell
$ErrorActionPreference = 'Stop'
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$page = Get-Content -LiteralPath (Join-Path $root 'pages/genealogy/g09-my-applications.vue') -Raw -Encoding utf8
|
|
$style = [regex]::Match($page, '(?s)<style[^>]*>(.*?)</style>').Groups[1].Value
|
|
$positions = [regex]::Matches([regex]::Replace($style, '(?s)/\*.*?\*/', ''), '(?m)\bposition\s*:\s*([^;]+);')
|
|
if ($positions.Count -ne 0) { throw "G09 application list must use document flow; found $($positions.Count) position declarations" }
|
|
foreach ($required in @(
|
|
'background: url("/static/assets/modules/genealogy/transparent/list-slip-frame.png")',
|
|
'background: url("/static/assets/foundation/transparent/a01-scroll-primary-v3.png")'
|
|
)) { if ($page -notmatch [regex]::Escape($required)) { throw "G09 is missing real asset background: $required" } }
|
|
if ($page -match 'class="application-card__skin"') { throw 'G09 must not retain decorative card image layers' }
|
|
if ($page -notmatch '(?s)\.application-card__status\s*\{[^}]*grid-row:\s*2;[^}]*grid-column:\s*2;' -or $page -notmatch '(?s)\.application-card__action\s*\{[^}]*grid-row:\s*3;[^}]*grid-column:\s*2;') {
|
|
throw 'G09 status and action must occupy separate data-driven rows'
|
|
}
|
|
Write-Output 'G09-DOCUMENT-FLOW-CONTRACT PASS'
|