Files
jiapuapp/tests/g03-document-flow-contract.ps1
T
2026-07-24 18:03:14 +08:00

21 lines
845 B
PowerShell

$ErrorActionPreference = 'Stop'
$root = Split-Path -Parent $PSScriptRoot
$page = Get-Content -LiteralPath (Join-Path $root 'pages/genealogy/g03-create-genealogy.vue') -Raw -Encoding utf8
$style = [regex]::Match($page, '(?s)<style[^>]*>(.*?)</style>').Groups[1].Value
foreach ($required in @(
'@include adaptive.adaptive-genealogy-state-panel;',
'.create-card',
'.field-row',
'.region-sheet',
'.access-rule__option--active',
'.create-card .app-button'
)) {
if ($page -notmatch [regex]::Escape($required)) { throw "G03 create form missing: $required" }
}
foreach ($forbidden in @('flow-header', 'root-header-cinnabar.jpg', 'duplicate-reminder', 'flow-success-dialog')) {
if ($page -match [regex]::Escape($forbidden)) { throw "G03 must not retain retired flow token: $forbidden" }
}
Write-Output 'G03-DOCUMENT-FLOW-CONTRACT PASS'