31 lines
1.5 KiB
PowerShell
31 lines
1.5 KiB
PowerShell
$ErrorActionPreference = 'Stop'
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$pages = @{
|
|
T03 = Get-Content -LiteralPath (Join-Path $root 'pages/tree/t03-member-profile.vue') -Raw -Encoding UTF8
|
|
T04 = Get-Content -LiteralPath (Join-Path $root 'pages/tree/t04-add-relative.vue') -Raw -Encoding UTF8
|
|
T05 = Get-Content -LiteralPath (Join-Path $root 'pages/tree/t05-edit-member.vue') -Raw -Encoding UTF8
|
|
T06 = Get-Content -LiteralPath (Join-Path $root 'pages/tree/t06-edit-relationship.vue') -Raw -Encoding UTF8
|
|
}
|
|
|
|
foreach ($rule in @(
|
|
'(?s)\.member-heading > view:last-child text:last-child\s*\{[^}]*font-size:\s*23rpx;',
|
|
'(?s)\.member-section-title\s*\{[^}]*font-size:\s*24rpx;',
|
|
'(?s)\.member-info-row text\s*\{[^}]*font-size:\s*23rpx;'
|
|
)) {
|
|
if ($pages.T03 -notmatch $rule) { throw "T03 readable visual rule missing: $rule" }
|
|
}
|
|
|
|
foreach ($key in @('T04', 'T05', 'T06')) {
|
|
$content = $pages[$key]
|
|
foreach ($token in @('@include adaptive.adaptive-tree-panel;', '@include adaptive.adaptive-tree-field;', 'grid-template-columns: auto minmax(0, 1fr)')) {
|
|
if (-not $content.Contains($token)) { throw "$key active form layout token missing: $token" }
|
|
}
|
|
if ($content -match '(?m)^\s*\.rank-form\s*\{[^}]*\bposition\s*:|(?m)^\s*\.add-relative-form\s*\{[^}]*\bposition\s*:|(?m)^\s*\.edit-member-form\s*\{[^}]*\bposition\s*:') {
|
|
throw "$key must keep active content in document flow"
|
|
}
|
|
}
|
|
|
|
if ($pages.T06 -notmatch '(?s)\.form-copy\s*\{[^}]*font-size:\s*24rpx;') { throw 'T06 rank copy must remain readable' }
|
|
|
|
Write-Output 'T03-T06-ALL-STATES-VISUAL-CONTRACT PASS'
|