完成40%
This commit is contained in:
@@ -5,7 +5,7 @@ $files=@('pages/family/f01-family-feed.vue','pages/family/f02-publish-feed.vue',
|
||||
$pages=@{}
|
||||
foreach($file in $files){$content=Get-Content -LiteralPath(Join-Path $root $file)-Raw -Encoding utf8;if($content-match"@/utils/api\.js|\bappApi\b"){ throw "$file must not connect the API layer" };Assert-Contains $content 'ModulePageBackground' "$file must use its module background";$pages[$file]=$content}
|
||||
$g01=Get-Content -LiteralPath(Join-Path $root 'pages/genealogy/g01-my-genealogies.vue')-Raw -Encoding utf8
|
||||
if($g01-match"@/utils/api\.js|\bappApi\b"){ throw 'G01 must not connect the API layer' }
|
||||
if($g01-notmatch"@/utils/api\.js" -or $g01-notmatch"\bappApi\.getMyGenealogies\b"){ throw 'G01 must consume its tested remote list owner' }
|
||||
Assert-Contains $g01 'GenealogyPageBackground' 'G01 must use its genealogy background'
|
||||
if($g01 -notmatch '(?s)<PageHeader\s+root\s+notice\s+title="我的家谱"[^>]+@notice="toNotifications"') { throw 'G01 root header must expose the notice action without a back control' }
|
||||
if($pages['pages/family/f01-family-feed.vue'] -notmatch '(?s)<PageHeader\s+root\s+title="家族动态"\s+:action="hasValidContext \? ''发布'' : ''''"\s+@action="toPublish"') { throw 'F01 root header must expose publish only for a valid family context and without a back control' }
|
||||
|
||||
Reference in New Issue
Block a user