60%
This commit is contained in:
@@ -2,11 +2,13 @@ $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 ($token in @('genealogyName:', 'previous:', 'encodeURIComponent(item.name)')) {
|
||||
if ($search.Contains($token)) { throw "G06 must not propagate retired context: $token" }
|
||||
foreach ($required in @('genealogyId: item.id', 'genealogyName: item.name')) {
|
||||
if (-not $search.Contains($required)) { throw "G06 must pass application context: $required" }
|
||||
}
|
||||
foreach ($token in @('previousRelation', 'query.genealogyName', 'query.previous', 'decodeURIComponent', 'genealogyPreview')) {
|
||||
if ($join.Contains($token)) { throw "G08 must not consume retired context: $token" }
|
||||
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" }
|
||||
}
|
||||
if (-not $join.Contains('findGenealogyFixture')) { throw 'G08 must read display identity from the shared genealogy fixture owner' }
|
||||
Write-Output 'G06-G08-CONTEXT-CONTRACT PASS'
|
||||
|
||||
Reference in New Issue
Block a user