完成70%
This commit is contained in:
@@ -1,40 +1,30 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$profile = Get-Content -LiteralPath (Join-Path $root 'pages/tree/t03-member-profile.vue') -Raw -Encoding utf8
|
||||
$forms = [ordered]@{
|
||||
'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
|
||||
$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;',
|
||||
'(?s)\.member-relatives\s*\{[^}]*font-size:\s*23rpx;',
|
||||
'(?s)\.member-error > text:nth-child\(2\)\s*\{[^}]*font-size:\s*24rpx;'
|
||||
'(?s)\.member-info-row text\s*\{[^}]*font-size:\s*23rpx;'
|
||||
)) {
|
||||
if ($profile -notmatch $rule) { throw "T03 readable visual rule missing: $rule" }
|
||||
if ($pages.T03 -notmatch $rule) { throw "T03 readable visual rule missing: $rule" }
|
||||
}
|
||||
|
||||
foreach ($entry in $forms.GetEnumerator()) {
|
||||
foreach ($token in @(
|
||||
'@include adaptive.adaptive-tree-panel;',
|
||||
'@include adaptive.adaptive-tree-field;',
|
||||
'grid-template-columns: auto minmax(0, 1fr)'
|
||||
)) {
|
||||
if (-not $entry.Value.Contains($token)) { throw "$($entry.Key) active form layout token missing: $token" }
|
||||
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" }
|
||||
}
|
||||
foreach ($rule in @(
|
||||
'(?s)\.form-copy,\s*\.form-note\s*\{[^}]*font-size:\s*24rpx;',
|
||||
'(?s)\.form-field[^{]*text:first-child\s*\{[^}]*font-size:\s*24rpx;',
|
||||
'(?s)\.form-field[^{]*(?:input|text:last-child)[^{]*\{[^}]*font-size:\s*24rpx;'
|
||||
)) {
|
||||
if ($entry.Value -notmatch $rule) { throw "$($entry.Key) readable visual rule missing: $rule" }
|
||||
}
|
||||
if ($entry.Value -match '(?m)\bposition\s*:') {
|
||||
throw "$($entry.Key) must keep active form content in document flow"
|
||||
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'
|
||||
|
||||
Reference in New Issue
Block a user