Files
jiapuapp/tests/f01-document-flow-contract.ps1
T
2026-07-20 17:23:13 +08:00

16 lines
694 B
PowerShell

$ErrorActionPreference = 'Stop'
$root = Split-Path $PSScriptRoot -Parent
$page = [System.IO.File]::ReadAllText((Join-Path $root 'pages/family/f01-family-feed.vue'), [System.Text.Encoding]::UTF8)
foreach ($expected in @('box-sizing: border-box','pointer-events: none')) {
if (-not $page.Contains($expected)) { throw "F01 document-flow contract missing: $expected" }
}
foreach ($selector in @('.feed-card__copy','.feed-state-card > view')) {
$escaped = [regex]::Escape($selector)
if ($page -match "(?s)$escaped\s*\{[^}]*position\s*:\s*(absolute|fixed|sticky)\s*;") {
throw "F01 normal content selector uses positioning: $selector"
}
}
Write-Output 'F01-DOCUMENT-FLOW-CONTRACT PASS'