25 lines
1.1 KiB
PowerShell
25 lines
1.1 KiB
PowerShell
$ErrorActionPreference = 'Stop'
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$mine = Get-Content -LiteralPath (Join-Path $root 'pages/genealogy/g09-my-applications.vue') -Raw -Encoding UTF8
|
|
$review = Get-Content -LiteralPath (Join-Path $root 'pages/genealogy/g10-application-review.vue') -Raw -Encoding UTF8
|
|
foreach ($token in @('query.status', 'LOCAL_WITHDRAWN:', 'target.status = "LOCAL_WITHDRAWN"')) {
|
|
if (-not $mine.Contains($token)) { throw "G09 business state missing: $token" }
|
|
}
|
|
if ($mine.Contains('previous=withdrawn') -or $mine.Contains('previous:')) { throw 'G09 must not export application history as a route parameter' }
|
|
foreach ($token in @(
|
|
'rejectionReason',
|
|
'rejectionError',
|
|
'class="rejection-field"',
|
|
'current.item.rejectionReason',
|
|
'id="g10-rejection-reason"',
|
|
':aria-invalid="!!rejectionError"',
|
|
'aria-describedby="g10-rejection-error"',
|
|
'id="g10-rejection-error"',
|
|
'role="alert"',
|
|
':focus="rejectionFocused"',
|
|
'await nextTick();'
|
|
)) {
|
|
if (-not $review.Contains($token)) { throw "G10 rejection contract missing: $token" }
|
|
}
|
|
Write-Output 'G09-G10-BUSINESS-STATE-CONTRACT PASS'
|