34 lines
865 B
PowerShell
34 lines
865 B
PowerShell
$ErrorActionPreference = 'Stop'
|
|
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$page = Get-Content -LiteralPath (Join-Path $root 'pages/tree/t05-edit-member.vue') -Raw -Encoding UTF8
|
|
|
|
foreach ($required in @(
|
|
'appApi.getPerson(',
|
|
'createRequestController',
|
|
'isRequestCancelled',
|
|
'editRequestController.abort()',
|
|
'let loadSequence = 0',
|
|
'appApi.updatePerson(',
|
|
'failedAction.value = "save"'
|
|
)) {
|
|
if (-not $page.Contains($required)) {
|
|
throw "T05 remote close contract missing: $required"
|
|
}
|
|
}
|
|
|
|
foreach ($forbidden in @(
|
|
'@/data/mock.js',
|
|
'findTreeMemberPresentationFixture',
|
|
'setTimeout(',
|
|
'editState.value = "preview"',
|
|
'"no-permission"',
|
|
'editState.value = "unavailable"'
|
|
)) {
|
|
if ($page.Contains($forbidden)) {
|
|
throw "T05 must not retain local preview owner: $forbidden"
|
|
}
|
|
}
|
|
|
|
Write-Output 'T05_MEMBER_REMOTE_WRITE_CONTRACT PASS'
|