Files
jiapuapp/tests/t03-document-flow-contract.ps1
T

18 lines
1.0 KiB
PowerShell

$ErrorActionPreference = 'Stop'
$root = Split-Path -Parent $PSScriptRoot
$page = Get-Content -LiteralPath (Join-Path $root 'pages/tree/t03-member-profile.vue') -Raw -Encoding utf8
$style = [regex]::Match($page, '(?s)<style[^>]*>(.*?)</style>').Groups[1].Value
if ([regex]::IsMatch($style, '(?m)\bposition\s*:')) { throw 'T03 member profile must use document flow throughout' }
foreach ($required in @(
'@include adaptive-tree-panel;',
'@include adaptive-tree-field;',
'@include adaptive-genealogy-list-card;',
'@include adaptive-scroll-button(primary);',
'background: url("/static/assets/modules/genealogy/transparent/current-seal-frame.png")'
)) { if ($page -notmatch [regex]::Escape($required)) { throw "T03 is missing adaptive asset surface: $required" } }
$memberPanelStyle = [regex]::Match($style, '(?ms)^\s*\.member-panel\s*\{(?<body>.*?)\}').Groups['body'].Value
if ($memberPanelStyle -match '\bmin-height\s*:') {
throw 'T03 member panel height must be driven by its current content'
}
Write-Output 'T03-DOCUMENT-FLOW-CONTRACT PASS'