9 lines
604 B
PowerShell
9 lines
604 B
PowerShell
$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 @('articleId', 'editorMode', 'simulateSaveFailure', 'query.articleId', '/pages/family/f05-article-detail?articleId=${articleId.value}')) {
|
|
if (-not $page.Contains($token)) { throw "F06 editor context missing: $token" }
|
|
}
|
|
if ($page.Contains('form.title.trim() === "保存失败"')) { throw 'F06 must not use visible title as a failure control channel' }
|
|
Write-Output 'F06-EDITOR-CONTEXT-CONTRACT PASS'
|