完成50%
This commit is contained in:
@@ -13,7 +13,6 @@ function Assert-Contains {
|
||||
}
|
||||
|
||||
$page = Read-Utf8 'pages/family/f08-album-detail.vue'
|
||||
$catalog = Read-Utf8 'data/page-catalog.js'
|
||||
|
||||
foreach ($expected in @(
|
||||
'class="album-detail-page"',
|
||||
@@ -23,23 +22,22 @@ foreach ($expected in @(
|
||||
'class="album-preview"',
|
||||
'class="album-upload-action"',
|
||||
'const albumState = ref("normal");',
|
||||
'const photos = [',
|
||||
'const photos = ref([]);',
|
||||
'findFamilyAlbumFixture(genealogyId.value, albumId.value)',
|
||||
'const openPreview = (index) =>',
|
||||
'const closePreview = () =>',
|
||||
'const toUpload = () =>',
|
||||
'/pages/family/f09-media-upload?albumId=${albumId.value}',
|
||||
'"F09"',
|
||||
'genealogyId: genealogyId.value, albumId: albumId.value',
|
||||
'query.state === "empty"',
|
||||
'query.state === "preview"',
|
||||
'query.state === "expired"',
|
||||
'class="album-empty-state"',
|
||||
'class="album-expired-state"',
|
||||
'class="album-preview__position"',
|
||||
'f08-reunion-hero.png',
|
||||
'f08-family-portrait.png',
|
||||
'f08-reunion-table.png',
|
||||
'f08-ancestral-home.png',
|
||||
'f08-ancestral-portrait.png',
|
||||
':alt="photo.alt"',
|
||||
'transientOpen: previewVisible.value',
|
||||
'onBackPress((event) => handleBackPress(event, requestBack));',
|
||||
'ModulePageBackground',
|
||||
'PageHeader',
|
||||
'AppButton'
|
||||
@@ -47,7 +45,7 @@ foreach ($expected in @(
|
||||
Assert-Contains $page $expected "F08 contract missing: $expected"
|
||||
}
|
||||
|
||||
foreach ($forbidden in @('<ModulePage page-id="f08"', 'import ModulePage from', 'uni.showToast', 'uni.showModal')) {
|
||||
foreach ($forbidden in @('<ModulePage page-id="f08"', 'import ModulePage from', 'uni.showToast', 'uni.showModal', 'uni.navigateTo', 'uni.redirectTo', '/pages/')) {
|
||||
if ($page.Contains($forbidden)) { throw "F08 retains forbidden dependency: $forbidden" }
|
||||
}
|
||||
|
||||
@@ -61,8 +59,4 @@ foreach ($requiredPosition in @(
|
||||
}
|
||||
if ([regex]::Matches($page, 'position\s*:').Count -ne 4) { throw 'F08 must keep only its photo-tile overlays and full-screen preview positioned' }
|
||||
|
||||
if ($catalog -match '(?m)^\s*f08\s*:') {
|
||||
throw 'F08 obsolete page-catalog owner must be removed'
|
||||
}
|
||||
|
||||
Write-Output 'F08-ALBUM-DETAIL-CONTRACT PASS'
|
||||
|
||||
Reference in New Issue
Block a user