完成50%
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$profile = Get-Content -LiteralPath (Join-Path $root 'pages/tree/t03-member-profile.vue') -Raw -Encoding utf8
|
||||
$form = Get-Content -LiteralPath (Join-Path $root 'components/tree/TreeMemberForm.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
|
||||
}
|
||||
|
||||
foreach ($rule in @(
|
||||
'(?s)\.member-heading > view:last-child text:last-child\s*\{[^}]*font-size:\s*23rpx;',
|
||||
@@ -13,13 +17,24 @@ foreach ($rule in @(
|
||||
if ($profile -notmatch $rule) { throw "T03 readable visual rule missing: $rule" }
|
||||
}
|
||||
|
||||
foreach ($rule in @(
|
||||
'(?s)\.member-form__copy\s*\{[^}]*font-size:\s*24rpx;',
|
||||
'(?s)\.member-field > text\s*\{[^}]*font-size:\s*24rpx;',
|
||||
'(?s)\.member-field input\s*\{[^}]*font-size:\s*24rpx;',
|
||||
'(?s)\.member-form__note\s*\{[^}]*font-size:\s*22rpx;'
|
||||
)) {
|
||||
if ($form -notmatch $rule) { throw "T04-T06 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 ($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"
|
||||
}
|
||||
}
|
||||
|
||||
Write-Output 'T03-T06-ALL-STATES-VISUAL-CONTRACT PASS'
|
||||
|
||||
Reference in New Issue
Block a user