15 lines
951 B
PowerShell
15 lines
951 B
PowerShell
$ErrorActionPreference = 'Stop'
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$search = Get-Content -LiteralPath (Join-Path $root 'pages/genealogy/g06-search-genealogies.vue') -Raw -Encoding UTF8
|
|
$join = Get-Content -LiteralPath (Join-Path $root 'pages/genealogy/g08-join-application.vue') -Raw -Encoding UTF8
|
|
foreach ($required in @('genealogyId: item.id', 'genealogyName: item.name')) {
|
|
if (-not $search.Contains($required)) { throw "G06 must pass application context: $required" }
|
|
}
|
|
foreach ($required in @('query?.genealogyId', 'query?.genealogyName', 'appApi.applyToJoin')) {
|
|
if (-not $join.Contains($required)) { throw "G08 must consume real application context: $required" }
|
|
}
|
|
foreach ($retired in @('previousRelation', 'query.previous', 'decodeURIComponent', 'findGenealogyFixture', 'genealogyPreview')) {
|
|
if ($join.Contains($retired)) { throw "G08 must not consume retired context: $retired" }
|
|
}
|
|
Write-Output 'G06-G08-CONTEXT-CONTRACT PASS'
|