完成50%
This commit is contained in:
@@ -2,10 +2,13 @@ $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 albumId = ref', 'toUpload', '/pages/family/f09-media-upload?albumId=${albumId.value}')) {
|
||||
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 albumId = ref', 'query.albumId', '/pages/family/f08-album-detail?albumId=${albumId.value}')) {
|
||||
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'
|
||||
|
||||
Reference in New Issue
Block a user