19 lines
1.1 KiB
PowerShell
19 lines
1.1 KiB
PowerShell
$ErrorActionPreference = 'Stop'
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$page = Get-Content -LiteralPath (Join-Path $root 'pages/genealogy/g08-join-application.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 "G08 join flow must use document flow; found $($positions.Count) position declarations" }
|
|
foreach ($required in @(
|
|
'<GenealogyPageBackground />',
|
|
'@include adaptive-genealogy-state-panel;',
|
|
'@include adaptive-genealogy-form-field;',
|
|
'appApi.applyToJoin',
|
|
'createRequestController',
|
|
'auto-height'
|
|
)) { if ($page -notmatch [regex]::Escape($required)) { throw "G08 is missing: $required" } }
|
|
foreach ($retired in @('findGenealogyFixture', 'join-panel__skin', 'uni.showToast', 'uni.showModal')) {
|
|
if ($page -match [regex]::Escape($retired)) { throw "G08 must not retain retired local-preview owner: $retired" }
|
|
}
|
|
Write-Output 'G08-DOCUMENT-FLOW-CONTRACT PASS'
|