60%
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$page = Get-Content -LiteralPath (Join-Path $root 'pages/family/f06-article-editor.vue') -Raw -Encoding UTF8
|
||||
|
||||
foreach ($token in @(
|
||||
'genealogyId.value = String(query.genealogyId || "");',
|
||||
'articleId.value = String(query.articleId || "");',
|
||||
'editorMode.value = String(query.mode || "");',
|
||||
'(editorMode.value === "create" && !articleId.value)',
|
||||
'(editorMode.value === "edit" && Boolean(article))',
|
||||
'findFamilyArticleFixture(genealogyId.value, articleId.value)',
|
||||
'returnTo("F05", {',
|
||||
'returnTo("F04", { genealogyId: genealogyId.value })'
|
||||
'genealogyId.value = String(query?.genealogyId || "");',
|
||||
'query?.mode !== "create"',
|
||||
'const hasValidContext = computed(() => /^[1-9]\d*$/.test(genealogyId.value));',
|
||||
'returnTo("F04", { genealogyId: genealogyId.value })',
|
||||
'appApi.createArticle(',
|
||||
'createRequestController',
|
||||
'isRequestCancelled'
|
||||
)) {
|
||||
if (-not $page.Contains($token)) { throw "F06 editor context missing: $token" }
|
||||
}
|
||||
foreach ($forbidden in @('simulateSaveFailure', 'form.title.trim() === "保存失败"', 'uni.redirectTo', '/pages/')) {
|
||||
if ($page.Contains($forbidden)) { throw "F06 must not retain a context or navigation bypass: $forbidden" }
|
||||
foreach ($forbidden in @('findFamilyArticleFixture', 'form.category', 'form.status', 'uni.redirectTo', '/pages/')) {
|
||||
if ($page.Contains($forbidden)) { throw "F06 must not retain a context, code-input, or navigation bypass: $forbidden" }
|
||||
}
|
||||
Write-Output 'F06-EDITOR-CONTEXT-CONTRACT PASS'
|
||||
|
||||
Reference in New Issue
Block a user