34 lines
861 B
PowerShell
34 lines
861 B
PowerShell
$ErrorActionPreference = 'Stop'
|
|
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$page = Get-Content -LiteralPath (Join-Path $root 'pages/tree/t06-edit-relationship.vue') -Raw -Encoding UTF8
|
|
|
|
foreach ($required in @(
|
|
'class="rank-page"',
|
|
'appApi.getPerson(',
|
|
'createRequestController',
|
|
'isRequestCancelled',
|
|
'rankRequestController.abort()',
|
|
'let loadSequence = 0',
|
|
'query.mode !== "rank"',
|
|
'rankState.value = "unavailable"'
|
|
)) {
|
|
if (-not $page.Contains($required)) {
|
|
throw "T06 rank remote close contract missing: $required"
|
|
}
|
|
}
|
|
|
|
foreach ($forbidden in @(
|
|
'@/data/mock.js',
|
|
'listTreeMemberFixtures',
|
|
'setTimeout(',
|
|
'relationshipOptions',
|
|
'relationshipState'
|
|
)) {
|
|
if ($page.Contains($forbidden)) {
|
|
throw "T06 must not retain relationship local-preview owner: $forbidden"
|
|
}
|
|
}
|
|
|
|
Write-Output 'T06-RANK-REMOTE-CLOSE-CONTRACT PASS'
|