15 lines
1.1 KiB
PowerShell
15 lines
1.1 KiB
PowerShell
$ErrorActionPreference = 'Stop'
|
|
$root = Split-Path -Parent $PSScriptRoot
|
|
$detail = Get-Content -LiteralPath (Join-Path $root 'pages/family/f08-album-detail.vue') -Raw -Encoding UTF8
|
|
$upload = Get-Content -LiteralPath (Join-Path $root 'pages/family/f09-media-upload.vue') -Raw -Encoding UTF8
|
|
foreach ($token in @('const genealogyId = ref', 'const albumId = ref', 'findFamilyAlbumFixture(genealogyId.value, albumId.value)', 'toUpload', 'openPage(', 'genealogyId: genealogyId.value, albumId: albumId.value')) {
|
|
if (-not $detail.Contains($token)) { throw "F08 album context missing: $token" }
|
|
}
|
|
foreach ($token in @('const genealogyId = ref', 'const albumId = ref', 'findFamilyAlbumFixture(genealogyId.value, albumId.value)', 'returnTo("F08", {', 'genealogyId: genealogyId.value', 'albumId: albumId.value')) {
|
|
if (-not $upload.Contains($token)) { throw "F09 album context missing: $token" }
|
|
}
|
|
foreach ($page in @($detail, $upload)) {
|
|
if ($page.Contains('query.albumId || "reunion"') -or $page.Contains('/pages/')) { throw 'F08/F09 must not default the album identity or retain route literals' }
|
|
}
|
|
Write-Output 'F08-F09-ALBUM-CONTEXT-CONTRACT PASS'
|