Files
jiapuapp/tests/g09-all-states-visual-contract.ps1
T
2026-07-20 06:52:33 +08:00

19 lines
845 B
PowerShell

$ErrorActionPreference = 'Stop'
$root = Split-Path -Parent $PSScriptRoot
$page = Get-Content -LiteralPath (Join-Path $root 'pages/genealogy/g09-my-applications.vue') -Raw -Encoding utf8
$rules = @(
'(?s)\.application-intro text:last-child\s*\{[^}]*font-size:\s*24rpx;',
'(?s)\.application-card__time\s*\{[^}]*font-size:\s*23rpx;',
'(?s)\.application-card__relation\s*\{[^}]*font-size:\s*24rpx;',
'(?s)\.application-card__status\s*\{[^}]*font-size:\s*25rpx;',
'(?s)\.application-card__hint\s*\{[^}]*font-size:\s*23rpx;',
'(?s)\.application-card__action\s*\{[^}]*font-size:\s*23rpx;',
'(?s)\.application-state-card__copy text:last-child\s*\{[^}]*font-size:\s*24rpx;'
)
foreach ($rule in $rules) {
if ($page -notmatch $rule) { throw "G09 readable visual rule missing: $rule" }
}
Write-Output 'G09-ALL-STATES-VISUAL-CONTRACT PASS'